Jump to content

Recommended Posts

Posted

I have a Selenium WebDriver based script to automate file uploading. It uploads list of files one by one. I use AutoIT script to handle dialog window, file chooser window. Parameter $CmdLine[1]contains the path of actual file.

ControlFocus("Open a file","","Edit1")
ControlSetText("Open a file","","Edit1", $CmdLine[1])
ControlClick("Open a file","","Button1")

I execute it from Java code as following:

Runtime.getRuntime().exec(autoITExecutable);

It opens dialog window, so it can't work without focus on browser window.

Posted

Variable autoITExecutable contains path of exe file and parameter value too. My question is, how could I execute test without opening dialog window. I would like to execute it without focus on browser and maybe in headless mode.

Posted

What kind of details? I tried to use sendKeys(""); method, but input field doesn't accept file in this way.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...