Sign in to follow this  
Followers 0
Klexen

Any idea why it fills out password field but not Username field?

3 posts in this topic

I can't seem to figure out why it won't fill in userid field.

$sURL = "https://home.americanexpress.com/home/mt_personal.shtml?"
    $oIE = _IECreate($sURL, 0, 0, 0)
    $HWND = _IEPropertyGet($oIE, "hwnd")
    WinSetState($HWND, "", @SW_MAXIMIZE)
    _IEAction($oIE, "visible")
    _IELoadWait($oIE)

    $sUsername = "test"
    $sPassword = "test"
    
    $oUsername = _IEGetObjByName($oIE, "Userid")
    $oPassword = _IEGetObjByName($oIE, "Pword")
    $oSubmit = _IEGetObjByName($oIE, "btn")

    _IEFormElementSetValue($oUsername, $sUsername)
    _IEFormElementSetValue($oPassword, $sPassword)
    
    _IEAction($oSubmit, "click")

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

https://home.americanexpress.com/home/mt_personal.shtml

2 forms

Form

Id Name Method Action

SearchForm get http://find.americanexpress.com/search?ref...;section=topnav

Elements

Index Id Name Type Value Label Size Maximum Length State

0 q text 20 255

1 site text amerexpress

2 client text amerexpress

3 output text amerexpress

4 restrict text US

Form

Id Name Method Action

ssoform ssoform post

Elements

Index Id Name Type Value Label Size Maximum Length State

0 DestPage text

1 UserID text

2 Face text en_US

3 Password text

4 PWD text

5 brandname text

6 TARGET text

7 USERID text

8 CHECKBOXSTATUS text

9 request_type text IntlLogLogonHandler

10 Logon text Continue...

11 Userid text 20

12 REMEMBERME checkbox on

13 Pword password 20

14 manageid manage select

Edited by SmOke_N

Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer.

Share this post


Link to post
Share on other sites

There is some heavy duty Javascript on those fields processing a keystroke at a time. Suggest you try _IEAction focus and Send

Dale


Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl

MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model

Automate input type=file (Related)

Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded  Better Better?

IE.au3 issues with Vista - Workarounds

SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead?

Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble

Share this post


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
Sign in to follow this  
Followers 0