Using multiple Firefox profiles from Squish for Web

Using multiple Firefox profiles from Squish for Web

Introduction

All web browsers, when running, store data in a ‘profile’ directory, which contains things like bookmarks, cache, cookies, and offline data. When developing automated regression tests with Squish for Web, the data in the profile can change the behavior of the browser, and sometimes even cause some passing tests to fail.

Management of the browser’s profile directory is important in such cases, and this article shows you how to manage multiple profile directories when using Firefox as your chosen browser. The concept is the same for other browsers.

Firefox Profiles

When Firefox starts, it must use a profile directory to read and store its data. This data includes cache, cookies, bookmarks, and installed extensions. If a second Firefox concurrent process is started, it must use a different profile directory, because it will not be able to read or write to a profile that is currently in use.

Squish already starts Firefox with a custom default location for its profile data, so that it does not clash with the default Firefox user profile, and it can run independently of a user’s Firefox process. The default location of this profile is ~/.squish/squish_firefox_profile_dir/ (or under $SQUISH_USER_SETTINGS_DIR/). However, this custom location can be changed in a Squish script before starting an additional browser process, so that it is launched using yet another profile. Multiple profiles are useful when you need to test different users/sessions doing things against the same website, for example. Multiple profiles also allow for concurrent browser processes to be running different tests at the same time.

We have a Knowledgebase article with further details on How to manage multiple Firefox profiles in Squish

Trainer and Consultant for Froglogic and Qt. Co-author of "Introduction to Design Patterns in C++ and Qt"

0 Comments

Leave a reply

Your email address will not be published. Required fields are marked *

*