Problem: Our selenium scripts started failing when we were running our tests on Firefox browser version 47 or higher. After a little bit of research we came to know that Selenium WebDriver 2.53.0 is not compatible with Firefox 47.0 or higher. The WebDriver component which handles Firefox browsers will be discontinued and we had to use geckodriver instead.
Why this post?
We learnt we need to upgrade to Selenium 3 and use Marionette or geckodriver to interact with Firefox version 47 or higher. In this post we would like to share set up issue which we faced and how we overcame them while setting up geckodriver in our system.
What is Geckodriver?
A Proxy for using W3C WebDriver-compatible clients to interact with Gecko-based browsers. It provides HTTP API described by the WebDriver protocol to communicate with Gecko browsers, such as Firefox (Version above 47).
When you are trying to install geckodriver and end up facing the below exception you need to make sure you have taken care of the below 3 steps. The common exception thrown is
“The path to the driver executable must be set by the webdriver.gecko.driver system property;”
a) Upgrade your selenium to latest version as geckodriver works with selenium 3 or higher
pip install selenium
b) Just like Chrome, Opera, Internet Explorer or Microsoft Edge, Firefox will also require an executable that will run alongside the browser.
Download geckodriver using this link
c) The Selenium client bindings will try to locate the geckodriver or wires executable path from the system path. Therefore you will need to add the directory containing it to the system path.
From the path where your firefox is installed (In my case its installed in $\python\Lib\site-packages\selenium\webdriver\firefox.webdriver.py), check for the attribute ‘executable_path’.
If you liked what you read, know more about Qxf2.
I am an engineer with about 10 years of experience in software development and testing. Prior to joining Qxf2, I worked with reputed companies like Dell and Infosys. They helped me gain good experience in the manufacturing and healthcare domains. My QA career started at Dell. I got exposure to various testing tools, processes and methodologies, got an opportunity to work on various platforms like JMS Hermes, SOAP UI, data integration, queues, etc. I chose Qxf2 because it allowed remote working. My interests are vegetable gardening using organic methods, listening to music and reading books.