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
-
attrValuePairs
-
Pairs of attribute and value like {"id":"name","class":"class-name"}
-
args
relativeSelector -
Proximity selectors