<commit_before> {
  title: "Python",
  description: "How to run Selenium tests on Sauce Labs using python",
  category: 'Tutorials',
  index: 3,
  image: "/images/tutorials/python.png"
}
## Basic Setup
### Dependencies

First, let's install the dependencies we'll need for the tutorial:

```bash
pip install selenium pytest pytest-xdist sauceclient
```

Note that you must have [pip installed](https://pip.pypa.io/en/latest/installing.html).  Also note that `sauceclient` does not yet support Python 3.

### Running a Test
Let's get started with the simplest thing we can imagine.  Let's make
sure Google hasn't changed their name.

First, let's set up our browser:

```python
from selenium import webdriver

sauce_url = "http://sauceUsername:sauceAccessKey@ondemand.saucelabs.com:80/wd/hub"

desired_capabilities = {
	'platform': "Mac OS X 10.9",
	'browserName': "chrome",
	'version': "31",
}

driver = webdriver.Remote(desired_capabilities=desired_capabilities,
                          command_executor=sauce_url)
driver.implicitly_wait(10)<commit_msg>sauceclient now supports Python 3<commit_after> {
  title: "Python",
  description: "How to run Selenium tests on Sauce Labs using python",
  category: 'Tutorials',
  index: 3,
  image: "/images/tutorials/python.png"
}
## Basic Setup
### Dependencies

First, let's install the dependencies we'll need for the tutorial:

```bash
pip install selenium pytest pytest-xdist sauceclient
```

Note that you must have [pip installed](https://pip.pypa.io/en/latest/installing.html).  The latest version of `sauceclient` (v. 0.2.1, 9 July 2015) supports both Python 2 and Python 3.

### Running a Test
Let's get started with the simplest thing we can imagine.  Let's make
sure Google hasn't changed their name.

First, let's set up our browser:

```python
from selenium import webdriver

sauce_url = "http://sauceUsername:sauceAccessKey@ondemand.saucelabs.com:80/wd/hub"

desired_capabilities = {
	'platform': "Mac OS X 10.9",
	'browserName': "chrome",
	'version': "31",
}

driver = webdriver.Remote(desired_capabilities=desired_capabilities,
                          command_executor=sauce_url)
driver.implicitly_wait(10)
{'fraction_non_alphanumeric': 0.111572153065929, 'fraction_numerical': 0.01475334255417243, 'mean_word_length': 4.465994962216625, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2947179', 'n_tokens_mistral': 763, 'n_tokens_neox': 695, 'n_words': 220}