Playwright eval javascript in context of iframe window

Viewed 109

I have a sandbox on my page that I'm trying to run some tests in.

const iframe = await page.frameLocator('#scripting-sandbox');
iframe.evaluate(test.toString())

This obviously doesn't work, iframe has no method evaluate. What's the correct way to accomplish this?

0 Answers
Related