Skip to content

Lupa API Reference / commands/locator / QueryByAltText

Interface: QueryByAltText

Defined in: src/commands/locator.ts:55

All images should have an alt attribute that describes the image. You can locate an image based on the text alternative using the altText locator strategy.

Properties

altText

altText: string

Defined in: src/commands/locator.ts:59

The alt text to use to locate the element. This should be the text content of the alt attribute.