Skip to content

Commit 7f8ae35

Browse files
Copilotkobenguyent
andcommitted
Fix contextObject.waitForFunction error in iframe contexts
Co-authored-by: kobenguyent <[email protected]>
1 parent f40a8e1 commit 7f8ae35

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/helper/Playwright.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2808,8 +2808,9 @@ class Playwright extends Helper {
28082808

28092809
return Promise.race([
28102810
// Strategy 1: waitForFunction that checks both body AND title text
2811+
// Use this.page instead of contextObject because FrameLocator doesn't have waitForFunction
28112812
// Original only checked document.body.innerText, missing title text like "TestEd"
2812-
contextObject.waitForFunction(
2813+
this.page.waitForFunction(
28132814
function (text) {
28142815
// Check body text (original behavior)
28152816
if (document.body && document.body.innerText && document.body.innerText.indexOf(text) > -1) {

0 commit comments

Comments
 (0)