How can Custom Firefox Profiles be created and used in Selenium?

0 votes
May 22 in Selenium by Vijay
37 views

1 answer to this question.

0 votes

Hi Vijay, to create Custom Firefox Profile and use it in Selenium, you can perform following steps:

  1. At the top of the Firefox window, click on the File menu and then select Exit.

    FF-Profile-1
  2. Press ‘Window + R’ to open Run dialog box. Type in: ‘firefox.exe -p' and then Click OK. 

    FF-Profile-3
  3. Click the ‘Create Profile’ button on the ‘Firefox – Choose User Profile’ window that comes up.

    FF-Profile-5
  4. Click ‘Next’ in the ‘Create Profile Wizard’ window that comes up.


     
  5. Type in a new name ‘customProfile’ in the ‘Enter new profile name’ box and click ‘Finish’. 


     
  6. Choose newly created profile and click "Start Firefox". 
  7. Once the Automation Profile is created, add the below code to your test scripts to Instantiating the Firefox Driver:
    ProfilesIni profile = new ProfilesIni();
    
    FirefoxProfile myprofile = profile.getProfile("customProfile");
    
    WebDriver driver = new FirefoxDriver(myprofile);
answered May 24 by Abha
• 24,440 points

Related Questions In Selenium

0 votes
1 answer
0 votes
1 answer

How selenium can be used in devops lifecycle?

Hey Catherine, as we know that a ...READ MORE

answered May 8 in Selenium by Anvi
• 13,400 points
42 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,090 points
762 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,002 views
0 votes
1 answer