Dynamic Website Content

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
LaimisV
Posts: 22
Joined: Thu Jan 17, 2013 12:05 pm

Dynamic Website Content

Post by LaimisV » Thu Mar 07, 2013 3:12 pm

Hi,

Sometimes I want to realize website automation with dynamic content. For example: If we don't know, before opening website, how much entries will be showed. Is it possible to count it/ use it in POS={{!VAR1}}? And open last entry/all entries ?
Last edited by LaimisV on Thu Mar 07, 2013 3:29 pm, edited 2 times in total.
LaimisV
Posts: 22
Joined: Thu Jan 17, 2013 12:05 pm

Re: Dynamic Website Content

Post by LaimisV » Thu Mar 07, 2013 3:22 pm

This needed for opening random links. I have an example with POS={{!VAR1}} and EVAL random POS ID opening, but this works when we know how much entries/links will be showed. In this case I don't know. It is dynamic content.
Hannes, Tech Support

Re: Dynamic Website Content

Post by Hannes, Tech Support » Thu Mar 07, 2013 7:57 pm

As a reminder: answering your own post makes the thread drop from the list of "unanswered threads".

In order to get the total number of entries, you need a script that tries to select them one by one until there is none left.
Alternatively, you could do some magic using regular expressions and counting the matches.
LaimisV
Posts: 22
Joined: Thu Jan 17, 2013 12:05 pm

Re: Dynamic Website Content

Post by LaimisV » Fri Mar 08, 2013 9:53 am

Okey, Hannes.
I'm a bit confused with this task, but trying to read about regexp. How to get last entry/POS number ? Could you explain a little bit more ?

Thanks
Hannes, Tech Support

Re: Dynamic Website Content

Post by Hannes, Tech Support » Fri Mar 08, 2013 1:23 pm

In a Javascript macro or an EVAL command you may use JavaScripts match and count the elements of that match. Unfortunately I am not a JS guru, so I can't make up a sample quickly.
LaimisV
Posts: 22
Joined: Thu Jan 17, 2013 12:05 pm

Re: Dynamic Website Content

Post by LaimisV » Fri Mar 08, 2013 1:43 pm

Thank you for direction. Sometimes I'm using JS EVAL commands in macros. I'll try to do this.
Post Reply