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

IE Submit

$
0
0
Hi All,

This is probably a very easy problem/solution, but I have some code that I cannot get to work no matter what I try. All I want to do is pull up IE, enter some login credentials, and submit the form. Everything works fine, but I cannot get anything to actually do the submitting. Here is the code I have:


Run("C:\Program Files (x86)\Internet Explorer\iexplore.exe -new https://login.salesforce.com/","")
$sfWinHwnd = WinWaitActive("[CLASS:IEFrame]")
WinWaitActive("salesforce.com - Customer Secure Login Page - Windows Internet Explorer")
$sfIE = _IEAttach($sfWinHwnd,"HWND")
$sftxtName = _IEGetObjByName($sfIE,"username")
$sftxtPassword = _IEGetObjByName($sfIE,"pw")
$sfForm = _IEFormGetObjByName($sfIE,"login")
$sfLogin = _IEFormGetObjByName($sfForm,"Login")
_IEFormElementSetValue($sftxtName,"asdf")
_IEFormElementSetValue($sftxtPassword,"asdf")
_IEAction($sfLogin,"click")

And here is the code for the login button in the page's source:

<input class="loginButton" type="submit" id="Login" name="Login" value="Login" />

Does anyone know how I can get this to work?

Viewing all articles
Browse latest Browse all 12506

Trending Articles



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