Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

keeping selenium browser open with phpunit/selenium

when the tests fail, the browser that the selenium tests were running on closes. this is unhelpful when trying to debug. i know i have the option of a screen shot upon failure, but that doesn't help without the entire context. with the browser still available, i can hit back and inspect what was going on.

is there a way to keep the browser open even when asserts fail or elements aren't found?

like image 724
tipu Avatar asked May 09 '11 17:05

tipu


1 Answers

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

like image 143
tipu Avatar answered Oct 11 '22 09:10

tipu