Robot Framework SeleniumTestability
Robot Framework SeleniumTestability is a library that enhances Robot Framework's SeleniumLibrary by providing additional keywords to handle asynchronous events and improve test stability for modern web applications. It helps in waiting for page readiness, Angular, jQuery, and network idle states. The current version is 2.1.0, with releases often coinciding with major SeleniumLibrary or Selenium updates.
Warnings
- breaking Version 2.0.0 introduced a breaking change requiring Selenium 4 (or greater) due to updates in Robot Framework SeleniumLibrary. If you are using an older SeleniumLibrary or Selenium 3, you must either upgrade your Selenium stack or use an older version of robotframework-seleniumtestability (<2.0.0).
- gotcha This library complements, but does not fully replace, the need for robust SeleniumLibrary waits. While it provides general asynchronous waits, complex or custom asynchronous operations might still require explicit 'Wait Until Element Is Visible' or 'Wait Until Element Contains' from SeleniumLibrary.
- gotcha Ensure SeleniumLibrary is imported and configured correctly *before* SeleniumTestability in your Robot Framework settings. SeleniumTestability relies on the browser context established by SeleniumLibrary.
Install
-
pip install robotframework-seleniumtestability
Imports
- SeleniumTestability
Library SeleniumTestability
Quickstart
*** Settings ***
Library SeleniumLibrary timeout=10s
Library SeleniumTestability
*** Test Cases ***
Example Test With Async Waits
Open Browser https://example.com chrome
Wait For Page Ready
Title Should Be Example Domain
# Example: If your application uses jQuery, Angular, or waits for network idle
# Wait For JQuery Ready
# Wait For Angular Ready
# Wait Until Network Idle
Close Browser