Skip to content Skip to sidebar Skip to footer

Notadirectoryerror: [errno 20] Not A Directory: '/home/ghost/automation/pwd/geckodriver' With Geckodrriver Firefox And Selenium Using Python3

im using pycharm and my pythn version 3.6.7 pip 9.0.1 and selenium version selenium-3.141.0 urllib3-1.24.1 i install selenium using this commands pip3 install selenium the

Solution 1:

In Brief

Need to use the param key executable_path

In Details

While working with GeckoDriver, Firefox and Selenium, you need to use the Keyexecutable_path and the Value set to the absolute path of the GeckoDriver within single quotes i.e. '...' with forward slash i.e. / as path separator as follows:

driver = webdriver.Firefox(executable_path='/home/ghost/automation/pwd/geckodriver')

or use default location

driver = webdriver.Firefox(executable_path=GeckoDriverManager(cache_valid_range=1).install())

Solution 2:

I just put the geckodriver.exe file to my main project folder and identified link as: driver=webdriver.Firefox("D:\Desktop\project") without geckodriver, everything worked.

try whith

  • "/home/ghost/automation/pwd"

or

  • "\\home\\ghost\\automation\\pwd",
  • "\home\ghost\automation\pwd"

if you using Atom IDE maybe your problem is you run a .py file with a script package. It's working not same as cmd console

Post a Comment for "Notadirectoryerror: [errno 20] Not A Directory: '/home/ghost/automation/pwd/geckodriver' With Geckodrriver Firefox And Selenium Using Python3"