18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
What Firefox Profile Information are needed?
Hello,
I am trying to write an automatic setup script with Ant to run Sahi scripts nightly on a "fresh" system. I. e. always with the same preconditions. Doing so with Sahi V2 Release 20080831 I have a problem doing Firefox tests:
A dialog always pops up telling me that there is already an instance of Firefox running. Searching through this forum I found the thread Problem with running ant (Topic ID 67... sorry I am not allowed to post links yet) which gave me a hint: Sahi seems to add profile information to workaround this dialog box.
Up to now I only saved the file prefs.js to keep the information in our VCS small. Now it seems as if the following files are required:
* compatibility.ini
* extensions.ini
* extensions.rdf
* prefs.js
I have no problem placing the last three ones into the VCS. But I don't lilke to add compatibility.ini as it contains platform/machine specific information:
* Is compatibility.ini really required?
* Is there any way to trigger the creation without having to deal with this dialog box?
Any suggestions? Help welcome.
Kind Regards
Thragor
I am trying to write an automatic setup script with Ant to run Sahi scripts nightly on a "fresh" system. I. e. always with the same preconditions. Doing so with Sahi V2 Release 20080831 I have a problem doing Firefox tests:
A dialog always pops up telling me that there is already an instance of Firefox running. Searching through this forum I found the thread Problem with running ant (Topic ID 67... sorry I am not allowed to post links yet) which gave me a hint: Sahi seems to add profile information to workaround this dialog box.
Up to now I only saved the file prefs.js to keep the information in our VCS small. Now it seems as if the following files are required:
* compatibility.ini
* extensions.ini
* extensions.rdf
* prefs.js
I have no problem placing the last three ones into the VCS. But I don't lilke to add compatibility.ini as it contains platform/machine specific information:
[Compatibility]
LastVersion=2.0.0.11_2007112718/1.8.1.11_2007112718
LastOSABI=WINNT_x86-msvc
LastPlatformDir=D:\Programme\Mozilla Firefox
Now I am unsure what to do:* Is compatibility.ini really required?
* Is there any way to trigger the creation without having to deal with this dialog box?
Any suggestions? Help welcome.
Kind Regards
Thragor
Comments
This is used as a template for all the instances started via the suite runner.
When Sahi is started, it checks in sahi/browser/ff/profiles for folders named sahi0, sahi1, sahiN, which are copies of the ff_profile_template.
If they are not found, Sahi copies ff_profile_template to these sahiN folders.
What you need to do is open FF with the ff_profile_template, make changes according to what you want, and then check that folder into CVS. Delete the folders inside sahi/browser/ff/profiles and when Sahi restarts it will recreate those folders from the template.
To open FF with the profile template, open a command prompt and type the following: I have this in a script called fix_ff_profile.bat in sahi/bin folder.
SET MOZ_NO_REMOTE=1 is required to force FF to open 2 different processes for 2 profiles. Otherwise it will reopen the last profile that was used.
You can use about:config to make your modifications on firefox.
If this contains invalid values, e. g. the path of the Firefox installation, the registration process is triggered... and this again raises the strange dialog. The path differs on the different installations. E. g. it's on drive "D:" and not "C:".
So to finally work around this bug I need the profile be updated before the tests start. May be I can manage it by executing Firefox just before and killing it with tskill (on Windows)... but it would be great to have a better solution.
Side Note:
Many of the files in the default template folder can really be deleted especially as they are huge. E. g.:
* XUL.mfl is cached user interface data (see description for Firefox Profile Folder: kb.mozillazine.org/Profile_folder_-_Firefox). I doubt that this is required.
* XPC.mfl is a cache for components (unknown at the page quoted above; but for Thunderbird it got described this way). Thus I think this can also safely be deleted.
Deleting them saves already 2,3 MB (of 2,7 MB the profile currently has).
First of all I really only need the file prefs.js of the profile. It sets for example which language to choose and especially the proxy settings for java:
To prevent this dialog "firefox running" all you need to do is: Start Firefox once for profile initialization and afterwards continue with the tests. I therefore created a suite "empty.suite":
And a corresponding Sahi file "empty.sah":
Now I first start this empty suite and afterwards the real suite and everything is fine.