protractor-jasmine2-screenshot-reporter icon indicating copy to clipboard operation
protractor-jasmine2-screenshot-reporter copied to clipboard

Doesn't seem to work inside a new tab/window?

Open menehune23 opened this issue 7 years ago • 0 comments

How would I take a screenshot during a failure inside a piece of code like this?

browser.getAllWindowHandles().then(handles => {
  browser.switchTo().window(handles[1]);
  page.getSomeElement().click().then(() => fail());
});

Something like this will generate a screenshot, but it is of the main browser window (handle 0), not the new tab/window.

menehune23 avatar Dec 23 '17 13:12 menehune23