[Celerity-users] Navigating list of links without href's (.NET page)

Jari Bakken jari.bakken at gmail.com
Fri Jun 11 04:27:44 EDT 2010


Hi Kris,

On Fri, Jun 11, 2010 at 9:59 AM, Kris Leech <kris.leech at gmail.com> wrote:
> Can anyone suggest a better way than the one I am using, which according to
> the FAQ may result in an "invalid state".
>

You should be able to use :index to do the same, as along the list of
links doesn't change. Something like:

id = 'ctl00_CPHL_divPeopleZone'
count = browser.div(:id => id).links.size

1.upto(count).do |idx|
    browser.div(:id => id).link(:index => idx).click
    puts browser.url
    browser.back
end


More information about the Celerity-users mailing list