!!

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 442 times)

shen xieyin

  • Web User
What's the equivalent of isElementPresent in Selenium1?
« on: April 09, 2012, 04:52:45 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 09, 2012, 04:53:02 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
1048 Views
Last post February 21, 2012, 02:48:17 PM
by Ana Stavreva
2 Replies
539 Views
Last post March 27, 2012, 02:58:57 PM
by Mark Collin
1 Replies
411 Views
Last post April 04, 2012, 04:21:56 PM
by Simon Stewart
2 Replies
770 Views
Last post April 10, 2012, 09:27:03 PM
by K_Lady
16 Replies
1404 Views
Last post April 21, 2012, 01:20:18 AM
by SeleniumWebdriver Admin
5 Replies
486 Views
Last post April 11, 2012, 10:47:34 PM
by Tarun K
1 Replies
578 Views
Last post May 17, 2012, 10:12:27 PM
by Daniel Wagner-Hall

Review www.seleniumwebdriver.com on alexa.com