Consider installing a containerized Firefox:
docker pull selenium/standalone-firefoxdocker run --rm -d -p 5555:4444 --shm-size=2g selenium/standalone-firefox
Connect using webdriver.Remote
:
driver = webdriver.Remote('http://localhost:5555/wd/hub', DesiredCapabilities.FIREFOX)driver.set_window_size(1280, 1024)driver.get('https://toolbox.googleapps.com/apps/browserinfo/')driver.save_screenshot('info.png')