Skip to content

attach()

Attaches a file to a file input element.

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})
Name Type Description
filepath string | Array or filepaths- The path or paths of the file to be attached.
to selector | string The file input element to which to attach the file.
options unknown Default: {}.

This API does not return any values.