Wildcard in ATTR (read ALL of it before ranting)

Discussions and Tech Support related to automating the iMacros Browser or Internet Explorer from any scripting and programming language, such as VBS (WSH), VBA, VB, Perl, Delphi, C# or C++.

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.

Wildcard in ATTR (read ALL of it before ranting)

by t_s on Fri Jun 12, 2015 5:25 am

There are millions of threads on wildcards in the ATTR values, but not a single one (as I could find) on wildcards in the ATTR names. There was one sad lonely thread from 2012 about colon in the ATTR name, but for some reason no one saw fit to answer it. So my question is if I have a html tag that looks like this:
<select id="random-generatedvalue" custom-static-var:widget="categoryselect" name="random-generatedvalue">

How the hell do I capture it with imacros after a page reload (as id and name change after every reload). The only static identifier contains a colon so I need to find out how to use colon or wildcard (and of course already tried just using colon and wildcard, see below for permutations I've tried).
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR:WDIGET:categoryselect CONTENT=$Value1 [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR:WDIGET":categoryselect CONTENT=$Value1 [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR*WDIGET:categoryselect CONTENT=$Value1 [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR*WDIGET":categoryselect CONTENT=$Value1 [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=*WDIGET:categoryselect CONTENT=$Value1 [DIDN'T WORK]

Can't find anything in the Wiki either..
t_s
 
Posts: 3
Joined: Fri Jun 12, 2015 5:13 am

Re: Wildcard in ATTR (read ALL of it before ranting)

by chivracq on Fri Jun 12, 2015 6:49 am

t_s wrote:There are millions of threads on wildcards in the ATTR values, but not a single one (as I could find) on wildcards in the ATTR names. There was one sad lonely thread from 2012 about colon in the ATTR name, but for some reason no one saw fit to answer it. So my question is if I have a html tag that looks like this:
Code: Select all
<select id="random-generatedvalue" custom-static-var:widget="categoryselect" name="random-generatedvalue">


How the hell do I capture it with imacros after a page reload (as id and name change after every reload). The only static identifier contains a colon so I need to find out how to use colon or wildcard (and of course already tried just using colon and wildcard, see below for permutations I've tried).
Code: Select all
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR:WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR:WDIGET":categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR*WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR*WDIGET":categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=*WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]


Can't find anything in the Wiki either..

CIM...! :mrgreen: => I will read (and maybe rant...!) if you mention your FCI... :idea:
Last edited by chivracq on Fri Jun 12, 2015 7:34 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: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Wildcard in ATTR (read ALL of it before ranting)

by t_s on Fri Jun 12, 2015 7:09 am

chivracq wrote:
t_s wrote:There are millions of threads on wildcards in the ATTR values, but not a single one (as I could find) on wildcards in the ATTR names. There was one sad lonely thread from 2012 about colon in the ATTR name, but for some reason no one saw fit to answer it. So my question is if I have a html tag that looks like this:
<select id="random-generatedvalue" custom-static-var:widget="categoryselect" name="random-generatedvalue">

How the hell do I capture it with imacros after a page reload (as id and name change after every reload). The only static identifier contains a colon so I need to find out how to use colon or wildcard (and of course already tried just using colon and wildcard, see below for permutations I've tried).
Code: Select all
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR:WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR:WDIGET":categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR*WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR="CUSTOM-STATIC-VAR*WDIGET":categoryselect CONTENT=$Value1    [DIDN'T WORK]
TAG POS=1 TYPE=SELECT ATTR=*WDIGET:categoryselect CONTENT=$Value1    [DIDN'T WORK]


Can't find anything in the Wiki either..

CIM...! :mrgreen: => I will read (and maybe rant...!) if you mention your FCI... :idea:


Ah, but of course:
W7(all patches except the w10 nag)
FF34.0.5
8.9.2.1-signed
..oh, and you're welcome to rant, as long as it's not "there are lots of threads about wildcards, why didn't you use the search function" ;)
t_s
 
Posts: 3
Joined: Fri Jun 12, 2015 5:13 am

Re: Wildcard in ATTR (read ALL of it before ranting)

by chivracq on Fri Jun 12, 2015 7:48 am

t_s wrote:Ah, but of course:
W7(all patches except the w10 nag)
FF34.0.5
8.9.2.1-signed
..oh, and you're welcome to rant, as long as it's not "there are lots of threads about wildcards, why didn't you use the search function" ;)

Good for FCI...

And don't worry, when I rant, I always rant in a constructive way (to make things better...!)...

OK, without the URL of your Page, I cannot play myself with it, but things you can try:
Your first one could have worked, but you have a Typo in all your Statements: WDIGET <> WIDGET...!
So if you tried all your Statements with that Typo, not wonder that none worked...!

Code: Select all
TAG POS=1 TYPE=SELECT ATTR=CUSTOM-STATIC-VAR:WIDGET* CONTENT=$Value1
(Without Typo...!)
Otherwise, that DDLB probably has a Label that you could first tag and use as an Anchor to then tag your DDLB using Relative Positioning with:
Code: Select all
TAG POS=R1 TYPE=SELECT ATTR= CONTENT=$Value1

And if the Label and the DDLB are encapsulated within a same DIV for example, you may have to first get out of the DIV to find the INPUT Element, search my Posts with "Double Relative Positioning"...

And try playing with # and % instead of $...

Post the URL or an HTML Saveas of your Page if it's behind Login and Password otherwise if you don't come out by yourself...
- (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: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)

Re: Wildcard in ATTR (read ALL of it before ranting)

by t_s on Tue Jun 16, 2015 4:22 am

Hi.

Thanks for the quick answer. The typos were because I just typed everything as I remembered it from the top of my head (and then used copy paste). Your suggestions didn't work for my problem but your answer made me read the Wiki on ATTR one more time where I discovered that it does say the feature I'm asking about doesn't exist in any version prior to 10.2. It also made me approach the problem differently, and my real problem is solved.

So, my guess is that the real answer to my (and the poor guy's in the unanswered thread from ages ago) question is that what I (we) asked for is not possible in versions of iMacro prior to 10; ie. using colon (or wildcards in custom attributes) is not possible with versions of iMacros prior to 10.2.

PS. In case you wonder, the retarded (commercial) CMS editor I'm stuck with has a totally different structure that what you'd expect in a normal website (that's why your suggestions couldn't be applied).
t_s
 
Posts: 3
Joined: Fri Jun 12, 2015 5:13 am

Re: Wildcard in ATTR (read ALL of it before ranting)

by chivracq on Tue Jun 16, 2015 5:15 am

t_s wrote:Hi.

Thanks for the quick answer. The typos were because I just typed everything as I remembered it from the top of my head (and then used copy paste).

Ah OK...

t_s wrote:Your suggestions didn't work for my problem but your answer made me read the Wiki on ATTR one more time where I discovered that it does say the feature I'm asking about doesn't exist in any version prior to 10.2.

I guess you are referring to extracting Custom Attributes which is only supported from v.10.2 (which is a Version for IE or the iMacros Browser, not for FF, your Pb has nothing to do with Extract... and you can use Wildcards with any Attributes I think... But you didn't post the URL of your Page nor upload an HTML Saveas, so I cannot test on your Page...

t_s wrote:It also made me approach the problem differently, and my real problem is solved.

So, my guess is that the real answer to my (and the poor guy's in the unanswered thread from ages ago) question is that what I (we) asked for is not possible in versions of iMacro prior to 10; ie. using colon (or wildcards in custom attributes) is not possible with versions of iMacros prior to 10.2.

Yep, then if you found a Solution, share it...!
The "poor guy" probably found a Solution but didn't bother to share it and if he didn't get any Reply, that's probably that he asked it in some lazy way and didn't bother reading the Forum Rules for Required Info and didn't mention his FCI for example, then I don't bother answering such Threads, if I was around on the Forum at that time... Post the Link to that Thread...

t_s wrote:PS. In case you wonder, the retarded (commercial) CMS editor I'm stuck with has a totally different structure that what you'd expect in a normal website (that's why your suggestions couldn't be applied).

The older the Web-Site, the better it works with the Standard Modes, for Ajaxy Sites, you get good Results with the EVENT Mode...
Again, post the Link to your Page or upload 2 or 3 (with different ID's) HTML Saveas of your Page if it's behind Login & Password and I'm pretty sure I would get it to work... I can only give you generic Answers if I don't have the Page to play myself with...
- (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: 6475
Joined: Sat Apr 13, 2013 6:07 am
Location: Amsterdam (NL)


Return to Scripting and Command Line Interface

Who is online

Users browsing this forum: No registered users and 3 guests

-->