Page History
...
Table of Contents |
---|
Prerequisites
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 usepip
to install it.Code Block pip install selenium
You should also install the Sauce Python client, which provides features for reporting job information to the Sauce Labs dashboard.
Code Block pip install sauceclient
Code Example
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.
...
language | py |
---|---|
title | Python on Sauce Code Example |
linenumbers | true |
collapse | true |
...
Include Page | ||||
---|---|---|---|---|
|
Code Example
Include Page | ||||
---|---|---|---|---|
|
Tip | ||
---|---|---|
| ||
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. |
...