Jump to content

AutoIt Scriot stops when Native dialogue window pop ups


Recommended Posts

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
Link to post
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
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...