Jump to content

Handle browser dialog window without focus


Akos
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
 Share

  • Recently Browsing   0 members

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