IEExtractTag throws Access violation error

Technical support and scripting issues

Moderators: JRL, Dorian (MJT support)

Post Reply
djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

IEExtractTag throws Access violation error

Post by djs » Sat Feb 16, 2013 4:43 pm

What's the best way to report bugs?
Version: 14.0.3

So I have a simple code line:

Code: Select all

IEExtractTag>IE[2],,IMG,59,1,tag
Which works well, except in some cases, there are only 43 image tags (or any number less than 59). Instead of setting tag to -1 like I would expect, I get the Access violation error screen.

In truth, I have this code in a loop, looking for a certain image to click on. I need a way to know when to stop the loop. I do this currently with IEGetTags, then I know how many are returned in the Array count, but this has the problem of I can have multiple similar pages open, and it can extract from the wrong page.

Any chance of getting IEExtractTag to an invalid tag to simply return -1? Would make my life easy.

Dan

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 Feb 18, 2013 12:25 pm

Hi,

Thanks. Yes it makes sense it should fail gracefully if the index is greater than the number of available elements. I will add this to our issue tracker and get it improved.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar

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

djs
Junior Coder
Posts: 47
Joined: Sun Apr 29, 2012 4:21 pm

Post by djs » Mon Feb 18, 2013 3:04 pm

For consistency, IEExtractTagByName works correctly and fails silently, or better put, by returning {""} (nothing) if the tag doesn't exist.

I guess, rather than the -1 I suggested, the blank is consistent and better matches the non-existent tag.

Dan

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