This repository contains the slides, notes, exercises, and solutions for the workshop. If you are attending this workshop and would like to follow along, please follow this guide to install the prerequisites.
This workshop has been designed for Python 3.6, and this is the version I recommend you install. It may be possible to follow along using legacy Python (2.7) or other versions.
You can download Python from https://www.python.org/downloads/, where you can also find installation instructions for your platform.
In order to avoid installing packages into your default site packages, you should create a virtual environment to work in. This will be covered in the workshop, however if you want to install the package dependencies ahead of time, you will need to create a virtual environment using the command python -m venv .workshop
. The environment can then be activated using source .workshop/bin/activate
and deactivated using deactivate
.
Whilst not a requirement, the workshop does cover the alternative interactive shells bpython and IPython. These can be installed using pip install bpython
and pip install ipython
respectively.
The following package dependencies are required and used at various points in the workshop. These can be installed using pip install <package>
from within your virtual environment. Note that this is not an exhaustive list of dependencies, as these packages have their own required dependencies that will be installed alongside them.
The workshop will focus on using Firefox, which can be downloaded and installed from https://www.mozilla.org/firefox/. It is recommended that you install the latest release to the default location.
In order to automate Firefox, the latest GeckoDriver binary should be downloaded for your platform from https://github.com/mozilla/geckodriver/releases and placed into your system path. The following resources may help here:
Several exercises in this workshop require access to an example application known as The Internet. If you have a connection to the actual internet then you should be fine, however workshops are notorious for having connection difficulties. Fortunately, you can download The Internet and run it locally. See the getting started guide for how to start the application.
The Selenium server requires a Java Runtime Environment, which can be downloaded and installed for your platform from https://java.com/en/download/.
The Selenium server will be used to demonstrate running tests remotely. This can be downloaded from http://www.seleniumhq.org/download/.
Sign up for a free Sauce Labs trial at https://saucelabs.com/ to run tests against their service. You'll need your username and API key during the workshop.
The workshop will cover running tests against Docker containers. For this you will need Docker installed for your platform, which you can get from https://www.docker.com/products/overview.
You may also want to download the Docker images in advance. Once you have Docker installed, you can do this using the following commands:
docker pull selenium/hub
docker pull selenium/node-firefox
docker pull selenium/standalone-firefox
In the final part of the workshop, we'll cover how to get hold of the Selenium source code, build the Python client, and run the tests. This will require you to have the Git SCM tool for your platform, which you can download from https://git-scm.com/downloads.