Solutions of the automation exercises available at Easy Selenium Demo
Basic | Basic Challenges Solutions |
Intermediate | Intermediate Challenges Solutions |
Advanced | Advanced Challenges Solutions |
-
git clone https://github.com/josewebdev2000/Selenium-Demo.git
-
python3 -m venv <your_venv_name>
-
pip3 -r install requirements.txt
-
cd <directory_of_interest>
Example:
cd basic
-
There are two environment variables that are required to run any automation script found in this project
DRIVER_PATH
This is the path to the folder that contains the web browser driver. Since this project uses Firefox. Then, supply the path to your geckodriver
export DRIVER_PATH=<path_to_folder_of_your_geckodriver>
set DRIVER_PATH=<path_to_folder_of_your_geckodriver>
BIN_PATH
This is the path to the executable binary of the web browser. Since this project uses Firefox. Then, supply the path to your firefox executable file.
export BIN_PATH=<path_to_your_firefox_binary>
set BIN_PATH=<path_to_your_firefox_binary>
If your operating system is Ubuntu the following values have been provided to you by default
DRIVER_PATH=/usr/local/bin
BIN_PATH=/usr/bin/firefox
As a result, as long as the path to the folder to your geckodriver is
/usr/local/bin
you WON'T need to set up theDRIVER_PATH
environment variable.Likewise, as long as the path to your firefox binary is
/usr/bin/firefox
you WON'T need to set up theBIN_PATH
environment variable. -
python <solution_of_interest_file_name>.py
Example:
python simple_form_solution.py