How can I make casperjs repeat a loop until a certain condition is met?
问题 I'm trying to get casperjs working with the following situation: A web page loads, then within that page, it ajax loads data items along with a 'read more' button which in turn loads some more data items. I need the script to recursively check if the 'read more' button exists (as there are many data items to load), if so, click it, else continue with the rest of the script and output the full page as a jpeg. I've tried by writing the code below, but it doesn't loop as I had hoped. It just