phpunit-selenium
phpunit-selenium copied to clipboard
Get screenshots on errors also
I will be very helpful, if it was possible to get a screenshot on Errors also.
Can you be more precise?
- Selenium 1 or Selenium 2?
- Error defined as the E produced by PHPUnit (PHPUnit_Framework_Error exception) instead of an F in the test result?
E defined as the errors in PHPUnit. I do not want the screenshot instead of those produced on F, but in addition to. Using Selenium 2.22.0.
I added the test shown here, but it already passes (in the sense that the exception that gets thrown contains the path to a generated image). Can you give me a failing one?
Correct me if I am wrong. I assume that the screenshot capturing in SeleniumTestCase was being done on the same host as the selenium server is running, but with Selenium2TestCase::currentScreenshot() it is fetched to the local environment where the tests are executed from?
Yes; in Selenium 2 the Json Wire Protocol provides the screenshot as a BLOB accessible through a GET request, and it is fetched before closing the session.
Thanks mate
+1