I want to get a value using page.evaluate (value is stored as a global variable on window) and do a custom matcher. Simply put it should replace something like:
const ret = await page.evalute((name) => window.myVar.name) expect(name).toEqual(1); // so I would like a custom expect like: expect(name).toHaveValue(num)
Any useful tip? specifically - how can I get access to page on a custom matcher?
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email firstname.lastname@example.org.