I am trying to auto fill in login form when page loaded
here is my code:
Code: Select all
Dim macro
macro = "CODE:"
macro = macro + "VERSION BUILD=10.2.26.4235" + vbNewLine
macro = macro + "TAB T=1" + vbNewLine
macro = macro + "TAB OPEN" + vbNewLine
macro = macro + "TAB T=2" + vbNewLine
macro = macro + "URL GOTO=https://mybank.icbc.com.cn/icbc/enperbank/index.jsp" + vbNewLine
macro = macro + "FRAME F=1" + vbNewLine
macro = macro + "SET !VAR1 do<SP>re<SP>mi" + vbNewLine
macro = macro + "TAG POS=1 TYPE=INPUT:TEXT ATTR=NAME:logonCardNum CONTENT={{!VAR1}}" + vbNewLine
macro = macro + "SET !ENCRYPTION NO" + vbNewLine
macro = macro + "DS CMD=KEY CONTENT={TAB}" + vbNewLine
macro = macro + "TAG POS=1 TYPE=SELECT CONTENT=defgh" + vbNewLine
Dim res As Integer
res = iim.Play(macro)
As a result, it was failed, the cursor stayed in the card number. (Please see attachment)
I believe that the login form is an ActiveX control. I have no way to find the exact name of ID of the "Logon Password" field, that's why I try to send a {TAB} to go to the next field. I think it is also not a appropriate manner to do so.
Please! If anybody can give me some advice for filling the kind of form in a website.