Selenium_AutoIT_on Virtual machines

36 views
Skip to first unread message

sree

unread,
Dec 2, 2016, 12:31:32 PM12/2/16
to Selenium Users

File Upload using Auto IT in virtual machine :

I am running a script in virtual machine which uses auto it to interact with window pop up ( to upload an image ) and it is not working.


From local machine it works fine .


Please find the below code :


uploadAsertsButton.click()  //after clicking on upload button window pop up will displayed 
sleep(8000)
Runtime.getRuntime().exec("C:\\AUT\\FileUpload.exe")
//Trying to run this exe which enters the path (C:\AUT\idl.jpg) in the popup .




Auto IT exe file has the below code :

ControlFocus("Open","","Edit1")
ControlSetText("Open","","Edit1","C:\AUT\idl.jpg")
ControlClick("Open","","Button1")


I had installed auto it and place the required files in VM

Can anyone help me on how to handle this.

David

unread,
Dec 4, 2016, 9:16:18 PM12/4/16
to Selenium Users
How are you running the AutoIt (and Selenium) on the VM? Via remote desktop? Is the VM's local desktop locked or unlocked?

This blog post may be helpful for your problem with AutoIt: https://autumnator.wordpress.com/2011/11/18/how-to-run-remote-headless-gui-automation/
Reply all
Reply to author
Forward
0 new messages