In this section we will see how we can use implicit waits in our code. We need to change a number of calls together to set the implicit. This was done to keep the API as succinct as possible:
Open your Java IDE. Intellij or Eclipse are the most used.
We are going to use the command:driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); driver.findElement(By.xpath("//div[@id='ajaxdiv']")
Run your tests:
What just happened?
We have just seen that our tests run and pass. We didn't have to do anything special for waiting for the new text to appear on the page. Let's go see how we can do this with the explicit waiting approach.
Unfortunately implicit waits do not fit all situations and for some developers is not the right thing to do. Explicit waits is when we know what we want to happen and the error needs to fit that situation.
Let's see this in action!
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.