Skip to content

Selenium Testing

Nathanael Johnson edited this page Nov 29, 2022 · 4 revisions

Setting Up

Set Up Environment

Note: python3 and pip3 will be used for MacOS and Linux machines. If on Windows, python and pip will be used

  • Use command pip3 install -r requirements.txt to install required packages in terminal
  • Ensure Chrome is installed on the machine you want to run the Selenium tests on

Installing Chromedriver

  • Verify the current version of Chrome installed on your machine
  • The following link will take you to the Chromedriver install page 'https://chromedriver.chromium.org'
  • Install the Chromedriver version that matches the version of Chrome installed
  • Verify Chromedriver is in PATH. Just placing it in the 'tests' directory has given the greatest success

Running Selenium Tests

Create Local Database

  • Running the command python3 dbcreate.py . will generate a local database named 'account.db'

Running Local Server/App

  • Use command python3 run.py . to run the local server

Running Tests

  • Move into the 'tests' directory
  • In separate terminal instance, use command python3 <filename> to execute a Selenium test