This is Qxf2's Base Image designed for running any Python3 based Selenium tests.
224
This image includes:
You can use this image for running any python based selenium tests. You can use the regular docker run commands to create a container and just need to setup with selenium and other requirements which are needed to run your tests.
Running the image
$ docker run -it python3-selenium-chrome-firefox:python3
Building your own images
$ docker build -t python3-selenium-chrome-firefox --build-arg CHROME_DRIVER_VERSION=2.28 --build-arg CHROME_VERSION=57.0.2987.133 -f Dockerfile .
$ docker build -t python3-selenium-chrome-firefox --build-arg GECKODRIVER_VERSION=0.19.0 --build-arg FIREFOX_VERSION=59.0.2 -f Dockerfile .
Running python based selenium tests
To run the Selenium tests you need to do the following:
$ pip install Selenium
$ export DISPLAY=:20
$ Xvfb :20 -screen 0 1366x768x16 &
# contents of selenium_sample.py
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("http://www.qxf2.com")
print (driver.title)
driver.quit()
python selenium_sample.py
Refer to our blog for more details - https://qxf2.com/blog/building-your-own-docker-images-for-different-browser-versions/
Content type
Image
Digest
Size
460.2 MB
Last updated
over 7 years ago
docker pull qxf2rohand/python3-selenium-chrome-firefox:python3