This is a simple example of how to use Selenium WebDriver with Python. It is based on the Selenium Python Bindings.
- Python 3.6+
- Selenium Python Bindings
- ChromeDriver
pip install -r requirements.txt
You need create a ".env" file with the following variables:
tee -a .env <<EOF
# .env
WEB_USERNAME=your_username
WEB_PASSWORD=your_password
EOF
Because the ".env" file contains sensitive information, it is ignored by Git.
In this project don't is necessary to download the ChromeDriver, because it is use the webdriver-manager to download the ChromeDriver automatically.
But I recommend you use a virtual environment to install the dependencies.
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
For more information about virtual environments, see the Python Virtual Environments: A Primer article.
After that, you can run the script:
python3 main.py
This project is licensed under the MIT License - see the LICENSE file for details.