Skip to content

pdaambrosio/python_webdriver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Test python with webdirver chrome

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages