Skip to content

Commit

Permalink
fix(webdriver): screenshots for sessions (#4748)
Browse files Browse the repository at this point in the history
* fix: screenshots for sessions
  • Loading branch information
kobenguyent authored Jan 17, 2025
1 parent 117c6c1 commit cb22be8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/helper/WebDriver.js
Original file line number Diff line number Diff line change
Expand Up @@ -1788,14 +1788,14 @@ class WebDriver extends Helper {

if (browser) {
this.debug(`Screenshot of ${sessionName} session has been saved to ${outputFile}`)
return browser.saveScreenshot(outputFile)
await browser.saveScreenshot(outputFile)
}
}
}

if (!fullPage) {
this.debug(`Screenshot has been saved to ${outputFile}`)
return this.browser.saveScreenshot(outputFile)
await this.browser.saveScreenshot(outputFile)
}

const originalWindowSize = await this.browser.getWindowSize()
Expand Down

0 comments on commit cb22be8

Please sign in to comment.