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

0 votes
May 22, 2019 in Selenium by Vijay
263 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, 2019 by Abha
• 27,950 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, 2019 in Selenium by Anvi
• 14,110 points
863 views
0 votes
1 answer

Can anyone demonstrate how navigation commands can be used on a webpage in Selenium?

Hey Amanprit, Navigation Commands are used to ...READ MORE

answered Jul 4, 2019 in Selenium by Anvi
• 14,110 points
102 views
0 votes
2 answers

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,520 points
4,019 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,966 views
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,890 points
2,907 views
+1 vote
2 answers
0 votes
1 answer

Which methods which can be used to handle pop-up and alerts in Python Selenium Webdriver?

Hey Kishor, Python Selenium webdriver provides following ...READ MORE

answered Jul 29, 2019 in Selenium by Abha
• 27,950 points
116 views