My Firefox 5 is installed not at the default location. So, I tried with the following to create a FirefoxDriver:
private IWebDriver driver;
[SetUp]
public void SetupTest()
{
var ffBinary = new FirefoxBinary(@"D:\Program Files (x86)\Firefox 4\firefox.exe");
var firefoxProfile = new FirefoxProfile(@"C:\Users\xyz\AppData\Roaming\Mozilla\Firefox\Profiles\2z4r45zq.default");
driver = new FirefoxDriver(ffBinary, firefoxProfile);
}
But the FirefoxBinary instantiation throws an exception, stating that:
"The system cannot find the file specified". But my firefox.exe is there. Also, I added it to my PATH. I saw some suggestion to use webdriver.firefox.bin in java environment. Is there any equivalent in .NET environment?
BTW, I am using Win 7(64), Firefox 5, Selenium 2 .NET webdriver. Thanks