Skip to main content

Function: byValue()

byValue(value, relative): CssLocator

Defined in: packages/core/src/locators/byValue.ts:23

Locate elements by the value of their value attribute.

Parameters​

value​

string

The value to match.

relative​

LocatorRelativePosition = 'Descendant'

Relative position of the locator. Defaults to 'Descendant'.

Returns​

CssLocator

Example​

const option = byValue('option1');