Skip to content

Latest commit

 

History

History
executable file
·
51 lines (34 loc) · 1.34 KB

README.md

File metadata and controls

executable file
·
51 lines (34 loc) · 1.34 KB

python_webdriver

This is a simple example of how to use Selenium WebDriver with Python. It is based on the Selenium Python Bindings.

Requirements

Installation

pip install -r requirements.txt

Usage

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

License

This project is licensed under the MIT License - see the LICENSE file for details.