MCPcopy
hub / github.com/vitest-dev/vitest / convertToLocator

Function convertToLocator

packages/browser/src/client/tester/context.ts:436–441  ·  view source on GitHub ↗
(element: Element | Locator)

Source from the content-addressed store, hash-verified

434}
435
436function convertToLocator(element: Element | Locator): Locator {
437 if (element instanceof Element) {
438 return page.elementLocator(element)
439 }
440 return element
441}
442
443function getTaskFullName(task: RunnerTask): string {
444 return task.suite ? `${getTaskFullName(task.suite)} ${task.name}` : task.name

Callers 11

clickFunction · 0.85
dblClickFunction · 0.85
tripleClickFunction · 0.85
wheelFunction · 0.85
selectOptionsFunction · 0.85
clearFunction · 0.85
hoverFunction · 0.85
unhoverFunction · 0.85
uploadFunction · 0.85
fillFunction · 0.85
dragAndDropFunction · 0.85

Calls 1

elementLocatorMethod · 0.65

Tested by

no test coverage detected