Random ID values and Wildcard does not work

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
Forum rules
Before asking a question or reporting an issue:
1. Please review the list of FAQ's.
2. Use the search box (at the top of each forum page) to see if a similar problem or question has already been addressed.
3. Try searching the iMacros Wiki - it contains the complete iMacros reference as well as plenty of samples and tutorials.
4. We can respond much faster to your posts if you include the following information: CLICK HERE FOR IMPORTANT INFORMATION TO INCLUDE IN YOUR POST
Post Reply
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Random ID values and Wildcard does not work

Post by mknoll1 » Wed Feb 11, 2009 4:04 pm

In each load of the page in the script below the value after ID changes. bKYSIb will become some other 5 characters and it changes on each reload. Normally when the value of an element is changing on each replay I just wild card out the offending value and the macro then works. However, for some reason this is not working in the script below. What is stranger is that instead of the macro timing out on a failed command it continues through the command as if it were successful even though nothing is placed into the fields.

This is what I record:

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=https://www.taylorcountybank.com/online_banking1.htm     
FRAME F=1     
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:bKYSIb CONTENT=ThisIs 
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:aIqKQc CONTENT=NotWorking
WAIT SECONDS=5   
I edit it to this and this refuses to play correctly:

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=https://www.taylorcountybank.com/online_banking1.htm     
FRAME F=1     
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=ThisIs 
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=NotWorking
WAIT SECONDS=5   
Marcia, Tech Support
Posts: 1095
Joined: Thu Jan 29, 2009 1:10 pm

Re: Random ID values and Wildcard does not work

Post by Marcia, Tech Support » Wed Feb 11, 2009 8:59 pm

Hello,

Actually it is not a problem with the wildcard in the attribute ID. It is just that your TAG command does not give enough information to make a unique choice of the html tag.

If you have a look at the html source code you see that they try their best in order to hide the right tag. Most likely because they want to avoid an automatic login.

For now I believe that this code works:

Code: Select all

VERSION BUILD=6250128     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=https://www.taylorcountybank.com/online_banking1.htm     
FRAME F=1     
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=TABINDEX:1&&CLASS:inputl CONTENT=myname 
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=TABINDEX:2&&CLASS:inputl CONTENT=password 
TAG POS=1 TYPE=IMG ATTR=HREF:https://www.taylorcountybank.com/apps/Themes/Default/64x64/login.png  
...but just until they change their hiding strategy.
Regards,

Marcia
mknoll1
Posts: 174
Joined: Fri Dec 23, 2005 4:14 pm

Re: Random ID values and Wildcard does not work

Post by mknoll1 » Fri Feb 13, 2009 6:24 pm

I looked over their HTML and found a less elegant but hopefully more robust solution.

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=https://www.taylorcountybank.com/online_banking1.htm     
FRAME F=1     
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF1
TAG POS=1 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=2 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF2 
TAG POS=2 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=3 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF3
TAG POS=3 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=4 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF4
TAG POS=4 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=5 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF5
TAG POS=5 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=6 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF6
TAG POS=6 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
TAG POS=7 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF7
TAG POS=7 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
WAIT SECONDS=5  

Testing shows that POS=7 is the magic number so until they change it can be shortened to

Code: Select all

VERSION BUILD=6221002     
TAB T=1     
TAB CLOSEALLOTHERS     
URL GOTO=https://www.taylorcountybank.com/online_banking1.htm     
FRAME F=1     
TAG POS=7 TYPE=INPUT:TEXT FORM=NAME:frmMain ATTR=ID:* CONTENT=WTF7
TAG POS=7 TYPE=INPUT:PASSWORD FORM=NAME:frmMain ATTR=ID:* CONTENT=THISSUCKS 
WAIT SECONDS=5  
Thanks for your help.
Post Reply