How To Use ClickTag on a Tag with no FRAME, FORM, or TAGNAME

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
flhampton
Newbie
Posts: 2
Joined: Thu Apr 16, 2009 8:42 pm

How To Use ClickTag on a Tag with no FRAME, FORM, or TAGNAME

Post by flhampton » Thu Apr 16, 2009 9:32 pm

I recently installed WebRecorder in order improve the window macro that I am writing. I'm trying to select a tag used for logout. In the passed, I would scan a copy of the logout tag to image, then find its position using the FindImagePos> command. This works, but isn't nearly as fast or reliable as ClickTag. WebRecorder captures the following text when I select the "logout" button:

Let>FrameName={""}
Let>FormName={""}
Let>TagValue={"logout"}
IE_ClickTag>%IE[4]%,str:FrameName,str:FormName,A,TEXT,str:TagValue,r

This code doesn't produce any error, but it has absolutely no effect when used in MacroScheduler. Nothing happens. The logout is not processed. My Macro closes the IE[?] session after this, but website remembers my IP address an assumes I'm the same user when I run the macro again. I need to logout in order to login using the correct USER ID. The source code for the page looks something like this. (Note: I've deleted the actual texts where it references a specific URL)

logout

I've tried using: A,HREF, in place of A,TEXT in the code, but it doesn't respond any differently. It's obvious that the people who wrote the HTML for this page didn't want a person like me trying to automate the script, otherwise they would not have gone so far out of their way to prevent me from being able to identify it. I don't see a tab index listed, or I would try this. Does anyonehave any suggestions regarding how to make ClickTag work under thes circumstances. How do I determine the zero based numeric index for something like this. Please elaborate on this as much as possible

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Fri Apr 17, 2009 4:24 pm

If you replace TEXT with HREF you will need to change the value from "logout" to whatever the HREF of the anchor is. You would need to look at the source of the page to find this out.

You can also use NAME or ID or failing everything you can use INDEX.

The WebRecorder help file topic for ClickTag shows you what atributes you can use to identify the tag.

However, if the tag is dynamically generated at runtime, say with Javascript then it won't be detectable.

Can you provide a link to the page in question? If I can see it I may be able to help or at least explain why it cannot be recognised.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

flhampton
Newbie
Posts: 2
Joined: Thu Apr 16, 2009 8:42 pm

It appears that the Tag is dynamically generated

Post by flhampton » Sat Apr 18, 2009 4:32 am

I new that it was dynamically generated when I first looked at the source code on the page. The first part of the URL is fixed, the rest of it changes each time I go to the page. What you are saying is that there is no way to capture this tag with web Recorder.

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Sat Apr 18, 2009 4:51 am

I can't say anything for certain without seeing the page. I believe you have now sent that to support. I'll check it out and let you know.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

User avatar
Marcus Tettmar
Site Admin
Posts: 7395
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Apr 20, 2009 9:16 am

Just as a follow up. fhampton posted further details of this page to support. It turns out that it randomly changes the number and sequence of fields and creates unique names and IDs for them each time you visit the page. This is clearly done to prevent the form from being automated and it stops WebRecorder from working since there is no way to identify the fields as they change every time. One solution is to use image recognition. But please consider the terms and conditions of the website when automating it - if they have gone to some effort to stop the page from being automated, perhaps the terms and conditions prohibit it.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts