You are having a timing issue. 'next[0].click()' is an asynchronous action 
changing the page content. You should use 'waitFor' in order to make sure that 
the page was actually updated as expected, e.g. like this:

go ""; // direct to 
Shipping Boxes
assert title == 'ULINE - Shipping Boxes'
def currentPage = 1
while (true) {
  waitFor { $("span.GNPaging 
a.DisabledLink")*.text().contains(currentPage.toString()) }
  def table = $('table.GNItemTable')
  assert table != null && table.size() > 0
  def theader = table.$('thead tr th')
  def next = $('a.EnabledLink', text: 'Next>')
  if (next == null || next.size() == 0) break

For me this works and fixes the problem.
Alexander Kriegisch

You received this message because you are subscribed to the Google Groups "Geb 
User Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
To post to this group, send email to
To view this discussion on the web visit
For more options, visit

Reply via email to