(expected, exactMatch)
| 3596 | } |
| 3597 | |
| 3598 | function createRoleTextMatcher(expected, exactMatch) { |
| 3599 | if (expected instanceof RegExp) { |
| 3600 | return value => expected.test(value || '') |
| 3601 | } |
| 3602 | const target = String(expected) |
| 3603 | if (exactMatch) { |
| 3604 | return value => value === target |
| 3605 | } |
| 3606 | return value => typeof value === 'string' && value.includes(target) |
| 3607 | } |
| 3608 | |
| 3609 | async function proceedSelect(context, el, option) { |
| 3610 | const role = await el.evaluate(e => e.getAttribute('role')) |