Reputation: 131
could anyone help please, I have this code:
*** Settings ***
Library Selenium2Library
*** Variables ***
${BROWSER} ff
${WEBSITE} http://www.google.com
*** Test Cases ***
Browser test
[Documentation] Google site.
[Tags] Tag.
Open Browser ${WEBSITE} ${BROWSER}
Close Browser
I think code is correct, but i get this error: webdriverexception message 'geckodriver' executable needs to be in path
I have:
I don't know, how to install webdriver? How to put it to the PATH?
I have no idea what's going on here, nowhere any guide. - I found only this, but don't understand, how to install that? How set the path? A what should I do with that code?
Upvotes: 0
Views: 18814
Reputation: 301
Use this tool https://github.com/rasjani/webdrivermanager
Just install it in your virtualenv with
pip install webdrivermanager
and then use next command to install latest webdriver version for browser
webdrivermanager chrome
Upvotes: 1
Reputation: 11
when you use Python. the best shortcut you can do is, put you 'geckodriver.exe' file in pythons script folder. and set the Script folder path in you system path. this will resolve your problem.
Upvotes: 1
Reputation: 23805
I don't know, how to install webdriver? How to put it to the PATH?
Actually now Selenium
is supporting executable geckodriver.exe
to launch Mozilla Firefox >= v47
just like other drivers.
To work around you need to download executable geckodriver.exe v0.8.0 for 32bit
and extract downloaded zip into your system at any location and set Syetem
property with webdriver.gecko.driver
to point with download executable geckodriver location as below :-
** Settings ***
Library OperatingSystem
*** Keywords ****
Set Environment Variable webdriver.gecko.driver path/to/geckodriver.exe
Upvotes: 2