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.
Automating firefox settings.
Hi,
Anybody having an idea if we can automate setting the values for the firefox settings variables (those we get on doing 'about:config' in the address bar) using sahi/javascript?
Actually while running suite through ant on firefox I get a message to restore session after one script has been executed and the suite runner tries to start another instance of firefox after closing the previous one. So I want to aumatically disable this setting through my script.
Thanks and regards,
Pankaj.
Anybody having an idea if we can automate setting the values for the firefox settings variables (those we get on doing 'about:config' in the address bar) using sahi/javascript?
Actually while running suite through ant on firefox I get a message to restore session after one script has been executed and the suite runner tries to start another instance of firefox after closing the previous one. So I want to aumatically disable this setting through my script.
Thanks and regards,
Pankaj.
Comments
This article details the Session Restore parameters and related files.
http://kb.mozillazine.org/Session_Restore
I'm thinking you might have to make a hybrid with some scripting language like AutoIT.
I will try it
Thanks,
-Jeff
If you are using ant or multithreaded playback, firefox uses one of the profiles that come with Sahi's installation. (That is why you don't need to turn on proxy manually for suite playback) I think your problem could be that a firefox instance was already running, or that the previous one was not killed properly, or MOZ_NO_REMOTE system variable was not set to 1.
The about:config variable you want is already set in these bundled profiles. You can have a look at
sahi\config\ff_profile_template\prefs.js
user_pref("browser.sessionstore.enabled", false);
user_pref("browser.sessionstore.resume_from_crash", false);
Tell me if I missed any other setting.
Thanks
Narayan
Jeff I would love to try the tool you made.
Narayan I set MOZ_NO_REMOTE = 1 in sahi.bat itself, so no problem in that. The problem must be in the profile I was using. I hope editing the pref.js will definitely solve my problem.
Thank you all for the quick help
Regards,
Pankaj.