how can you write robust tests using puppeteer and jest?

The element you are selecting in document.querySelector(user_personal_title).value isn’t available on page yet. You need to wait for your selector element to be available on page before you execute your page using waitForSelector(selector).
Simple POC is as following:

    .then(() => //evaluate your document.querySelector(user_personal_title).value code here

//or simply
 await page.waitForSelector(user_personal_title)

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top