|Table of Contents|
Before getting started, you should read the Best Practices for Running Tests with Sauce Labs.
You will need to install the Selenium WebDriver client driver to your local Python environment
You can either download the driver from the link, or use
pipto install it.
pip install selenium
You should also install the Sauce Python client, which provides features for reporting job information to the Sauce Labs dashboard.
pip install sauceclient
This simple Python test script tests the Google front page. Despite its simplicity, it contains everything you need to know in order to run an automated test on Sauce Labs.
|title||Python on Sauce Code Example|
The explicit wait method tells the browser to wait a set amount of time (in seconds) for elements to appear on the page before giving up. Using explicit waits is one of our recommended best practices.