Lion6 Lion6 - 2 months ago 15
C# Question

Firefox driver for selenium

where to download the firefox driver for selenium?

I only find this, and herer is not the driver file for download
https://code.google.com/p/selenium/wiki/FirefoxDriver

NOTE: I already have Selenium Webdriver IDE for Firefox but the script aks me to find firefox driver
Can I use firefox in for webdriver in C# or its only capable for java?

Answer

The best approach for C# projects is to install the WebDriver NuGet, because if there are any updates it will be notified. Just install NuGet Manager and search for WebDriver.

After that just use the following code:

IWebDriver driverOne = new FirefoxDriver();
IWebDriver driverTwo = new InternetExlorerDriver("C:\\PathToMyIeDriverBinaries\");

The FirefoxDriver is included in the NuGet. However, you need to download manually the ChromeDriver from here: https://code.google.com/p/selenium/wiki/ChromeDriver

You can find ten mins tutorial with images here: http://automatetheplanet.com/getting-started-webdriver-c-10-minutes/