Web Recorder Clicktag questions

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
User avatar
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Web Recorder Clicktag questions

Post by JRL » Wed Mar 14, 2012 5:06 pm

Just started attempting to use Web Recorder 3. Never used Web Recorder before.

I'm trying to get information from a customer web site. The recorded script worked perfectly but of course because the web site buttons change daily the script was only good for the day it was recorded. I've successfully made changes to the script that will give me the flexibility required for day to day data export.

The script needs to click a series of tags whose quantity and "TEXT" values will change daily. The recorded script used the line:

IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"TEXT"},{"41"},ie_res

Because the tag "TEXT" will change every day, the line was modified to:

IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"TEXT"},{"%CTagID%"},ie_res


This works most of the time. The problem I'm having is that when two of the tag "TEXT"s are the same, I get the first occurrence twice. Rather than using "TEXT" as the "Tagname" I have tried using "NAME", "TITLE", "ID" and "INDEX". I have not been able to make any of them work.

What I think should work is "ID". The error message I get when using ID is
Line 67 g not appropriate
"g" is the first letter of the id attribute that is being passed to the ClickTag function, The entire attribute is: "grdvwShipmentLineItems_ctl02_btnLink"

Any thoughts? need more info? I can't post the script, too much proprietary information that belongs to the customer.

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

Post by Marcus Tettmar » Wed Mar 14, 2012 5:28 pm

Don't know why you'd get that message. If you want to refer to the tag's ID you would need to do:

IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"ID"},{"grdvwShipmentLineItems_ctl02_btnLink"},ie_res

If in a variable do something like:

Let>var=grdvwShipmentLineItems_ctl02_btnLink
IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"ID"},%var%,ie_res
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
JRL
Automation Wizard
Posts: 3532
Joined: Mon Jan 10, 2005 6:22 pm
Location: Iowa

Post by JRL » Wed Mar 14, 2012 5:48 pm

mtettmar wrote:If in a variable do something like:

Let>var=grdvwShipmentLineItems_ctl02_btnLink
IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"ID"},%var%,ie_res
My code. (%kk% is incrementing in a Repeat loop)

Code: Select all

  Length>kk,len
  If>len=1
    Let>ButtonNbr=0%kk%
  Else
    Let>ButtonNbr=%kk%
  EndIf
  Let>CTagID=grdvwShipmentLineItems_ctl%ButtonNbr%_btnLink

  IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"ID"},{"%CTagID%"},ie_res1
Changed the last line to:

Code: Select all

IE_ClickTag>%IE[0]%,{""},{""},{"A"},{"ID"},%CTagID%,ie_res1
And it now works.

Thank you!

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