giorgiosironi / phpunit-selenium

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

Get screenshots on errors also #135

Open lsolesen opened 12 years ago

lsolesen commented 12 years ago

I will be very helpful, if it was possible to get a screenshot on Errors also.

giorgiosironi commented 12 years ago

Can you be more precise?

lsolesen commented 12 years ago

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.

giorgiosironi commented 12 years ago

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?

jeffery commented 12 years ago

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?

giorgiosironi commented 12 years ago

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.

jeffery commented 12 years ago

Thanks mate

neoascetic commented 10 years ago

+1