Checkout our demo site to practice selenium https://magento.softwaretestingboard.com/

0 like 0 dislike
662 views
by
retagged by

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\Test_Cron4_PerformCruxAndCXIntegration.py", line 24, in setUpClass
cls.driver = commonObject.firefoxDriver()
File "D:\CRUX\crux-ui-automation\FunctionLibrary\CommonFunctions\Commonfunctions.py", line 34, in firefoxDriver
driver = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 142, in __init__
self.service.start()
File "C:\Python27\lib\site-packages\selenium\webdriver\common\service.py", line 81, in start
os.path.basename(self.path), self.start_error_message)
WebDriverException: Message: 'geckodriver' executable needs to be in PATH.

2 Answers

1 like 0 dislike
by Expert (748 points)
Download gecko driver and give the path like

System.setProperty("webdriver.firefox.marionette","path".exe");
0 like 0 dislike
by Master (1.2k points)

It's looking for geckodriver.

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

https://github.com/mozilla/geckodriver/releases

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

...