Skip to content
This repository has been archived by the owner on Nov 24, 2018. It is now read-only.

Cannot run wait selector after using .evaluate() #435

Open
IAMtheIAM opened this issue May 16, 2018 · 0 comments
Open

Cannot run wait selector after using .evaluate() #435

IAMtheIAM opened this issue May 16, 2018 · 0 comments

Comments

@IAMtheIAM
Copy link

IAMtheIAM commented May 16, 2018

I confirm an issue with waiting for elements occurs after running .evaluate, The wait fails after

    const screenshot = await chromeless
        .setViewport({width: 1920, height: 1080, scale: 1})
         .goto('https://www.mylogin.com')
         .evaluate(() => {            doSomething(); })    <---- comment this out and it works
        .click('a.signin')
        .wait(2000)
        .type('username', 'input[name="username"]')
        .type('password', 'input[name="password"]')
        .press(13)
        .screenshot();

Results in

Error: wait("input[name="username"]") timed out after 10000ms

With the evaluate line removed, the screenshot and whole express works fine.

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

No branches or pull requests

1 participant