Skip to main content

Function: byInputType()

byInputType(type, relative?): PartLocator

Defined in: packages/core/src/locators/byInputType.ts:26

Locate an <input> element by its type attribute.

Parameters​

type​

string

The value of the type attribute such as text, checkbox or radio.

relative?​

LocatorRelativePosition = 'Descendant'

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

Returns​

PartLocator

Example​

const passwordField = byInputType('password');