'chromedriver' executable needs to be in PATH. Robot framework pycharm

前端 未结 6 1142
时光取名叫无心
时光取名叫无心 2020-12-22 07:29

I am new to Robot framework and I have followed all set up related steps from this link, however, I am getting some error which I am not able to identify. Anybody, please h

相关标签:
6条回答
  • 2020-12-22 07:39

    also make sure the name of the chrome driver is chromedriver.exe, renaming would cause issue in opening

    0 讨论(0)
  • 2020-12-22 07:45

    Using the keyword Set Environment Variable can work. You can use the strings Path and path/to/folder that contains chromedriver.exe as parameters.

    0 讨论(0)
  • 2020-12-22 07:47

    If you are looking to set it up for mac, then place the chrome driver in this path /usr/local/bin/{your chromedrive exe file}

    0 讨论(0)
  • 2020-12-22 07:54

    Got it, After doing some research, I found this:

    For windows, chromedriver should be placed under /Python27/Scripts

    and now its working fine, Thanks everyone

    0 讨论(0)
  • 2020-12-22 07:55

    As highlighted by Bryan Oakley, this is quite a common error and as such finding a solution for it shouldn't be too difficult. For this reason I'm not going to answer the obvious

    "Chrome Driver is not in %PATH%" error.

    In your script you tried to set a custom path to the ChromeDriver which is something that can be useful on occasions. You tried to set the environment variable webdriver.chrome.driver which does not work, because the Python binding does not check it for the chromedriver executable.

    However, it is possible to provide the executable at the instantiation of the chromedriver. In Robot Framework SeleniumLibrary this is done using executable_path parameter. This then results in the following example:

    Create Webdriver    Chrome    executable_path=C:/WebDrivers/chromedriver.exe
    Go To    http://cnn.com
    
    0 讨论(0)
  • 2020-12-22 07:59

    This is the right solution

    Create Webdriver    Chrome    executable_path=C:/WebDrivers/chromedriver.exe
    Go To    http://cnn.com
    
    0 讨论(0)
提交回复
热议问题