Page 1 of 1

Loop command until text appears

Posted: Sun Oct 30, 2011 2:02 am
by rootada
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?

Re: Loop command until text appears

Posted: Sun Oct 30, 2011 11:28 am
by Tech Support
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.

Re: Loop command until text appears

Posted: Wed Nov 02, 2011 4:19 pm
by rootada
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?

Re: Loop command until text appears

Posted: Wed Nov 02, 2011 4:22 pm
by MattBell7
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.