Project

General

Profile

Bug #1609

Firefox no longer works

Added by Luke Murphey about 8 years ago. Updated about 8 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Input: Web Spider
Target version:
Start date:
11/19/2016
Due date:
% Done:

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.

  1. Download selenium 3.0.1: https://pypi.python.org/pypi/selenium
  2. Deploy client in same directory as script: https://github.com/mozilla/geckodriver/releases
  3. 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:

  1. Run selenium extraction code from another process with a different working directory
  2. Get selenium to make the logs in a different location

#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

Also available in: Atom PDF