Quaatso Education

Home Forums Selenium Forum Not able to open any page in firefox browser Reply To: Not able to open any page in firefox browser

Reply To: Not able to open any page in firefox browser

Home Forums Selenium Forum Not able to open any page in firefox browser Reply To: Not able to open any page in firefox browser

#4003
Profile photo of Nandan Singh
Nandan Singh
Keymaster

Shobhna, in this problem, Webdriver is not able to find default Firefox executable file. This can be solved by providing default profile of your Firefox Driver.

For providing default profile use following step :

1. Enter following string in windows run : %APPDATA%\Mozilla\Firefox\Profiles\

2. It will open folder where your default profile of Firefox is saved.

3. Open default profile folder and copy entire path. It will be like “C:\Users\home\AppData\Roaming\Mozilla\Firefox\Profiles\9xj5wht8.default”

4. Now create Firefox profile in your script and invoke firefox. This will be looked like:

File path = new File(“C:\\Users\\home\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\9xj5wht8.default”);

FirefoxProfile profile = new FirefoxProfile(path);

FirefoxDriver driver = new FirefoxDriver(profile);

driver.get(“https://www.facebook.com/”);

Hope this will resolve your problem.