giorgiosironi / phpunit-selenium

Selenium RC integration for PHPUnit
http://www.phpunit.de/
Other
600 stars 271 forks source link

Rely on status codes for error handling #350

Closed PieterDC closed 9 years ago

PieterDC commented 9 years ago

Don't only throw exceptions if HTTP code is 500. Rely on the status ccde, like https://github.com/facebook/php-webdriver does. See https://github.com/facebook/php-webdriver/blob/community/lib/Remote/HttpCommandExecutor.php#L259-L287

We had to fix this because, for a currently unknown reason, the Selenium server on Browserstack started returning HTTP code 200 for exceptions instead of code 500. Therefor, no error was thrown with the phpunit-selenium Driver code.

giorgiosironi commented 9 years ago

Trying to merge, we may have a conflict with an earlier PR about 400 response codes, but it should be logically compatible.