SELENIUM BASICS:

  • What is Automation Testing - Advantages & Types of Tools
  • What is Selenium IDE, Selenium RC, Selenium WebDriver, Selenium Grid?
  • Selenium IDE, Firebug & Firepath Installation

  • SELENIUM WEBDRIVER:

  • Selenium WebDriver Architecture
  • Selenium Installation
  • Challenges and Limitations of Selenium
  • First Selenium WebDriver Script
  • Working with Firefox Browser
  • Solution - Failed To Launch Browser Using Selenium WebDriver
  • Working with Chrome Browser
  • Working with IE Browser
  • Difference Between FindElement & FindElements
  • Install Firebug, Fire path and other add on for Selenium
  • Locators in Selenium
  • Dynamic Xpath
  • Dynamic CSS
  • Handle drop-downs
  • How to work with file upload
  • Handle Alerts & Popups
  • Handle Multiple Windows
  • Mouse Hover event in Selenium
  • Right Click
  • Double Click
  • Drag and Drop
  • Capture Screenshots in Selenium
  • Parameterization
  • Synchronization
  • Implicit Wait, Explicit Wait and Fluent Wait in Selenium
  • Implicit Waits
  • Explicit WebDriver Waits
  • Fluent Wait In Selenium
  • Apache POI
  • How To Read Data From Excel File
  • How To Write Data In Excel File
  • Database Testing Using MSSQL
  • Database Testing Using MySQL
  • Database Testing Using DB2
  • Handle Ajax Call in Selenium
  • Listeners in Selenium
  • Handling JavaScript in Selenium
  • Stale Element Reference Exception in Selenium
  • Integrate Sikuli with Selenium
  • Headless Browser Testing 
  • Headless Browser Testing using HtmlUnitDriver
  • Headless Browser Testing using PhanthomJSDriver

  • TESTNG:

  • TestNG Installation
  • TestNG Complete Tutorial

  • REPORTS:

  • Extent Reports Introduction
  • Extent Reports Generation
  • Capturing Screenshots & Including In Extent Reports
  • Extent Reports Version 4

  • BUILD & CONTINUOUS INTEGRATION TOOLS:

  • ANT Build Tool - How To Download & Install
  • Maven Build Tool - How To Download & Install
  • Creating Maven Selenium Project
  • GIT Integration with Selenium
  • Jenkins - How To Download & Install
  • Jenkins - Executing TestNG Scripts
  • Jenkins - Generating Reports After Test Execution
  • Jenkins - Executing Maven Project
  • Create build and Execute build for nightly execution
  • Send Email report based on build Status
  • Selenium Continuous Integration with Jenkins [Selenium – Maven – Git – Jenkins] – Step By Step Guide

  • CROSS BROWSER TESTING:

  • Running Selenium Tests On BrowserStack
  • Kobiton - Mobile Testing Platform with Real Devices

  • MOBILE TESTING:

  • Mobile Testing Platform with Real Devices

  • AUTOMATION FRAMEWORKS:

  • What is Framework & Types of Framework
  • Page Object Model Design Pattern
  • Data Driven Framework
  • How to explain Test Automation Framework or Selenium Automation Framework Architecture In Interview

  • API Testing:

  • Learn API Testing
  • Postman Tutorial (API Testing with Postman)

  • INTERVIEW QUESTIONS:

  • Test Automation Framework Interview Questions
  • Selenium Interview Questions
  • TestNG Interview Questions
  • Java Interview Questions
  • Python Interview Questions
  • API Testing Interview Questions

  • SAMPLE RESUME:

  • Automation Tester Resume
  • Synchronization in Selenium Python

    In the previous articles on Selenium Python Tutorial, we have covered “JavaScript Executor in Selenium Python“. In this tutorial, we will learn Synchronization in Selenium Python.

    While working with automation tools like Selenium, Protractor and so on we generally face situations where there is the inconsistent time taken for loading of a page and its web elements. Thus it leads to a situation wherein there exist sync issues between the elements on the page and the actions performed by Selenium.

    The sync problems often lead to failures in the identification of elements due to the absence of that element in DOM leading to ElementNotVisibleException exception. In order to plug these loopholes, Selenium came up with the wait concepts that slows down the process of elements to be identified and tasks to be done on them.

    The types of web driver waits are listed below:

    Implicit wait in Selenium

    The implicit wait is a dynamic wait which is applicable for every element in our test case. It is dynamic in nature because if we add an implicit wait of two seconds and the element is accessible at the first second itself, then we need not wait for the entire two seconds duration. As soon as the element is available in DOM, the control moves to the next step of test execution.

    The implicit can be considered as a global wait as it is mostly applied to the test suite level. Timeout exceptions will be given if the element is not available after the implicit wait time elapsed. The implicit wait has a default time set to 0.

    Syntax:

    implicitly_wait (2), the time in the argument to the method is in seconds.

    Code Implementation with Implicit wait.

    Thus the implicit wait is easy from an implementation perspective. However, it slows down the speed of execution and does not catch performance issues in the application. The implicit wait continues polling to a fixed time as specified by the user which remains applicable till the driver session is active.

    Explicit wait in Selenium

    The explicit wait is also dynamic wait which is applicable to the element on which it is applied. It is dynamic in nature because if we add an explicit wait of three seconds and the condition set for an element is met at the first second then we need not halt the execution for the entire three seconds before proceeding in the code.

    In an explicit wait, we need to set some expected conditions to be satisfied by the element. If the criteria are not met in the time duration, a timeout exception is thrown. The WebDriverWait class and ExpectedCondition is used to create an explicit wait. The WebDriverWait automatically invokes the ExpectedCondition at the interval of 500 ms till the condition is returned true.

    Syntax:

    Some of the common expected conditions are listed below:

    • text_to_be_present_in_element_value
    • text_to_be_present_in_element
    • element_to_be_selected
    • staleness_of
    • element_to_be_clickable
    • invisibility_of_element_located
    • frame_to_be_available_and_switch_to_it
    • element_located_to_be_selected
    • alert_is_present
    • element_located_selection_state_to_be
    • title_contains
    • visibility_of_element_located
    • presence_of_element_located
    • title_is
    • visibility_of
    • element_selection_state_to_be
    • presence_of_all_elements_located
    • element_located_to_be_selected

    Code Implementation with Explicit wait.

    Thus the explicit wait is difficult from an implementation perspective. However, it does not slow down the speed of execution and applies to the particular element of our choice.

    In the next article, we will learn Webelement commands in Selenium Python.

    Related posts:

     

    Get our latest blog posts delivered to your inbox

    Subscribe and get popular blog posts about software testing industry.

    Rajkumar

    Leave a Comment

    Share via
    Copy link
    Powered by Social Snap