question coming from phantom/casper

33 views
Skip to first unread message

mathisonian

unread,
Dec 11, 2013, 4:13:39 PM12/11/13
to zomb...@googlegroups.com
Hello All,

I am considering switching some scripts I have from casperjs to zombie.js. (My whole project is written in node, and I would love to remove the barrier between my casper scripts and the rest of my code).

There is one thing that I am uncertain about -

I am dealing with pages that have several redirects, and refreshes, so I need to: 
 * take an action
 * wait for the page to look a certain way, or the url to match a certain pattern
 * continue running the rest of the script

In casper I have access to the `waitForSelector` and `waitForUrl` functions which basically do what I describe above. Is it possible to replicate this functionality using zombie? I couldn't find anything in the documentation or other posts, apologies if this question has been asked before

- m

Assaf Arkin

unread,
Dec 13, 2013, 1:59:58 PM12/13/13
to mathisonian, zomb...@googlegroups.com
There’s a function called wait that takes a completion function. That function is called repeatedly with reference to the window, and should return true when it’s time to complete (element is visible, specific URL, etc).

--
You received this message because you are subscribed to the Google Groups "zombie.js" group.
To unsubscribe from this group and stop receiving emails from it, send an email to zombie-js+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

–––––

Subscribe to Weekend Reading, a newsletter about design, code, startup life and the occasional odd

Reply all
Reply to author
Forward
0 new messages