From d9bf6386b32d61201df0de47aa2b2e8eba33cba2 Mon Sep 17 00:00:00 2001 From: ankur22 Date: Fri, 1 Sep 2023 09:51:25 +0100 Subject: [PATCH] Refactor page to p in check MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will help distinguish between page and the local variable in the check. Resolves: https://github.com/grafana/xk6-browser/pull/1022#discussion_r1312626108 Co-authored-by: İnanç Gümüş --- examples/fillform.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/fillform.js b/examples/fillform.js index 3db58a357..dfa868a70 100644 --- a/examples/fillform.js +++ b/examples/fillform.js @@ -39,7 +39,7 @@ export default async function() { page.locator('input[type="submit"]').click(), ]); check(page, { - 'header': page => page.locator('h2').textContent() == 'Welcome, admin!', + 'header': p => p.locator('h2').textContent() == 'Welcome, admin!', }); // Check whether we receive cookies from the logged site.