I wonder if there’s a similar way as in Selenium to wait for text to appear for a particular element. I’ve tried something like this, but it doesn’t seem to wait: Answer You can use waitForFunction. See https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#pagewaitforfunctionpagefunction-options-args Including @elena’s solution for completeness of the answer:
Tag: google-chrome-headless
How to use Puppeteer and Headless Chrome with Cucumber-js
I am trying to do BDD with cucumber-js and drive the browser testing with Headless Chrome and puppeteer. Using the documentation from cucumber node example and headless chrome, I get the following errors, the entire code base is avaliable here: github repo. Errors: TypeError: this.browser.newPage is not a function TypeError: this.browser.close is not a function // features/support/world.js // features/step_definitions/hooks.js //