Welcome to the Question and Answer site for Software Testing Professionals

You can get your queries resolved from Software Testing Professionals.

Ask a Question

Get answers and give answers to questions from other members.

View All Questions

Get votes and earn points to build your reputation in community.

View Hot Questions

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

Open 1 Answers 28 Views
0 1
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__
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.
commented by (200 points)
Can you post the code that you are using to start the browser?

1 Answer


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 by (200 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.

We have resolved 1.2k+ Software Testing queries!

Software Testing Board Weekly update

We will send you handpicked questions that you would love to answer.

View previous campaigns.

Top Contributors