mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 01:47:00 +01:00
Expand error details before taking screenshot (#15779)
This commit is contained in:
parent
216f76646e
commit
9cf401bb92
@ -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…
Reference in New Issue
Block a user