0 votes
1 view
in DevOps and Agile by (19.8k points)

Where does Selenium WebDriver (a.k.a Selenium 2) get the anonymous profile that it uses when it opens FirefoxDriver? If it used the default for Firefox, %appdata%/roaming/mozilla/firefox/profiles, then if I were to disable a firefox plugin, it should be disabled for Selenium WebDriver also, so why isn't it?

1 Answer

0 votes
by (63.4k points)

While using Firefox in Selenium WebDriver 3.0, it will start a default profile automatically.

But, you can create your own profile and you can name it according to your choice.

Then you can use the below code:

 Profiles profile = new Profiles();

 FirefoxProfile fprofile = profile.getProfile("MyProfile");

 WebDriver driver = new FirefoxDriver(fprofile);

Using this your Firefox Profile will start with a new profile always. You can change the settings according to your choice.

Welcome to Intellipaat Community. Get your technical queries answered by top developers !