Join 500+ Software Testing professionals. Solve problem and get your problem solved. Register Now!

WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

Open 2 Answers 129 Views
0 2

I am getting an error while executing tests.

ERROR: setUpClass (__main__.Test_Cron4_CruxCxRestIntegration_cron4)
Traceback (most recent call last):
File "D:\CRUX\crux-ui-automation\Testcases\", line 24, in setUpClass
cls.driver = commonObject.firefoxDriver()
File "D:\CRUX\crux-ui-automation\FunctionLibrary\CommonFunctions\", line 34, in firefoxDriver
driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\", line 142, in __init__
File "C:\Python27\lib\site-packages\selenium\webdriver\common\", line 81, in start
os.path.basename(self.path), self.start_error_message)
WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

2 Answers

Download gecko driver and give the path like

answered by (748 points)

It's looking for geckodriver.

Download geckodriver from below location and add it to your PATH variable.

Exit existing command line and reopen the same. This should help you.

answered by (872 points)

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:
To avoid this verification in future, please log in or register.