Reputation: 141
I am using
I have set the geckodriver's path in PATH
but still I am getting the below error while running the test:
selenium.common.exceptions.WebDriverException: Message: Service geckodriver unexpectedly exited. Status code was: 2
Also, in geckodriver.log
in my home directory below is displayed:
Usage: geckodriver [OPTIONS] geckodriver: Unknown option --port
Upvotes: 4
Views: 7518
Reputation: 2573
It sounds like you may be using an older version of geckodriver. Do you know what version you're using? The latest version is 0.11.1
Upvotes: 1
Reputation: 2381
binary = FirefoxBinary('path/to/installed firefox binary')
browser = webdriver.Firefox(firefox_binary=binary)
Also dont forget to restart after setting path.
Upvotes: 1