DEV Community

loading...

Discussion on: How to automate file upload testing with Autoit and Protractor

Collapse
valeria profile image
Valeria Author • Edited

Hi Paulo! uploadFileIntoInputField will work only with "input" type html elements like ' input id="bla bla" '. In this case we can easily use sendKeys() method:

inputHtmlElem.sendKeys(absolutePath)

BUT, if html element is not "input", neither uploadFileIntoInputField nor inputHtmlElem.sendKeys(absolutePath) won't work.

Workaround I described in the post is a little bit complicated...But it helps in cases when you need to interact with not "input" html elements to upload smth to the web site :)

Collapse
paulogoncalvesbh profile image
Paulo Gonçalves

Thanks to explain Valeria, nice post :D