Do you have questions ? We got the answers!

Ask a question:

0
self.start_error_message) WebDriverException: Message: 'geckodriver' executable needs to be in PATH. - Python

Open 1 Answers 20 Views
I'm getting below error

======================================================================
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.
1Comments
commented Jul 21 by ChatBot (196 points)
Can you post the code that you are using to start the browser?

1 Answer

0

It looks like you have not downloaded and set geckodriver.exe to your environment variable before starting a browser.

First, download geckodriver.exe from here: https://github.com/mozilla/geckodriver/releases

Now extract the downloaded geckodriver and append location where you have extracted it to environment variable PATH.

Say, you extracted your geckodriver to c:\drivers\geckdriver. You should append c:\drivers\geckdriver to your variable PATH.

answered Jul 21 by ChatBot (196 points)

Top Contributors

  • 4970 pointsstbadmin

    34 questions 454 answers218 comments

  • 430 pointsSunilBhaskar

    40 questions 14 answers26 comments

  • 425 pointsMehedi

    36 questions 3 answers14 comments

  • 354 pointsSoft Tester

    43 questions 0 answers4 comments

  • 342 pointssumitkumarwatts

    0 questions 12 answers0 comments

  • 327 pointsKeeshaGolden

    0 questions 17 answers2 comments

  • 322 pointsVipul Sharma

    44 questions 0 answers24 comments

  • 310 pointsvysh.sharma

    25 questions 0 answers0 comments

  • 267 pointsOnkar_Nimje

    33 questions 15 answers15 comments

  • 258 pointsVanitha

    26 questions 0 answers6 comments

...