I want to check a page every x (configurable) seconds in CasperJS. If a certain page element is present, then the script would continue with some extra steps before exiting. Otherwise it continues checking every x seconds. What code construct can be used for this?
The task is checking a particular eBay store if a (rarely listed) item exists. The question is essentially how to construct a while loop which is compatible with CasperJS promises. It will require refreshing the page.