ag415
ag415

Reputation: 402

Selenium webdriver.Firefox() never returns

~/selenium-test$ which geckodriver
/cygdrive/c/Windows/geckodriver
~/selenium-test$ geckodriver --version | head -n1
geckodriver 0.11.1
~/selenium-test$ python -i
Python 2.7.12 (v2.7.12:d33e0cf91556, Jun 27 2016, 15:24:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> from selenium import webdriver
>>> driver = webdriver.Firefox()

It loads Firefox but never returns after that call. There is no way to run any additional python statements after instantiating the driver. Firefox version 56.0.1 (64-bit) on Windows.

Upvotes: 3

Views: 544

Answers (2)

Afsar Ali
Afsar Ali

Reputation: 605

You can try below code :

from selenium import webdriver
>>> driver = webdriver.Firefox(c://EnterpathtoGeckodriver.exe)

Upvotes: 0

ag415
ag415

Reputation: 402

Figured out the problem. The version of geckodriver I was using was not compatible with my version of Firefox (thanks Firefox auto-updates). Installed latest version of geckodriver (0.19) and it works fine now.

Upvotes: 2

Related Questions