Element.waitForAll
Wait until every selector has a match. Scoped to descendants.
js
element.waitForAll(selectors, optionsOrTimeout?)Arguments
| Argument | Type | Meaning |
|---|---|---|
selectors | array | 1..32 selectors; one query per poll. |
optionsOrTimeout | object | number | Optional milliseconds, or {timeout:5000, interval:100, throwOnTimeout:true}. Interval is at least 10 ms. |
Returns
Element array in selector order. Matches need not be distinct. Timeout throws, or returns null when disabled.
Example
js
const panel = UIHelper.waitForElement({id: "panel"}, 5000);
const [title, done] = panel.waitForAll([{id: "title"}, {id: "done", enabled: true}], 5000);
console.log(title.getText());Notes
The parent must still be valid. See the matching UIHelper method for options. Placeholder panel/child identifiers require inspection.