0

I have been trying to load my Firefox (Mozilla Firefox 49.0), with simple python script and with the assistance of selenium-2.53.6 on Ubuntu 16.04.1 LTS, but even selenium's basic example 0 doesn't work:

from selenium import webdriver

browser = webdriver.Firefox()

browser.get('http://seleniumhq.org/')

I always get after about 5 seconds a timeout, and firefox crashes with the following message:

"Can't load the profile. Profile Dir: /tmp/tmpl5qlfokc If you specified a log_file in the FirefoxBinary constructor, check it for details"

so I created a specific firefox profile (profile -p), and used it, wrote:

profile = webdriver.FirefoxProfile('absolute path to profile folder')

driver = webdriver.Firefox(profile)

but still it seems no matter what I do, the browser crashes after 5 seconds.

Read the post can't load profile on firefox and followed the instructions but still unfortunately the same result. does anyone know how to overcome this the issue?

Thank you all!

Community
  • 1
  • 1
JammingThebBits
  • 732
  • 11
  • 31
  • *The Solution: Apparently the crash can be avoided after installing Selenium 3 (it's in beta stage) thanks to Nima Ghotbi remark. – JammingThebBits Oct 01 '16 at 18:26

1 Answers1

4

For firefox 49.0 you need selenium 3(it's in beta stage, that's why you can't download it with pip -U) and geckodriver.

try this:

wget https://github.com/mozilla/geckodriver/releases/download/v0.10.0/geckodriver-v0.10.0-linux64.tar.gz
tar xzvf geckodriver-v0.10.0-linux64.tar.gz
cp geckodriver /usr/bin/
pip install selenium==3.0.0b3
Nima Ghotbi
  • 641
  • 3
  • 9
  • tell me if this solved your problem. don't forget `sudo` :) – Nima Ghotbi Oct 01 '16 at 14:21
  • Tried it, worked partially! I indeed stopped getting Firefox crash :), but how come the web-page doesn't get loaded.I have sniffed the interface via wireshark and only a single HTTP request is sent from my interface "http://ocsp.digicert.com". why the http request from my script does not get sent ? quite weird, any explanation? – JammingThebBits Oct 01 '16 at 14:37
  • never mind I figured out my workspace was not set correctly I have fixed the issue. Thanks again! – JammingThebBits Oct 01 '16 at 21:26