Playwright · Junior · Question 20 of 75
When does Playwright resolve a locator to an element?
- 1Each time an action or assertion uses it
- 2Only when the page has fully finished loading
- 3Once, when the locator object is created
Show the answer
Correct answer: Each time an action or assertion uses it
Explanation
Locators are lazy. They're re-evaluated on every use, so they keep working after re-renders that replace DOM nodes.