diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index d85b91916..64db62034 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -3449,7 +3449,7 @@ async function proceedSee(assertType, text, context, strict = false) { if (!context) { const el = await this.context; - allText = el.constructor.name ? [await el.locator('body').innerText()] : [await el.innerText()]; + allText = el.constructor.name !== 'Locator' ? [await el.locator('body').innerText()] : [await el.innerText()]; description = 'web application'; } else {