diff --git a/packages/playwright-core/src/server/injected/domUtils.ts b/packages/playwright-core/src/server/injected/domUtils.ts index 563b749fe2..fd6915dc10 100644 --- a/packages/playwright-core/src/server/injected/domUtils.ts +++ b/packages/playwright-core/src/server/injected/domUtils.ts @@ -84,7 +84,7 @@ export function isElementStyleVisibilityVisible(element: Element, style?: CSSSty // https://bugs.webkit.org/show_bug.cgi?id=264733 // @ts-ignore if (Element.prototype.checkVisibility && browserNameForWorkarounds !== 'webkit') { - if (!element.checkVisibility({ checkOpacity: false, checkVisibilityCSS: false })) + if (!element.checkVisibility()) return false; } else { // Manual workaround for WebKit that does not have checkVisibility.