diff --git a/src/common/JSHandle.ts b/src/common/JSHandle.ts index 1d7024de889b4..9faf863fca0df 100644 --- a/src/common/JSHandle.ts +++ b/src/common/JSHandle.ts @@ -959,7 +959,7 @@ export class ElementHandle< const layoutMetrics = await this._client.send('Page.getLayoutMetrics'); // Fallback to `layoutViewport` in case of using Firefox. const { pageX, pageY } = - layoutMetrics.cssLayoutViewport || layoutMetrics.layoutViewport; + layoutMetrics.cssVisualViewport || layoutMetrics.layoutViewport; const clip = Object.assign({}, boundingBox); clip.x += pageX;