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

Function findByRole

lib/helper/Playwright.js:4214–4220  ·  view source on GitHub ↗
(context, locator)

Source from the content-addressed store, hash-verified

4212}
4213
4214async function findByRole(context, locator) {
4215 if (!locator || !locator.role) return null
4216 const options = {}
4217 if (locator.name) options.name = locator.name
4218 if (locator.exact !== undefined) options.exact = locator.exact
4219 return context.getByRole(locator.role, Object.keys(options).length > 0 ? options : undefined).all()
4220}
4221
4222async function findElements(matcher, locator) {
4223 const isPwLocator = locator.type === 'pw' || (locator.locator && locator.locator.pw) || locator.pw

Callers 1

selectOptionMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected