'Will AutoIt file upload automation work in headless mode

AutoIt file upload works in normal mode but AutoIt is not working in headless mode



Solution 1:[1]

AutoIt can't be used to click on a headless browser. However, if the form is a standard file upload, you should be able to sendKeys() in selenium to send the path of the file to the input.

driver.findElement(By.cssSelector("input[type='file']")).sendKeys("/Users/me/Desktop/file.txt");

Solution 2:[2]

I know you are using selenium.

But take a look on: https://github.com/Danp2/au3WebDriver/blob/master/wd_demo.au3

DemoUpload() works on NonHeadless and on Headless mode.

Check this demo and try to do this in similar way in selenium.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Akzy
Solution 2 Michał Lipok