Jump to content

Recommended Posts

Posted (edited)

Hello I am using AutoIt with selenium to test website. The website has a field to select a file to upload. When you click on that, the native dialogue starts and you can choose a file on your windows system. The problem is, that the AutoIt script stops when the window appears. I click on the field via selenium and then AutoIt should enters in the new window the value. It does not work, when Selenium clicks on the field. The case then is that AutoIt stops when the native dialogue shows up, instead of waiting for it for 10 seconds:

WinWaitActive("Choose File to Upload" , "", "10")

Send("document.pdf")

Send("{ENTER}")

Here's the Java Code

Runtime.getRuntime().exec("C:browsebutton.exe"); // Start script(will wait for the dialogue for 10 seconds)

selenium.click("name=file"); // open the native dialogue

Please help guys! Thank You!

Edited by derweise
Posted

derweise,

Do a search for "Selenium". There are numerous examples of using Selenium and AutoIT together.

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Posted

Resolved: I was using Springsource Tool Suite(STS) instead. And the solution was to start STS in Admin mode...But still thanks for at least replying kylomas...

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
×
×
  • Create New...