keeping selenium browser open with phpunit/selenium keeping selenium browser open with phpunit/selenium selenium selenium

keeping selenium browser open with phpunit/selenium


figured it out randomly many weeks later.

when starting the server, use the option -browserSessionReuse at the end. this will keep one browser session open throughout the tests and not close on failure


You might be calling selenium.stop() at the end of the test. You need to comment out that line of code and make sure that your selenium object is not destroyed at the end of the test. This will keep the window open. Same question has been answered here


Regarding the answer about -browserSessionReuse at https://stackoverflow.com/a/6904808/654026, keep in mind that you will have to deal with cleaning the cookies between tests executions. Otherwise you may have difficult to debug errors.