SeleniumWD 3.0.2, Firefox 51.0.1, Python 3.5.2 When trying to use Firefox in a banal way:

from selenium import webdriver driver = webdriver.Firefox() 

I get this picture:

 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 

that is, it does not find binaries. It is possible to register the path to the binary, but I would like without these dances with a tambourine.

    1 answer 1

    You need to specify the path to the driver. Chrome example:

     driver = webdriver.Chrome('C:/Users/user/Desktop/chromedriver.exe') 

    The driver can be downloaded .