This will give you the number of links: browser = [your browser of choice]
puts browser.links.length ------- To create the loop: while browser.image(:src, /bullet_search_white_small.gif/).exists? puts 'exists' sleep 2 browser.refresh end Hope that helps. orde On Sep 9, 7:56 am, Guy <[email protected]> wrote: > Hello All, > > I'm New with watir but appreciate how good it is. > I'm looking for a way to count all PageTo(*) elements or to loop until > the bullet_search_white_small.gif ('Next' image) doesn't exist in the > page > Follows is the html code from the site > <div class='searchPagination'><dl class='jobSearchPagination'> > <a class='nextPage btn pinkbtn_small' href="javascript: PageTo > (4)"><strong>Next<img src='/general_ID_items/images/other/ > bullet_search_white_small.gif'></strong></a><dt>Page</dt> > <dd><a href="javascript: PageTo(1)">1</a></dd> > <dd><a href="javascript: PageTo(2)">2</a></dd><dd > class='currentPage'><span>3</span></dd> > <dd><a href="javascript: PageTo(4)">4</a></dd> > <dd><a href="javascript: PageTo(5)">5</a></dd> > <dd><a href="javascript: PageTo(6)">6</a></dd> > <dd><a href="javascript: PageTo(7)">7</a></dd> > <dd><a href="javascript: PageTo(8)">8</a></dd> > <dd><a href="javascript: PageTo(9)">9</a></dd> > <dd><a href="javascript: PageTo(10)">10</a></dd></dl></div> > </div> > Cheers, > Guy --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Watir General" group. To post to this group, send email to [email protected] Before posting, please read the following guidelines: http://wiki.openqa.org/display/WTR/Support To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/watir-general -~----------~----~----~----~------~----~------~--~---
