Loop command until text appears

Support for iMacros. The iMacros software is the unique solution for automating every activity inside a web browser, for data extraction and web testing.
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
rootada
Posts: 2
Joined: Sun Oct 30, 2011 12:46 am

Loop command until text appears

Post by rootada » Sun Oct 30, 2011 2:02 am

I hope I can explain what I'm trying to do properly.

I have a website that I'm trying to test and when I click a URL it will reset a few stats and continue cycling until its clear, 100%. For some entries, I may need to click the link 5 times, sometimes 10 times, etc. What I want to do is click the particular link until the text saying "100% clean" are on screen and then I want to click out of this section.

Creating the macro to navigate to this area and to click on the links itself seems to be easy, its trying to figure out how to stop clicking this particular link at 100% and to click out of this section at that point that is giving me a hard time. Does anyone happen to have any insight?
User avatar
Tech Support
Posts: 4948
Joined: Tue Sep 20, 2005 7:25 pm
Contact:

Re: Loop command until text appears

Post by Tech Support » Sun Oct 30, 2011 11:28 am

iMacros can wait for certain text or images to appear. Please see http://wiki.imacros.net/Web_Testing#Q:_ ... eb_page.3F for some ideas.
rootada
Posts: 2
Joined: Sun Oct 30, 2011 12:46 am

Re: Loop command until text appears

Post by rootada » Wed Nov 02, 2011 4:19 pm

I've been trying but the demo's and examples really are not that clear. What I'm trying to do is click a link, repeatedly, until the text 100% appears on screen, then I want the macro to click a completely separate link.

My problem thus far is that when clicking the link, the number of times the link has to be clicked to get to 100% varies. It works like this.

Example 1 - In this example, it took 4 clicks to get to 100% and once that was acheived, the link "back" was clicked.
Action: Click "Link"
Result: 10%
Action: Click "Link"
Result: 25%
Action: Click "Link"
Result: 75%
Action: Click "Link"
Result: 100%
Action: Click "Back"

Example 2 - In this example, it took 7 clicks to get to 100% and once that was acheived, the link "back was clicked.
Action: Click "Link"
Result: 10%
Action: Click "Link"
Result: 20%
Action: Click "Link"
Result: 40%
Action: Click "Link"
Result: 50%
Action: Click "Link"
Result: 65%
Action: Click "Link"
Result: 75%
Action: Click "Link"
Result: 100%
Action: Click "Back"

I've checked and I seem to understand how the TAG command could be used to search for a keyword on the page, however the text stating 100% is not a clickable link. Does anyone have any ideas how this can be done or is iMacros not capable of completing this particular task?
MattBell7
Posts: 627
Joined: Thu Nov 26, 2009 11:07 am
Location: United Kingdom

Re: Loop command until text appears

Post by MattBell7 » Wed Nov 02, 2011 4:22 pm

its sounding like a job for the scripting interface.

have a continuous loop clicking the first link, then extracting the text
if the text is 100% then stop the loop and click something else.

i can't see how you can do it with a single macro i'm afraid. a URL would make it easier to help you out though.
Post Reply