(matcher, locator)
| 4220 | } |
| 4221 | |
| 4222 | async function findElements(matcher, locator) { |
| 4223 | const isPwLocator = locator.type === 'pw' || (locator.locator && locator.locator.pw) || locator.pw |
| 4224 | |
| 4225 | if (isPwLocator) return findByPlaywrightLocator.call(this, matcher, locator) |
| 4226 | |
| 4227 | // Handle role locators with text/exact options (e.g., {role: 'button', text: 'Submit', exact: true}) |
| 4228 | const roleElements = await handleRoleLocator(matcher, locator) |
| 4229 | if (roleElements) return roleElements |
| 4230 | |
| 4231 | locator = new Locator(locator, 'css') |
| 4232 | |
| 4233 | const locatorString = buildLocatorString(locator) |
| 4234 | |
| 4235 | return matcher.locator(locatorString).all() |
| 4236 | } |
| 4237 | |
| 4238 | async function findElement(matcher, locator) { |
| 4239 | if (locator.pw) return findByPlaywrightLocator.call(this, matcher, locator) |
nothing calls this directly
no test coverage detected