Taiko
Documentation

Home / API Reference

fileField

This selector lets you identify a file input field on a web page either with label or with attribute and value pairs and proximity selectors.

Examples

await attach('file.txt', to(fileField('Please select a file:')))
await fileField('Please select a file:').exists()
await fileField({'id':'file'}).exists()
await fileField({id:'fileFieldId'},below('text')).exists()
await fileField(below('text')).exists()

Parameters


label

The label (human-visible name) of the file input field.


_options

attrValuePairs

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


args relativeSelector

Proximity selectors


Returns

FileFieldWrapper