Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

waitForJS doesn't work like Webdriver #10

Open
eXorus opened this issue Oct 24, 2024 · 0 comments
Open

waitForJS doesn't work like Webdriver #10

eXorus opened this issue Oct 24, 2024 · 0 comments

Comments

@eXorus
Copy link
Member

eXorus commented Oct 24, 2024

On Webdriver I have something like that and it works:
$I->waitForJS("return typeof App !== 'undefined';");

But with playwright I have an error:

page.evaluate: SyntaxError: Illegal return statement
    at eval (<anonymous>)
    at UtilityScript.evaluate (<anonymous>:234:30)
    at UtilityScript.<anonymous> (<anonymous>:1:44)

I tried different value but always an error:
$I->waitForJS("return typeof App !== 'undefined'");
$I->waitForJS("typeof App !== 'undefined';");
$I->waitForJS("() => typeof App !== 'undefined'");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant