Hi,
I am very new to the Auto it script , I am using it to upload file in firefox for my selenium test ,The code i use is as follow
AutoIt Code
#include <IE.au3> ; Internet Explorer is partly integrated in shell.application $oShell = ObjCreate("shell.application") ; Get the Windows Shell Object $oShellWindows=$oShell.windows ; Get the collection of open shell Windows $MyIExplorer="" for $Window in $oShellWindows ; Count all existing shell windows ; Note: Internet Explorer appends a slash to the URL in it's window name if StringInStr($Window.LocationURL,"http://") then $MyIExplorer=$Window exitloop endif next $oForm = _IEGetObjByName ($MyIExplorer, "UploadedFile") _IEAction($oForm, "click") WinActivate("File Upload"); Local $file = "C:\workspaces\TransPerfectCodeRepository\Dev\Transperfect.Portal\Transperfect.UI.Tests\DataSource\AdminUnlock.xml" ControlSetText("File Upload", "", "Edit1", $file ) ControlClick("File Upload", "", "Button1")
When execute the script everything works properly but when i convert it into a exe and execute it i get a error message