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 "https://www.uline.com/Product/GuidedNav?t=184360&dup=over" // 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 next[0].click() currentPage++ } For me this works and fixes the problem. -- Alexander Kriegisch https://scrum-master.de -- 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 [email protected]. To post to this group, send email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/geb-user/20170808073810.D415C6600C6B%40dd39516.kasserver.com. For more options, visit https://groups.google.com/d/optout.
