where's phantom.sleep() in 1.5?

2,836 views
Skip to first unread message

smartsl

unread,
Apr 23, 2012, 4:09:04 AM4/23/12
to phantomjs
It's reported that "TypeError: 'undefined' is not a function".

Ariya Hidayat

unread,
Apr 23, 2012, 7:12:07 PM4/23/12
to phan...@googlegroups.com
It's gone since ages. Please search the mailing-list for the discussion.


Regards,


--
Ariya Hidayat, http://ariya.ofilabs.com
http://twitter.com/ariyahidayat

Tuan Bach Van

unread,
Dec 3, 2012, 3:17:02 AM12/3/12
to phan...@googlegroups.com
Have you ever implement similar sleep function in phantomjs ?

James Greene

unread,
Dec 3, 2012, 2:08:43 PM12/3/12
to phan...@googlegroups.com
We used to have it but we removed it (for good reasons, IMO).  What is the use case in which you want to use a busy wait (sleep)?  They rarely make sense, especially in PhantomJS since it would generally prevent it from making any progress (e.g. your WebPage instances won't continue processing if the thread is sleeping).

You may be interested in using CasperJS, which has a nice "wait" method as an alternative for you:

~~James
Message has been deleted

James Greene

unread,
Dec 4, 2012, 12:17:20 AM12/4/12
to phan...@googlegroups.com
CasperJS is just a library built on top of PhantomJS.  It did recently add its own executables but they are not required: rather, there should still be a "bootstrap.js" or something like that around that you can just inject into the PhantomJS outer space in order to use CasperJS to its full capacity.

~~James



On Mon, Dec 3, 2012 at 8:56 PM, Tuan Bach Van <bach...@gmail.com> wrote:
Thank James, but seem Casperjs like another "Phantomjs" or something like that. All my project is used phantomjs , so converting to Casperjs will be take quite much time, I'm searching specific function for "wait" but seem i don't get any good result.
--
You received this message because you are subscribed to the Google Groups "phantomjs" group.
Visit this group at http://groups.google.com/group/phantomjs?hl=en.
 
 

James Greene

unread,
Dec 4, 2012, 12:20:56 AM12/4/12
to phan...@googlegroups.com
See the "Earlier versions of CasperJS" section in the CasperJS Installation docs for info on the bootstrapping script:

~~James

Tuan Bach Van

unread,
Dec 4, 2012, 2:32:06 AM12/4/12
to phan...@googlegroups.com
Thank man.
Reply all
Reply to author
Forward
0 new messages