MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / findElements

Function findElements

lib/helper/Playwright.js:4222–4236  ·  view source on GitHub ↗
(matcher, locator)

Source from the content-addressed store, hash-verified

4220}
4221
4222async 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
4238async function findElement(matcher, locator) {
4239 if (locator.pw) return findByPlaywrightLocator.call(this, matcher, locator)

Callers

nothing calls this directly

Calls 2

handleRoleLocatorFunction · 0.85
buildLocatorStringFunction · 0.85

Tested by

no test coverage detected