Bug #1609
Firefox no longer works
100%
History
#1 Updated by Luke Murphey about 8 years ago
Apparently, you need to install these executables on the path to get this to work: https://github.com/mozilla/geckodriver/releases.
Might want to try updating to Selenium 3.0: http://www.seleniumhq.org/download/
#2 Updated by Luke Murphey about 8 years ago
Here is something that worked.
- Download selenium 3.0.1: https://pypi.python.org/pypi/selenium
- Deploy client in same directory as script: https://github.com/mozilla/geckodriver/releases
- Update page to include local directory
from selenium import webdriver import os os.environ["PATH"] += os.pathsep + "." browser = webdriver.Firefox() browser.get('http://seleniumhq.org/')
#3 Updated by Luke Murphey about 8 years ago
- Subject changed from Firefox longer works to Firefox no longer works
#4 Updated by Luke Murphey about 8 years ago
Will need to use sys.platform to determine platform. platform.architecture() will indicate whether the host is 32-bit or 64-bit.
#5 Updated by Luke Murphey about 8 years ago
Here is a test script. This works.
import os from selenium import webdriver new_path = os.path.join(os.getcwd(), "browser_drivers", "darwin") print new_path os.environ["PATH"] += ":" + new_path browser = webdriver.Firefox() browser.get('http://seleniumhq.org/')
#6 Updated by Luke Murphey about 8 years ago
This is failing when the script is run within Splunk. This is because it is running from the root directory and the drivers can't write the log file in this directory.
#7 Updated by Luke Murphey about 8 years ago
Some options for this:
- Run selenium extraction code from another process with a different working directory
- Get selenium to make the logs in a different location
#8 Updated by Luke Murphey about 8 years ago
Changing the path should be possible per https://github.com/SeleniumHQ/selenium/pull/2700/commits/95f5ef23bb454b9a02274fe4d41fe03e014e704c
#9 Updated by Luke Murphey about 8 years ago
Need to make sure that the binary is set to executable when it is packaged.
#10 Updated by Luke Murphey about 8 years ago
- Status changed from New to Closed
- % Done changed from 0 to 100