In this section we will have a look at using explicit waits.This is useful for making sure that the right type of exception is thrown:
Open your Java IDE.
We are going to use the following code. WebDriverWait is found in the Support package within the Selenium WebDriver Jar.
Run your tests:
What just happened?
We have just seen how we can use an explicit wait with our code. We told the wait class that we wanted it to wait ten seconds while trying to find the element. I personally prefer explicit waits since you can see by reading the code how long it is going to wait for.
Let's now see what we have learnt in this chapter.
Selenium Related Interview Questions
|SILK TEST Interview Questions||QTP Interview Questions|
|JMeter Interview Questions||Automation Testing Interview Questions|
|Software testing Interview Questions||JUnit Interview Questions|
|TestNG Interview Questions||SAP Testing Interview Questions|
|Selenium WebDriver Interview Questions||Selenium IDE Interview Questions|
|QUnit Testing Interview Questions||Performance Testing Interview Questions|
|Hadoop Testing Interview Questions|
Getting Started With Selenium Ide
Overview Of Selenium Webdriver
Working With Webdriver
Getting Started With Selenium Grid
Advanced User Interactions
Working With Html5
Migrating From Remote Control To Webdriver
All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd
Wisdomjobs.com is one of the best job search sites in India.