Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
2 views
in DevOps and Agile by (47.6k points)

I wanted to use Selenium with all the 3 Browsers, So, I wrote the following different codes:

FirefoxDriver driver = new FirefoxDriver();

ChromeDriver driver = new ChromeDriver();

InternetExplorerDriver driver = new InternetExplorerDriver();

With Chrome and IE, it works fine, but it throws the following error with firefox:

"The geckodriver.exe file does not exist in the current directory or in a directory on the PATH environment variable"

Why does firefox require gecko driver?

1 Answer

0 votes
by (106k points)

The reason why in selenium firefox requires GeckoDriver is:

Till the version 47 of Mozilla Firefox, there was no need of gecko driver. But after the release of the Mozilla Firefox version 47, which comes with Marionette, which is an automation driver for Mozilla's which can remotely control either the UI or the internal JavaScript of a Gecko platform, such as Firefox. That is the reason we require GeckoDriver for FireFox. 

Browse Categories

...