#!/bin/bash export PATH=$PATH:/opt/WebDriver/bin if [[ ${1} == "install" ]]; then /usr/bin/python3.8 -m venv sbase_env source sbase_env/bin/activate python --version python -m pip install --upgrade pip python -m pip install --upgrade -r requirements.txt seleniumbase download server seleniumbase install geckodriver seleniumbase install chromedriver deactivate exit elif [[ ${1} == "rmvm" ]]; then rm -rf sbase_env exit elif [[ ${1} == "grid-start" ]]; then source sbase_env/bin/activate seleniumbase grid-hub start seleniumbase grid-node start exit elif [[ ${1} == "grid-stop" ]]; then source sbase_env/bin/activate seleniumbase grid-hub stop seleniumbase grid-node stop exit fi source sbase_env/bin/activate python -m pytest test.py --dashboard --html=report.html --headless ${@} deactivate