Taiko
Documentation

Home / API Reference

attach

Attaches a file to a file input element.

Examples

await attach('c:/abc.txt', to('Please select a file:'))
await attach('c:/abc.txt', 'Please select a file:')
await attach('c:/abc.txt', 'Please select a file:',{force:true})

Parameters


filepath

or filepaths- The path or paths of the file to be attached.


to

The file input element to which to attach the file.


options.force boolean

Set to true to perform action on hidden/disabled elements.

Default value
false

Returns

This API does not return any values