Skip to content

waitForJS doesn't work like Webdriver #10

Description

@eXorus

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'");

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions