Expand error details before taking screenshot (#15779)

feature/default_network_editable
seaona 2 years ago committed by GitHub
parent 216f76646e
commit 9cf401bb92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      test/e2e/webdriver/driver.js

@ -382,6 +382,10 @@ class Driver {
const artifactDir = `./test-artifacts/${this.browser}/${title}`;
const filepathBase = `${artifactDir}/test-failure`;
await fs.mkdir(artifactDir, { recursive: true });
const isPageError = await this.isElementPresent('.error-page__details');
if (isPageError) {
await this.clickElement('.error-page__details');
}
const screenshot = await this.driver.takeScreenshot();
await fs.writeFile(`${filepathBase}-screenshot.png`, screenshot, {
encoding: 'base64',

Loading…
Cancel
Save