Skip to content

Commit 4ed055c

Browse files
committed
fix: screenshots for sessions
1 parent 117c6c1 commit 4ed055c

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lib/helper/WebDriver.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1788,14 +1788,14 @@ class WebDriver extends Helper {
17881788

17891789
if (browser) {
17901790
this.debug(`Screenshot of ${sessionName} session has been saved to ${outputFile}`)
1791-
return browser.saveScreenshot(outputFile)
1791+
await browser.saveScreenshot(outputFile)
17921792
}
17931793
}
17941794
}
17951795

17961796
if (!fullPage) {
17971797
this.debug(`Screenshot has been saved to ${outputFile}`)
1798-
return this.browser.saveScreenshot(outputFile)
1798+
await this.browser.saveScreenshot(outputFile)
17991799
}
18001800

18011801
const originalWindowSize = await this.browser.getWindowSize()

test/acceptance/session_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Scenario('Different cookies for different sessions @Playwright @Puppeteer', asyn
7777
I.expectNotEqual(cookies.john, cookies.mary)
7878
})
7979

80-
Scenario('should save screenshot for sessions @Puppeteer @Playwright', async function ({ I }) {
80+
Scenario('should save screenshot for sessions @Puppeteer @Playwright @WebDriver', async function ({ I }) {
8181
await I.amOnPage('/form/bug1467')
8282
await I.saveScreenshot('original.png')
8383
await I.amOnPage('/')

0 commit comments

Comments
 (0)