Skip to main content

Testing web apps in Python using Selenium WebDriver

Running Tests with Applitools

Prerequisites

  1. A free Applitools account and Applitools API KEY

    Tip: Unsure how to find your API key?

    Read Retrieving your API key to find your API key.

  2. Python 3 https://realpython.com/installing-python/

  3. Git https://git-scm.com

    Note: Installing git is optional

    Installing git is used to clone the demo project from the Github repository. Instead of installing git, you can simply download the Zip file from the repository. Further, if you are Mac, you already have git.

  4. Google Chrome Browser https://www.google.com/chrome/

  5. ChromeDriver https://chromedriver.chromium.org/getting-started

    ChromeDriver must be installed and in your PATH

    Below are some resources from the internet that'll help you

  • Install on Mac

  • Install on windows

    On Mac, place the chromedriver executable in /usr/local/bin folder so Eclipse and IntelliJ can find it. :::

    Option 1 - Run With The Ultrafast Grid

  1. Clone or download the repository and navigate to that folder
git clone https://github.com/applitools/example-selenium-python-pytest-ufg.git
cd example-selenium-python-pytest-ufg

Note: you can alternatively download the project as a Zip file and extract it

  1. Install the dependencies
pip3 install -r requirements.txt
  1. Run the example test
APPLITOOLS_API_KEY="[Your API Key]" pytest ultrafastgrid_tutorial.py

This will first set your APPLITOOLS_API_KEY into the node process then run pytest ultrafastgrid_tutorial.py.

:::tip Running from an IDE Start PyCharm, open just cloned project, set project interpreter by File > Settings > Project: > Project Interpreter choose interpreter by dropdown box; tap Run and choose ultrafastgrid_demo. :::

Adding Applitools Eyes to an Existing Project

Example Test


Option 2 - Run Locally

  1. Clone or download the repository and navigate to that folder
git clone https://github.com/applitools/example-selenium-python-pytest-classic.git
cd example-selenium-python-pytest-classic

Note: you can alternatively download the project as a Zip file and extract it

  1. Install the dependencies
pip3 install -r requirements.txt
  1. Run the example test
APPLITOOLS_API_KEY="[Your API Key]" pytest tutorial.py

This will first set your APPLITOOLS_API_KEY into the node process then run pytest tutorial.py.

::: tip Running from an IDE Start PyCharm, open just cloned project, set project interpreter by File > Settings > Project: > Project Interpreter choose interpreter by dropdown box; tap Run and choose ultrafastgrid_demo. :::

Adding Applitools Eyes to an Existing Project

Example Test


Having Trouble?

Don't suffer in silence! Let us help you. Please reach out to us to get your project working.

Taking the next steps with Applitools

Congratulations on completing this quickstart! There's still so much to learn about visual testing with Applitools, but you're off to a great start.

Resources for next steps:

  1. 🤖 Learning how visual testing works
  2. ↔️ Setting match levels for visual checkpoints
  3. 💥 Troubleshooting common issues
  4. 🐞 Reporting bugs
  5. 🗺 Detailed overview of visual testing with Applitools

You can also: