Python 3.4, Selenium and Firefox hangs

384 views
Skip to first unread message

Robert Spotswood

unread,
Aug 30, 2015, 4:24:34 AM8/30/15
to Selenium Users

I'm trying to work through Automating the Boring stuff with Python, and the selenium section has me at a standstill. Hopefully someone here can guide me back on the path...

The commands I try to type in the python 3.4 console are:


from selenium import webdriver browser = webdriver.Firefox() type(browser)

The first command completes without error. On the second command, Firefox does indeed open and I can manually use it. However, here the console refuses to accept the third command. If I try, I get "the previous command is still running...". I have to Ctrl-C or close Firefox to get the prompt back. Then I can type the third command, but at that point, it's kind of useless. According to the book, the "type(browser)" is supposed to return "<class 'selenium.webdriver.firefox.webdriver.WebDriver'>". But after I kill Firefox, it returns "<class 'module'>".


I believe the problem is the


browser = webdriver.Firefox()
 
is not supposed to lock the console. What am I doing wrong?
 

Nick Mitchell

unread,
Sep 22, 2015, 4:18:18 PM9/22/15
to Selenium Users
I am getting the same error, using a script that was working fine not long ago. I open the Firefox instance, however the script seems to pause at that point, with my URL not being inserted. After a short while the Firefox instance closes (if I leave it open and don't touch it for, say, 2-3 minutes) and initially recieved and error that my Firefox profile could not be loaded. I disabled the profile (to use the Forefox/selenium standard by not entering my own), but the script still pasues and times out at the same line.
Chrome is working as it should and as Firefox WAS working before.
Does Selenium require a new webdriver for Firefox with Python?

Jonathan Schumann

unread,
Sep 22, 2015, 8:29:03 PM9/22/15
to Selenium Users
I encountered the same problem and reinstalled Firefox 39.0 which temporally fixed the problem.

Bruno Bauer

unread,
Jun 14, 2016, 11:57:05 PM6/14/16
to Selenium Users
I just experienced a similar problem: Firefox 47.0 crashes when launched by the first Python Selenium command "browser = webdriver.Firefox()".  I am running this under Windows 7, on both a laptop and desktop.  This is observed on both computers, so does not appear to be a problem with the update process (and Firefox 47.0 appears to run fine, otherwise).  

Installing one of the previous versions of Firefox solved the problem on both Windows 7 computers.  Firefox 46.0.1 works with Selenium WebDriver 2.53.0 for Python, under Windows 7.  Firefox 45.2.0esr (64-bit version; I didn't test the other version) also works with Selenium.

Lusine Hovsepyan

unread,
Jun 15, 2016, 8:42:27 AM6/15/16
to Selenium Users
I have same problem with FF47.0 and selenium 2.53.5 on Windows 7  and i still haven't solve this problem

воскресенье, 30 августа 2015 г., 12:24:34 UTC+4 пользователь Robert Spotswood написал:
Reply all
Reply to author
Forward
0 new messages