I have a loop that checks for the existence of urls. If one does not exist Selenium exits: *XHR ERROR: URL = http://localhost/pages/156.php Response_Code = 404 Error_Message = Not Found.*
If i catch the exception:
try {
$this->selenium->open($url);
}
catch(PHPUnit_Framework_Exception $e) { echo "caught\n"; }
Anything i do afterwards gives me this error: ERROR Server Exception: sessionId should not be null; has this session been started yet?
I even tried to set the exception as expected:
$this->selenium->setExpectedException('PHPUnit_Framework_Exception');
But still the session is stopped and the test is completed. How can i make Selenium keep testing the urls? Thanks.