MCPcopy
hub / github.com/codeceptjs/CodeceptJS / resolveElementIndex

Function resolveElementIndex

lib/helper/extras/elementSelection.js:6–10  ·  view source on GitHub ↗
(value)

Source from the content-addressed store, hash-verified

4import MultipleElementsFound from '../errors/MultipleElementsFound.js'
5
6function resolveElementIndex(value) {
7 if (value === 'first') return 1
8 if (value === 'last') return -1
9 return value
10}
11
12function isStrictStep(opts, helper) {
13 if (opts?.exact === true || opts?.strictMode === true) return true

Callers 1

selectElementFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected