difference between Implicit Wait and Explicit Wait with syntax.?

Answer Posted / arvind yadav

IMPLICIT WAIT:

WebDriver driver = new FirefoxDriver();

driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);

driver.get("http://url_that_delays_loading");

WebElement myDynamicElement = driver.findElement(By.id("myDynamicElement"));


Explicitly wait :

WebDriverWait wait = new WebDriverWait(d,20);
wait.until(ExpectedConditions.presenceOfElementLocated(By.linkText("Any link")));

Is This Answer Correct ?    21 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are some disadvantages of Selenium automation?

507


What is the use of logging in automation?

499


What are soft assert and hard assert in selenium?

438


How to delete browser cookies with selenium web driver?

457


What is the difference between setspeed() and sleep() methods?

552






Can we use selenium grid for performance testing?

444


What is page object model or pom?

496


sorting java array

1245


How to get an attribute value using selenium webdriver?

551


What is the hybrid framework?

569


Explain why to choose python over java in selenium?

475


What are the important features of selenium ide?

504


What is same origin policy and how it can be handled?

451


What are the challenges and limitations of selenium webdriver?

480


Can you run the tests registered with Selenium IDE in other browsers?

526