Skip to content
RED SAG Skills
hardStudy question · answer published in Playwright interview questions, so no pointsui-automationplaywright

A variable that is undefined in evaluate

Why does this code throw "orderId is not defined"?

const orderId = 'ORD-77'
const status = await page.evaluate(() => {
  return window.app.getStatus(orderId)
})
Choose one answer

Discussion 0

Join free to post in the discussion.

Related questions