0

1) My Firefox is installed on following path C:\Program Files\Mozilla Firefox\firefox.exe
2) I'm using Windows 7 64 bit version.
3) I'm using Firefox 46.0 version.
4) I'm using selenium-java-2.53.0 version.
5) Firefox profile is located on C:\Users\xxxxxx\automation

I created separate profile and tried to use same in code but still web driver is creating in anonymous temporary profile only. Please help me on this issue.

I have done these ways.

First Method

ProfilesIni profile = new ProfilesIni();    FirefoxProfile myprofile = profile.getProfile("automation");    
DesiredCapabilities capability = DesiredCapabilities.firefox();    capability.setCapability(FirefoxDriver.PROFILE, myprofile);   
driver = new FirefoxDriver(capability);

Second method

ProfilesIni profile = new ProfilesIni();    
FirefoxProfile myprofile = profile.getProfile("automation");   
driver = new FirefoxDriver(myprofile);

Third Method

FirefoxProfile myprofile =profile.getProfile("C:\\Users\\xxxx\\NewProfile");driver = new FirefoxDriver(myprofile);

Fourth Method

FirefoxProfile myprofile=new FirefoxProfile(new File("C:\\Users\\xxxxx\\NewProfile"));driver = new FirefoxDriver(myprofile);

Note: When I'm executing following command 'C:\Program Files\Mozilla Firefox\firefox.exe" -p' its showing 2 profile is available first is default and another one is I created for Automation in the name of automation and able to launch manually without any issues.

But when automation runs i executed "about:support" in firefox address bar and reviewed the profile folder its showing anonymous temporary profile only.

sampath
  • 33
  • 8
  • Instead of passing "automation" , provide path to the profile. Refer [this](http://stackoverflow.com/questions/40467460/firefox-error-your-connection-is-not-secure-while-launching-driver-with-selen/40882513#40882513) – peter pawar Feb 21 '17 at 09:48
  • Even i tried same but still creating new anonymous temporary profile, Please help me – sampath Feb 21 '17 at 11:41
  • Having this exact same issue. I've tried all of the above methods and I'm still getting a temporary profile. Windows 10 64bit, Firefox 55, selenium java 3.5.2 – Adam6806 Sep 04 '17 at 05:11

0 Answers0