We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb22be8 commit 153012cCopy full SHA for 153012c
lib/helper/WebDriver.js
@@ -1800,6 +1800,13 @@ class WebDriver extends Helper {
1800
1801
const originalWindowSize = await this.browser.getWindowSize()
1802
1803
+ // this case running on device, so we could not set the windowSize
1804
+ if (this.browser.isMobile) {
1805
+ this.debug(`Screenshot has been saved to ${outputFile}, size: ${originalWindowSize.width}x${originalWindowSize.height}`)
1806
+ const buffer = await this.browser.saveScreenshot(outputFile)
1807
+ return buffer
1808
+ }
1809
+
1810
let { width, height } = await this.browser
1811
.execute(function () {
1812
return {
0 commit comments