0

So, all my current scripts run with Selenium in Chrome Headless mode. Now, we have a small component which basically makes it mandatory for a user to upload a file before the flow gets completed.

The upload is a normal window file select box.

I had two solutions in mind to automate this - Sikuli or AutoIT. I'm very sure that Sikuli does not work in headless. What about AutoIT? Does it support headless mode?`

I am desperate to keep the scripts working headlessly since they are also linked to a Linux Jenkins machine and there is no way I can change that setup.

I did some browsing but there is no concrete answer available to suggest whether or not AutoIt runs in Chrome Headless. Any previous experience or tips is much appreciated!

1
  • 2
    AutoIT is a windows program.. how are you planning to run it on your Jenkins Linux machine? Commented Aug 3, 2018 at 18:56

1 Answer 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");
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.