Dynamic form IDs

Discussions and Tech Support specific to the iMacros Firefox add-on.
Forum rules
iMacros EOL - Attention!

The renewal maintenance has officially ended for Progress iMacros effective November 20, 2023 and all versions of iMacros are now considered EOL (End-of-Life). The iMacros products will no longer be supported by Progress (aside from customer license issues), and these forums will also no longer be moderated from the Progress side.

Thank you again for your business and support.

Sincerely,
The Progress Team

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
Maxal
Posts: 32
Joined: Sun Feb 08, 2015 4:27 pm

Dynamic form IDs

Post by Maxal » Fri May 10, 2019 1:44 pm

VERSION BUILD=8970419 RECORDER=FX
FF 48
Mac
----------------------------------

Hi

I was wonder how does iMacros deal with a situation wherein half of the dynamic IDs of
a form are similar and only 4 of the last digits change every time, for every element.

For instance:
ID of a field named TITLE is: FIELD7382846388

and

ID of another field named IMAGE is: FIELD7382846613

Now the problem is that every time the page is loaded, the last 4 digits of dynamic ID of TITLE
will change. Last 4 digits of every field on the page will change but starting 6 digits of every element
on the page will remain same.

So if we use * wildcard, how will iMacros know which field to target because the starting digits of
every field are similar, which is: FIELD738284

NOTE: CSS class is also similar for the fields I need to target, so can't use that too.
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Dynamic form IDs

Post by chivracq » Fri May 10, 2019 9:25 pm

Maxal wrote:
Fri May 10, 2019 1:44 pm
VERSION BUILD=8970419 RECORDER=FX
FF 48
Mac
----------------------------------

Hi

I was wonder how does iMacros deal with a situation wherein half of the dynamic IDs of
a form are similar and only 4 of the last digits change every time, for every element.

For instance:
ID of a field named TITLE is: FIELD7382846388

and

ID of another field named IMAGE is: FIELD7382846613

Now the problem is that every time the page is loaded, the last 4 digits of dynamic ID of TITLE
will change. Last 4 digits of every field on the page will change but starting 6 digits of every element
on the page will remain same.

So if we use * wildcard, how will iMacros know which field to target because the starting digits of
every field are similar, which is: FIELD738284

NOTE: CSS class is also similar for the fields I need to target, so can't use that too.
Easiest Sol is probably to use 'Relative Positioning', with the 'TITLE' and 'IMAGE' Elements/Labels as respective 'Anchors' as they will probably be unique on your Page/Form and easily "taggable" thanks to their 'TXT' Attribute... :idea:

Well, there are 2 "easiest Sols" actually, the other one would be to use some other Attribute, like the Class for example, and/or a Combination of Attributes that might be able to uniquely identify those Fields...

=> Or a Combination of both Methods... Can't be more precise without looking at the Page myself...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Maxal
Posts: 32
Joined: Sun Feb 08, 2015 4:27 pm

Re: Dynamic form IDs

Post by Maxal » Wed May 15, 2019 7:30 pm

You want to see the screenshot of the page or the html source?
chivracq
Posts: 10301
Joined: Sat Apr 13, 2013 1:07 pm
Location: Amsterdam (NL)

Re: Dynamic form IDs

Post by chivracq » Wed May 15, 2019 8:45 pm

Maxal wrote:
Wed May 15, 2019 7:30 pm
You want to see the screenshot of the page or the html source?
Well, both or even better if you can simply post the URL of that Page, ah-ah...!
Or if the Page/Site is behind Login&Password, you can also upload an 'HTML Saveas' of the Page... (Needs to be zipped, Max 256Kb.)

But hum, you can also try yourself what I mentioned, there is nothing really complicated, and you are not a Newbie anymore I would think, after 4 years using iMacros...
- (F)CI(M) = (Full) Config Info (Missing): iMacros + Browser + OS (+ all 3 Versions + 'Free'/'PE'/'Trial').
- FCI not mentioned: I don't even read the Qt...! (or only to catch Spam!)
- Script & URL help a lot for more "educated" Help...
Maxal
Posts: 32
Joined: Sun Feb 08, 2015 4:27 pm

Re: Dynamic form IDs

Post by Maxal » Sun May 19, 2019 2:23 pm

Ah, I had created some macros with your help and those were fairly strong macros working for me for years flawlessly.
But now I feel as if I have forgotton whatever I had learned four years ago :(

This new thing is giving me headache because of changing but identical dynamic field names.

The page is inside admin area which is password protected. Wish I could let you in :(

I'll get you the html codes plus the screenshots.

Thanx chivracq
Post Reply