!!

Welcome to Selenium Webdriver Forum

As a web user you can read and search through forum content. Once you have registered and signed you can post topics, post replies, set up watch lists, modify forum settings, and use private messaging.

Author Topic: What's the equivalent of isElementPresent in Selenium1?  (Read 407 times)

shen xieyin

  • Web User
What's the equivalent of isElementPresent in Selenium1?
« on: April 04, 2012, 04:21:38 PM »
Hi,
 
We used to add a check such as isElementPresent() before we do action on a
 element in Selenium1, so I just wonder in Selenium2, how we do it like that
 way?
 
Thanks,
 -Shen

Simon Stewart

  • Web User
Re: What's the equivalent of isElementPresent in Selenium1?
« Reply #1 on: April 04, 2012, 04:21:56 PM »
There are two ways. If you're waiting for a specific element, you can
 use the Wait interface and the WebDriverWait implementation. This
 makes it clear in your tests that you expect the page to reload, or
 some other event to happen.
 If that's not suitable, then consider using implicit waits, which can
 be configured through the "driver.manage().timeouts()".
 
Regards,
 
Simon
 

- Show quoted text -

 

Related Topics

  Subject / Started by Replies Last post
5 Replies
1029 Views
Last post February 21, 2012, 02:48:17 PM
by Ana Stavreva
2 Replies
492 Views
Last post February 21, 2012, 06:19:56 PM
by Shane Duan
0 Replies
606 Views
Last post February 23, 2012, 07:48:08 PM
by SantoshSarma
2 Replies
534 Views
Last post March 27, 2012, 02:58:57 PM
by Mark Collin
1 Replies
436 Views
Last post April 09, 2012, 04:53:02 PM
by Simon Stewart
16 Replies
1376 Views
Last post April 21, 2012, 01:20:18 AM
by SeleniumWebdriver Admin
1 Replies
565 Views
Last post May 17, 2012, 10:12:27 PM
by Daniel Wagner-Hall

Review www.seleniumwebdriver.com on alexa.com