Concept Of Firefox Profile:
The only browser Firefox which supports profiling feature.If a user wants to customize the settings, Firefox can customize it by using Firefox profile.This profiling feature is not there in Chrome & IE. The key feature is every profile would have its own settings added and you can create as many profile as you can.
How To Create Profile?
2.Go to run -> type firefox.exe -p Profilemanager -> OK
3.Create Profile -> Next
4.Enter the new Profile name -> Finish [Then this particular file will be created]
5.Select that new profile -> click on Start Firefox button, it will open a fresh Firefox which will not have any settings, bookmarks saved/added earlier for the default profile. Here, for this new profile you can customize your settings, bookmarks and all.
How To Open Profile?
Whenever Selenium starts Firefox, it will create its own profile when you start it and then that profile gets automatically destroyed when program terminates.
When we want to use the existing profile instead to open new profile under some circumstances, below is syntax to open any existing profile user wants to open through Selenium:
These 2 classes are used - ProfileIni, FireffoxProfile
//ProfileIni, FireffoxProfile
ProfilesIni profile = new ProfilesIni();
FirefoxProfile p = profile.getProfile("profile_name");
FirefoxDriver driver = new FirefoxDriver(p);
Establishing Proxy In Firefox Profile:
Proxy- Proxy behaves as an intermediate between user and server.If you want a request to be sent through proxy server, then the machine needs to be connected with the proxy server.Proxy server validates the request whatever sent, assigns IP then sends the request to the requested site.
Here are the steps to establish proxy in Firefox profile -
The only browser Firefox which supports profiling feature.If a user wants to customize the settings, Firefox can customize it by using Firefox profile.This profiling feature is not there in Chrome & IE. The key feature is every profile would have its own settings added and you can create as many profile as you can.
How To Create Profile?
2.Go to run -> type firefox.exe -p Profilemanager -> OK
3.Create Profile -> Next
4.Enter the new Profile name -> Finish [Then this particular file will be created]
5.Select that new profile -> click on Start Firefox button, it will open a fresh Firefox which will not have any settings, bookmarks saved/added earlier for the default profile. Here, for this new profile you can customize your settings, bookmarks and all.
How To Open Profile?
- If you want to open some other profile or to want to go back to the default one, then you need to close the Firefox browser from File -> Exit menu.
- Go to run -> type firefox.exe -p Profilemanager -> OK
- Then you can open the profile you want to browse.
Whenever Selenium starts Firefox, it will create its own profile when you start it and then that profile gets automatically destroyed when program terminates.
When we want to use the existing profile instead to open new profile under some circumstances, below is syntax to open any existing profile user wants to open through Selenium:
These 2 classes are used - ProfileIni, FireffoxProfile
//ProfileIni, FireffoxProfile
ProfilesIni profile = new ProfilesIni();
FirefoxProfile p = profile.getProfile("profile_name");
FirefoxDriver driver = new FirefoxDriver(p);
Establishing Proxy In Firefox Profile:
Proxy- Proxy behaves as an intermediate between user and server.If you want a request to be sent through proxy server, then the machine needs to be connected with the proxy server.Proxy server validates the request whatever sent, assigns IP then sends the request to the requested site.
Here are the steps to establish proxy in Firefox profile -
- File -> Exit
- Go to run -> type firefox.exe -p Profilemanager -> OK
- Select Profile
- Set proxy server manually Go to Tools -> Options -> Advanced -> Network -> Settings -> Proxy url in connection settings
- Then you can open this particular profile with Selenium with this proxy settings.