From 80e4351e710d0eab11733844102b778b8ee8cb14 Mon Sep 17 00:00:00 2001 From: KobeNguyenT <7845001+kobenguyent@users.noreply.github.com> Date: Sat, 21 Oct 2023 07:06:30 +0200 Subject: [PATCH] fix: proceedSee (#3939) --- lib/helper/Playwright.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/helper/Playwright.js b/lib/helper/Playwright.js index b17b56dee..3f7285f53 100644 --- a/lib/helper/Playwright.js +++ b/lib/helper/Playwright.js @@ -3408,7 +3408,8 @@ async function proceedSee(assertType, text, context, strict = false) { if (!context) { const el = await this.context; - allText = [await el.locator('body').innerText()]; + allText = el.constructor.name ? [await el.locator('body').innerText()] : [await el.innerText()]; + description = 'web application'; } else { const locator = new Locator(context, 'css');