How can I pass variable into an evaluate function?

I’m trying to pass a variable into a page.evaluate() function in Puppeteer, but when I use the following very simplified example, the variable evalVar is undefined. I’m new to Puppeteer and can’t find any examples to build on, so I need help passing that variable into the page.evaluate() function so I can use it inside. … Read more

Message “Async callback was not invoked within the 5000 ms timeout specified by jest.setTimeout”

I’m using Puppeteer and Jest to run some front end tests. My tests look as follows: describe(“Profile Tab Exists and Clickable: /settings/user”, () => { test(`Assert that you can click the profile tab`, async () => { await page.waitForSelector(PROFILE.TAB); await page.click(PROFILE.TAB); }, 30000); }); Sometimes, when I run the tests, everything works as expectedly. Other … Read more