Taiko
Documentation

Home / API Reference

image

This selector lets you identify an image on a web page. This is done via the image's alt text or attribute and value pairs and proximity selectors.

Examples

await click(image('alt'))
await image('alt').exists()
await image({id:'imageId'}).exists()
await image({id:'imageId'},below('text')).exists()
await image(below('text')).exists()

Parameters


alt

The image's alt text.


_options

_options.selectHiddenElements boolean

Option to include hidden elements.

Default value
false

attrValuePairs

Pairs of attribute and value like {"id":"name","class":"class-name"}


args relativeSelector

Proximity selectors


Returns

ElementWrapper