-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Closed as not planned
Description
🚀 Feature Request
Currently, locator.evaluateAll does not have a timeout feature. Other evaluate's (page/locator) have these options, but evaluateAll does not.
Issue #13253 discusses it but not really sure what this issue is requesting now as it is very old (> 3 years) and seems to have a number branches within.
I am using a workaround (wrapping in a promise evaluator with setTimeout), but - as #13253 (comment) points out - it makes the test code quite unreadable.
Example
const attributeValues = await locator.evaluateAll((elements, attribute) => {
return elements.map(el => el.getAttribute(attribute) || '');
}, attributeName, {timeout: 10000});
Motivation
Add consistency in Playwright, so all functions that interact with the browser have a local overriding timeout ability.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels