2

I've got a website with Ajax-loaded content. The content is showed in tabs, 20 items par page, with an Ajax link to load the 20 following items.

I'd like to run some tests as : "As long as there is a link to the next page, click it, then ... [do something]", then proceed to the next page (loop)

I can't know for sure how many pages I'll have to go through.

Is there a simple way to achieve this ? (ie something like a While loop in CasperJS)

Thank you very much!

Didier Sampaolo
  • 2,566
  • 4
  • 24
  • 34
  • There are multiple answers to this type of question here: [CasperJS loop or iterate through multiple web pages?](http://stackoverflow.com/q/23384963/1816580). Hint: you need recursion. – Artjom B. Jul 08 '14 at 17:16

1 Answers1

2

One option could be:

casperjs-goto

Hope it helps