difference between Implicit Wait and Explicit Wait with syntax.?

Answer Posted / sehgalkhyati@gmail.com

EXPLICIT WAIT- Will stop the execution for the given mentioned time.
WebDriverWait wait = new WebDriverWait(driver, 10);

WebElement element = wait.until(ExpectedConditions.elementToBeClickable(By.id("someid")));

IMPLICIT WAIT- will be applicable toeach and every element on web

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"));

Is This Answer Correct ?    10 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Describe the purpose of xpath.

505


What is the command to insert text into the HTML text box using Selenium?

504


What are the different types of frameworks?

528


How can you fetch an attribute from an element? How to retrieve typed text from a textbox?

551


How do you verify if the checkbox/radio is checked or not?

438






What do you mean by the assertion in selenium?

491


Is webelement an interface or a class?

563


How to locate a link using its text in selenium?

541


How to scroll down a page using javascript in selenium?

477


How to handle alerts in selenium?

519


What are the advantages and disadvantages of using selenium as testing tool?

485


What is the command line we have to write inside a .bat file to execute a selenium project when we are using testng?

561


What are junit annotations?

516


What is a data driven framework?

524


What does a knot do on the selenium grid?

575