Skip to main content

Function: byValue()

byValue(value, relative?): PartLocator

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​

PartLocator

Example​

const option = byValue('option1');