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

What you say in regards to the flexibility of selenium test suite?

508


Which are the browsers supported by selenium ide?

476


What is framework and what are the frameworks available in rc?

504


Can you use Selenium to test the Rest API or Web services?

493


How to assert title of the web page?

523






where do u maintain all your test cases in manual not in selenium

868


What is page factory?

530


How can we handle window ui elements and window pop ups using selenium?

445


How can we handle windows based pop up?

508


What is the use of driver.get("url") and driver.navigate().to("url") command? Is there any difference between the two?

517


How will u write page object models and data driven model.

812


What is desired capabilities?

497


What are the locators available in selenium?

552


Tell me does the selenium have any limitations?

479


How to switch to a new window (new tab) which opens up after you click on a link?

512