Nicola Kennedy wrote: > I want the code to do the following things: > 1. Check on page for a link. > 2. If link not there, press "Next page" > > 3. If link there, click on it. > > 4. When next page reached (if step 2 followed), repeat the action of looking > for link/clicking next. > Here is one way:
def click_links ie unless ie.link(:url, "http://www.freeuk.com").exists? ie.link(:value, 'Next page').click click_links ie else ie.link(:url, "http://www.freeuk.com").click end end _______________________________________________ Wtr-general mailing list [email protected] http://rubyforge.org/mailman/listinfo/wtr-general
