Overview¶
Firefox allows only one running instance of itself per Firefox profile. To execute further instances of Firefox at the same time the additional instances must each be configured to use a different Firefox profile.
Creating additional Firefox profiles¶
Step 1 - Create the desired Firefox profiles. (Close Firefox, start cmd.exe, execute "C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P
(in cmd.exe) to start Firefox with the Profile Manager. Create a profile.)
Step 2 - Use the profile with Firefox at least once to initialize it. ("C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P profile_name_here
)
Step 3 - Close Firefox.
Step 4 - Explicitly switch back to the "normal" profile to make it the default again. ("C:\Program Files (x86)\Mozilla Firefox\firefox.exe" -P
, select profile, check Use the selected profile without asking at startup
, click Start Firefox
).
Step 5 - Close Firefox.
Step 6 - Run Squish' setup again to register the required Squish extension in all profiles again, including the new one.
Prepare switching of Firefox profiles¶
Step 1 - Create one copy of %appdata%\Mozilla\Firefox\profiles.ini
for every profile that you need (including the default profile). (For example profile.ini.default
, profiles.ini.squish_profile
, etc.)
Step 2 - In each of the copies of profile.ini
move the line...
...to the profile entry that this copy of profile.ini
is meant for.
Use custom Squish for Web package¶
Use a Squish for Web package with a simple patch that adds "-no-remote" as an additional parameter to firefox.exe. (This is required to make Firefox really switch to the profile. When not specified it will just instruct the already running Firefox instance to show a new window.) Please contact Squish technical support to obtain such a package.
Switch Firefox Profiles in Test Script¶
To switch to a profile simply copy "profiles.ini.xyz" over "profiles.ini", then start the browser. Here is an example script that does that: