mfs_manashr
mfs_manashr

Reputation: 1

Browser profile in selenium

I have a doubt on how a profile of a browser affects the output of a Selenium script.

Following are the different scenarios:

  1. If any profile is not specified in the Selenium script, then what profile is opened by Selenium? Is it the default profile the browser has or any new profile assigned by Selenium Webdriver?

  2. Let say there is a profile "ABC" specified in a Selenium script. If the script clicks on a link that opens a new window then the new window has which profile? Is it in the same profile "ABC" or any different profile?

  3. If profiles of a different windows are different then has it any effect on cookies and session?

Upvotes: 0

Views: 2184

Answers (1)

Petr Janeček
Petr Janeček

Reputation: 38424

  1. This differs slightly from browser to browser.
    • On IE, there are obviously no profiles, so the default one is used.
    • On FF and Chrome (I don't know about Opera), if there's no profile specified, Selenium opens up with a new, clean profile every time.
  2. Any new window opened by WebDriver is of course opened via the current profile. Once WebDriver is instantiated, it used the assigned profile.
  3. All cookies and sessions behave according to the profile settings.

Upvotes: 2

Related Questions