Sign inSign up

qxf2rohand/python-selenium-firefox

By qxf2rohand

•Updated over 8 years ago

This is Qxf2's Image designed for running Python based selenium tests on different firefox versions

Image
0

424

qxf2rohand/python-selenium-firefox repository overview

This image includes:

Ubuntu 16.04, essential basic tools like curl, unzip, bzip2, wget, Xvfb etc..., Installing Firefox older versions based on the ARG variables (Example shown below) from https://download-installer.cdn.mozilla.net/pub/firefox/releases/⁠, Geckodriver path setup, Python, and Python Pip.

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 images

$ docker run -it python-selenium-firefox:firefox52

#Install Selenium $pip install Selenium

#and export display and enable Xvfb using following 2 commands: $export DISPLAY=:20 $Xvfb :20 -screen 0 1366x768x16 &

Building your own images:

If you want to build your own images using this Dockerfile for different versions of firefox you can use below command. $ docker build -t python-selenium-firefox:firefox52 --build-arg FIREFOX_VERSION=52.0.1 -f Dockerfile .

#the above command builds the image with a specified firefox version.

Running your tests:

#contents of selenium_docker.py from selenium import webdriver

driver = webdriver.Firefox() driver.get("http://www.qxf2.com") print driver.title driver.quit()

Refer to our blog for more details - https://qxf2.com/blog/building-your-own-docker-images-for-different-browser-versions/⁠

Tag summary

Content type

Image

Digest

Size

356.7 MB

Last updated

over 8 years ago

docker pull qxf2rohand/python-selenium-firefox:firefox55