YouTube: https://youtu.be/qgup1XwDzhQ
** Selenium Training: https://www.edureka.co/testing-with-selenium-webdriver **
This Edureka PPT on "Waits in Selenium" talks about different types of selenium waits and steps involved to use implicit and explicit waits along with examples.
Below topics are covered in this PPT:
Introduction to Waits and Need for it
Implicit Waits
Explicit Waits
Fluent Waits
Selenium playlist: https://goo.gl/NmuzXE
Selenium Blog playlist: http://bit.ly/2B7C3QR
Follow us to never miss an update in the future.
YouTube: https://www.youtube.com/user/edurekaIN
Instagram: https://www.instagram.com/edureka_learning/
Facebook: https://www.facebook.com/edurekaIN/
Twitter: https://twitter.com/edurekain
LinkedIn: https://www.linkedin.com/company/edureka
2. What are waits? Types of Waits Hands On
Need for waits? Implicit vs Explicit waits
3. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Waits in Selenium
Waits help the user to troubleshoot issues while re-directing to different web pages by refreshing the
entire web page and re-loading the new web elements.
5. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Types of Waits
Fluent Wait
Explicit Wait
Implicit Wait
6. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Fluent Wait
Explicit Wait
Implicit Wait In Implicit wait, we can tell Selenium that we would like it to wait for a
certain amount of time before throwing an exception that it cannot find
the element on the page.
Syntax:
Types of Waits
driver.manage().timeouts().implicitlyWait(TimeOut,
TimeUnit.SECONDS);
7. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Fluent Wait
Implicit Wat
Explicit wait
Types of Waits
The explicit wait is used to tell the Web Driver to wait for certain
conditions (Expected Conditions) or the maximum time exceeded
before throwing an "ElementNotVisibleException" exception.
Syntax:
WebDriverWait wait=new
WebDriverWait(WebDriveReference,TimeOut);
8. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Expected Conditions
titleIs An expectation for checking the title of a page
titleContains An expectation for checking that the title contains a case-sensitive substring
urlToBe An expectation for the URL of the current page to be a specific url.
urlContains An expectation for the URL of the current page to contain specific text.
presenceOfElementLocated An expectation for checking that an element is present on the DOM of a page.
visibilityOfElementLocated To check that an element is present on the DOM of a page and visible
visibilityOfAllElements To check that elements present on the web page match the locator are visible
visibilityOf Expectation to check that an element to be present on the DOM of a page, is visible
textToBePresentInElement An expectation for checking if the given text is present in the specified element
textToBePresentInElementValue Expectation to check if the given text is present in the specified elements value
invisibilityOfElementLocated Expectation to check an element is either invisible or not present on the DOM
elementToBeClickable To check an element is visible and enabled such that you can click it.
elementToBeSelected An expectation for checking if the given element is selected
9. JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Explicit Wait
Implicit Wait
Fluent Wait
Types of Waits
The fluent wait is used to tell the web driver to wait for a condition, as
well as the frequency with which we want to check the condition before
throwing an "ElementNotVisibleException" exception.
Syntax:
Wait wait = new FluentWait(WebDriver reference)
.withTimeout(timeout, SECONDS) .pollingEvery(timeout,
SECONDS).ignoring(Exception class);