I am running some tests in a variety of web browsers, starting them up from a script file. The process is supposed to be completely automated. However, if a browser closed incorrectly the last time it ran, it may start up and wait for a user interaction.

Are there command line options to make browsers forget that they closed badly last time? The browsers I'm using are IE8, and the latest versions of Firefox, Safari, Opera and Chrome.

link|improve this question
feedback

1 Answer

up vote 2 down vote accepted

For Firefox, you could achieve this effect by overwriting the user profile with a clean copy before you launch it. (You'd probably get more consistent test results, too assuming you're not testing for the cumulative results of sequential sessions). You can probably do something similar with the other browsers' .plist, .ini, etc. files. You could even export clean IE settings from Windows' registry and re-import them to re-initialize IE (but I'd probably only try it with a system I could afford to disable).

link|improve this answer
Thanks. I think your approach is probably the best one I'll find. Unfortunately a bit more work than I was hoping for, but there we go. – Charles Anderson Jul 22 '10 at 12:21
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.