1

I am using Python 3.5 on a Windows computer. When I run this code on my Mac it works perfect, no issues what so ever. But when I bring the code to my Windows computer it doesn't work.

Basically a blank page is shown instead of the home page. I don't get any error messages.

from selenium import webdriver

driver = webdriver.Firefox()
driver.get('https://www.google.com')
cookies = driver.get_cookies()

print(cookies)

Once I close the web browser I get this message in the shell:

"The browser appears to have exited " selenium.common.exceptions.WebDriverException: Message: The browser appears to have exited before we could connect. If you specified a log_file in the FirefoxBinary constructor, check it for details.

From what I've been able to find online (most is for Java) it looks like I may need to setup a profile? Is this correct and could anyone help with this?

Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
Senor Penguin
  • 385
  • 1
  • 5
  • 17

1 Answers1

1

It looks like your client doesn't have the fix for the new switch to launch the gecko driver:

https://github.com/SeleniumHQ/selenium/commit/c76917839c868603c9ab494d8aa0e9d600515371

Make sure that you have the latest beta version installed (selenium-3.0.0b2) if you which to use the geckodriver v0.10.0 and above:

pip install -U selenium --pre

Note that you need the --pre flag to install the beta version.

Florent B.
  • 41,537
  • 7
  • 86
  • 101
  • Thank you so much for the info. I will try to do this on Tuesday when I am back at work, I'll be sure to leave feedback. – Senor Penguin Sep 03 '16 at 02:31