Skip to content

Latest commit

 

History

History
37 lines (24 loc) · 1.67 KB

AUTOMATED_TESTING.md

File metadata and controls

37 lines (24 loc) · 1.67 KB

Automated Testing

Documentation on running automated tests with selenium for systers/portal.

Setup Selenium (Unix)

To run selenium test you would need to install (download) the standalone servers which implements WebDrivers' wire protocols :

  • geckodriver and
  • chromedriver

is used here not withstanding, other WebDriver servers may be used with a little tweaking (which entails adding the desired webdriver in the browsers dictionary in the conftest.py)

Installation

  1. Download chromedriver here
  2. Download geckodriver here

Get latest versions, and make sure the version downloaded is meant for your OS and is compatible (32/64 bits)

After downloading, extract both drivers and save in a directory (e.g webdrivers) in a location of choice, finally let selenium know where it can find the webdrivers by exporting the paths to the various executables, you would have to do this every time your (re)start you venv (or any enviroment for that matter)

export PATH=$PATH:/path/to/directory/of/executable/downloaded/

That is quite boring you can just make each of them available globally once and for all

sudo mv geckodriver /usr/local/bin 
sudo mv chromedriver /usr/local/bin

You can also write a .bashrc script and export, to avoid the repetition this method however has thesame effect as simply moving the files to /usr/local/bin above.

Note : Be sure to export only the directory(ies) containing the executables without including the executables to avoid the "NotADirectoryError: [Errno 20] Not a directory"