KEMBAR78
Waits in Selenium | Selenium Wait Commands | Edureka | PDF
JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Waits in Selenium
What are waits? Types of Waits Hands On
Need for waits? Implicit vs Explicit waits
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.
JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Why do we need waits in Selenium?
JAVA CERTIFICATION TRAINING www.edureka.co/java-j2ee-soa-training
Types of Waits
Fluent Wait
Explicit Wait
Implicit Wait
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);
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);
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
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);
YouTube Video Link in the Description
Waits in Selenium | Selenium Wait Commands | Edureka

Waits in Selenium | Selenium Wait Commands | Edureka

  • 1.
    JAVA CERTIFICATION TRAININGwww.edureka.co/java-j2ee-soa-training Waits in Selenium
  • 2.
    What are waits?Types of Waits Hands On Need for waits? Implicit vs Explicit waits
  • 3.
    JAVA CERTIFICATION TRAININGwww.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.
  • 4.
    JAVA CERTIFICATION TRAININGwww.edureka.co/java-j2ee-soa-training Why do we need waits in Selenium?
  • 5.
    JAVA CERTIFICATION TRAININGwww.edureka.co/java-j2ee-soa-training Types of Waits Fluent Wait Explicit Wait Implicit Wait
  • 6.
    JAVA CERTIFICATION TRAININGwww.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 TRAININGwww.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 TRAININGwww.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 TRAININGwww.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);
  • 10.
    YouTube Video Linkin the Description