Auto fill form with iMacros .net component

Discussions and Tech Support related to using the iMacros Component for .NET in your applications.

Moderators: Community Moderators, iMacros Moderators

Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the Google search box (at the top of each forum page) to see if a similar problem or question has already been addressed. This will search the entire contents of the forums as well as the iMacros Wiki.
3. We can respond much faster to your posts if you include the following information:

CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST

Answering your own posts (e.g. attempting to "bump" your topic) drops your topic from the list of unanswered threads, so it may actually receive less views.

Auto fill form with iMacros .net component

by dolluatdoll on Mon Nov 03, 2014 2:45 am

Hello,

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)


When the page loaded, I passed the variable "{!VAR1}" into the Card Number field, and then I passed a {TAB} to let the cursor go to the "Logon Password" field
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.
Attachments
failed fill.jpg
dolluatdoll
 
Posts: 4
Joined: Mon Oct 27, 2014 4:15 am

Re: Auto fill form with iMacros .net component

by chivracq on Mon Nov 03, 2014 6:24 am

Have you tried using this?:
Code: Select all
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh

(And the Name will probably be "pwd" or "Password" anyway...)

Try recording using iMacros on Firefox otherwise (with different Recording Modes), it might be able to identify the Element...
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

by dolluatdoll on Tue Nov 04, 2014 2:53 am

appreciated for your reply :wink:

unluckily, the site works only with Internet Explorer.
And "TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh" doesn't work :cry:
dolluatdoll
 
Posts: 4
Joined: Mon Oct 27, 2014 4:15 am

Re: Auto fill form with iMacros .net component

by chivracq on Tue Nov 04, 2014 5:12 am

dolluatdoll wrote:appreciated for your reply :wink:

unluckily, the site works only with Internet Explorer.
And "TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh" doesn't work :cry:

No-no, it works with FF, you just have to change your User Agent to FF20, like I told you in your other Thread... I wanted to give a try again yesterday, but that's this weird Site with the Chinese Plugin that I refuse to install...

Hum, you might be right actually, only IE was supported for the English Version, I think I remember... But as I told you before, you could always log in using the Chinese Logon Page and switch back to English once logged in... (Dunno if you've tried anything in this direction...)

And you can always save the Page locally and (try to) open it with FF to try to identify the Field. (You may need to edit the Source to circumvent the Browser Checks...)
Last edited by chivracq on Mon Nov 10, 2014 5:03 am, edited 1 time in total.
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

by dolluatdoll on Mon Nov 10, 2014 3:59 am

I've just read the other Thread, I think he is doing something similar as mine, actually the mentioned bank page is only an example of showing the "ActiveX control" field.

There are a lot of website using ActiveX control, I'm sorry that only ICBC got an English page, That's why I use it as an example.


What I trying to do is "if iMacros can auto-fill an ActiveX control field will no matter iMacros Script or Direct Screen Mode"
Since I try both ways but both way are not working, it just cannot detect the name/id of the field

I believe that it isn't an "input", so "TYPE=INPUT:PASSWORD" doesn't locate the field
Code: Select all
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh


When I read the source code of the password field, it is something embedded as an object,
Code: Select all
<OBJECT onkeyup="getfocus1('KeyPart', event);detectCapsLock('logonform','safeEdit1',500,300,400,'logontb');" onfocus="detectCapsLock('logonform','safeEdit1',500,300,400,'logontb')" onblur="closeCapTip('logonform','safeEdit1')" id=safeEdit1 codeBase="/icbc/newperbank/AxSafeControls.cab#version=1,0,0,13" classid=CLSID:73E4740C-08EB-4133-896B-8D0A7C9EE3CD width=145 height=21><PARAM NAME="_cx" VALUE="3836"><PARAM NAME="_cy" VALUE="556"></OBJECT>


I've read a lot about ActiveX control, someone said it is designed to prevent bot-software to auto-fill forms.....

Anyway, thank you for all you've done! :)
dolluatdoll
 
Posts: 4
Joined: Mon Oct 27, 2014 4:15 am

Re: Auto fill form with iMacros .net component

by chivracq on Mon Nov 10, 2014 5:24 am

dolluatdoll wrote:I've just read the other Thread, I think he is doing something similar as mine, actually the mentioned bank page is only an example of showing the "ActiveX control" field.

There are a lot of website using ActiveX control, I'm sorry that only ICBC got an English page, That's why I use it as an example.


What I trying to do is "if iMacros can auto-fill an ActiveX control field will no matter iMacros Script or Direct Screen Mode"
Since I try both ways but both way are not working, it just cannot detect the name/id of the field

I believe that it isn't an "input", so "TYPE=INPUT:PASSWORD" doesn't locate the field
Code: Select all
TAG POS=1 TYPE=INPUT:PASSWORD ATTR=NAME:* CONTENT=defgh


When I read the source code of the password field, it is something embedded as an object,
Code: Select all
<OBJECT onkeyup="getfocus1('KeyPart', event);detectCapsLock('logonform','safeEdit1',500,300,400,'logontb');" onfocus="detectCapsLock('logonform','safeEdit1',500,300,400,'logontb')" onblur="closeCapTip('logonform','safeEdit1')" id=safeEdit1 codeBase="/icbc/newperbank/AxSafeControls.cab#version=1,0,0,13" classid=CLSID:73E4740C-08EB-4133-896B-8D0A7C9EE3CD width=145 height=21><PARAM NAME="_cx" VALUE="3836"><PARAM NAME="_cy" VALUE="556"></OBJECT>


I've read a lot about ActiveX control, someone said it is designed to prevent bot-software to auto-fill forms.....

Anyway, thank you for all you've done! :)

Oh yeah..., when I recognized the same Web-Site like in the other Thread, I took for granted it was the same User asking (again) more or less the same Question and I didn't check the other Thread at all as I still had it in my mind, and I answered in this current Thread as a Follow-up on my Tests in the other Thread thinking that you were the same Person:
- Activex Input issue
- (F)CIM = (Full) Config Info Missing: iMacros + Browser + OS with all 3 Versions...
- I usually don't even read the Question if that (required) Info is not mentioned...
- Script & URL usually help a lot for a more "educated" Help...
chivracq
 
Posts: 6473
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Auto fill form with iMacros .net component

by fastRSgold on Mon Nov 24, 2014 11:12 pm

The top 2 multiple your competitors FIFA 15 Coins might pursue to Hollywood in order to compete in The Cod Championship.Registration particulars to the Hawaiian along with New Zealand on the

internet qualifiers will probably be launched in Wednesday January. Thirteen. The residual clubs may include clubs through throughout Parts of asia as well as South america.

Additional information for all those world of warcraft gold local competitions will be announced on the Call of Duty eSport internet site."More individuals play Call of Duty multi player every day

than observe the normal standard time bet on the NBA.
fastRSgold
 
Posts: 4
Joined: Mon Nov 24, 2014 11:10 pm


Return to iMacros Component for .NET

Who is online

Users browsing this forum: No registered users and 1 guest

-->