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 failu
A simple solution is to set the session $stopped property to true, in the test setUp() method. As the property is private, we need to use the Reflection api.
function setUp() {
....
// Set the private property $stopped of session to true, so the window is not closed on error or at the end of tests
$myClassReflection = new \ReflectionClass( get_class( $this->prepareSession() ) );
$secret = $myClassReflection->getProperty( 'stopped' );
$secret->setAccessible( true );
$secret->setValue( $this->prepareSession(), true );
...
}