1 browser.addCommand('chooseFile', async function (this: WebdriverIO.Element, localFilePath: string) {
3 const remoteFile = await browser.uploadFile(localFilePath)
5 return this.addValue(remoteFile)
7 console.log('Cannot upload file, fallback to add value.')
9 // Firefox does not support upload file, but if we're running the test in local we don't really need it
10 return this.addValue(localFilePath)