Quantcast
Channel: AutoIt v3 - General Help and Support
Viewing all articles
Browse latest Browse all 12506

Unable to handle the file fox upload

$
0
0

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

72um1v.png

 


Viewing all articles
Browse latest Browse all 12506

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>