Is there a way to freeeze Selenium-RC execution on error? Is there a way to freeeze Selenium-RC execution on error? selenium selenium

Is there a way to freeeze Selenium-RC execution on error?


Depending on how you're running your RC tests, you could set a breakpoint in your IDE and run the test in debug mode. For example I use Eclipse to run tests using Java. Another option is to put a long pause in your test, just make sure you remove it again afterwards..!


I am running selenium rc tests as part of my test suite, so I just fire up --pdb (in python) and script pauses when exception occurs - before tearDown that closes the browser is invoked.

I have also had a plugin where I took a screenshot when something went wrong.


If you are using JUnit and SeleniumTestCase, you can add an empty tear down method to your test code which should prevent the browser from shutting down by overriding the base SeleniumTestCase tear down method. I use this on failing tests which I need to examine the resulting browser state after a failure.