import {Locator} from '@serenity-js/webdriverio/lib/screenplay/questions'
public class | source

Locator

Represents a way to retrieve one and multiple Web elements using a given strategy.

See also:

Constructor Summary

Public Constructor
public

Method Summary

Public Methods
public

Returns a Question that resolves to all the Web elements found using a given strategy.

public

firstMatching(): Question<Promise<Element<'async'>>>

Returns a Question that resolves to the first Web element found using a given strategy.

Public Constructors

public constructor() source

Public Methods

public allMatching(): Question<Promise<ElementArray>> source

Returns a Question that resolves to all the Web elements found using a given strategy.

Returns:

Question<Promise<ElementArray>>

public firstMatching(): Question<Promise<Element<'async'>>> source

Returns a Question that resolves to the first Web element found using a given strategy.

Returns:

Question<Promise<Element<'async'>>>