Get help with testing, discuss unit testing strategies etc.
Hello,
I know that there is method to take screenshots
{screenshot:'myScreen.png'}
Is it possible to subscribe to some event, that on any test event the screenshot will be captured.
Or maybe siesta has some tool to do that?
Moreover, is it possible to take screenshot, running tests, via phantomJS?
Yes this is possible and easy. Screenshots are only supported in WebDriver.
var failCounter = 0;
Harness.on('testupdate', function(ev, test) {
if (test.getFailCount() > failCounter) {
failCounter = test.getFailCount();
test.screenshot(test.url, function() {
})
}
})
Than you very much