We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 986fcfa commit 8655988Copy full SHA for 8655988
packages/webdriver-image-comparison/src/commands/saveWebElement.ts
@@ -90,7 +90,8 @@ export default async function saveWebElement(
90
isIOS,
91
isLandscape,
92
// When the element needs to be resized, we need to take a screenshot of the whole page
93
- fallback: !!saveElementOptions.method.resizeDimensions || false,
+ // or when devicePixelRatio is different than 1 as the browser takeElementScreenshot does not consider DPR
94
+ fallback: (!!devicePixelRatio && devicePixelRatio > 1) || !!saveElementOptions.method.resizeDimensions || false,
95
screenShot,
96
takeElementScreenshot,
97
})
0 commit comments