Take full page screenshots of a specified webpage using Selenium. Window widths are specified in the python script.
- Chrome Headless
- Firefox
- Selenium
- Python 3
- Chrome Headless
- Firefox
- Geckodriver (for Firefox)
- Install dependecies.
- Clone this repo and
cd
into repo. - (Optional) Set up a python virtualenv for python dependencies.
pyvenv .
orpython -m venv
- (Optional) Activate virtualenv
. bin/activate
. - Install python dependencies.
pip install -r requirements.txt
- Run script.
python index.py
- (Optional) When done using tool deacivate using
deactivate
Base url, url extensions, and window sizes are stored in index.py
. Window
height is auto-adjusted and irrelevant. If you want to disable screenshots for
one of the browsers change it's value in enabled
dict in index.py
to False
.
For simpler use run ./run
. This will activate the virtualenv, run the script,
and deactivate the virtualenv when done.