Reputation: 52665
After some system updates I'm not able to run webdriver
with Firefox
using
from selenium import webdriver
driver = webdriver.Firefox()
I get following exception:
selenium.common.exceptions.WebDriverException:
Message:
Expected browser binary location, but unable to find binary in default location,
no 'moz:firefoxOptions.binary' capability provided,
and no binary flag set on the command line
so I'm wondering what is this default location
and, more important, where it defined (script name) so I can set new value or use existed to copy binary into it? I used debugger in PyCharm
to find some tips, but with no luck...
Currently Firefox
installed into C:\Program Files (x86)\Mozilla Firefox
P.S. I know that I can use Firefox Profile
, FirefoxBinary
, specify path to geckodriver.exe
etc, but I'm not searching for this kind of solution
Upvotes: 3
Views: 2314
Reputation: 314
By default selenium will look into the path - C:\Program Files (x86)\Mozilla Firefox\
Please uninstall older one and install firefox using the link - http://filehippo.com/download_firefox/67599/
you can also look into - Setting path to firefox binary on windows with selenium webdriver
Upvotes: 2