minor docs fixes for clientutils
Showing
1 changed file
with
7 additions
and
3 deletions
... | @@ -6,7 +6,11 @@ | ... | @@ -6,7 +6,11 @@ |
6 | The ``clientutils`` module | 6 | The ``clientutils`` module |
7 | ========================== | 7 | ========================== |
8 | 8 | ||
9 | Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the ``__utils__`` object instance of the ``ClientUtils`` class from the ``clientutils`` module. | 9 | Casper ships with a few client-side utilities which are injected in the remote DOM environment, and accessible from there through the ``__utils__`` object instance of the ``ClientUtils`` class from the ``clientutils`` module:: |
10 | |||
11 | casper.evaluate(function() { | ||
12 | __utils__.echo("Hello World!"); | ||
13 | }); | ||
10 | 14 | ||
11 | .. note:: | 15 | .. note:: |
12 | 16 | ||
... | @@ -21,7 +25,7 @@ Bookmarklet | ... | @@ -21,7 +25,7 @@ Bookmarklet |
21 | 25 | ||
22 | A bookmarklet is also available to help injecting Casper's client-side utilities in the DOM of your favorite browser. | 26 | A bookmarklet is also available to help injecting Casper's client-side utilities in the DOM of your favorite browser. |
23 | 27 | ||
24 | Just drag the link above onto your favorites toobar; when clicking, a ``__utils__`` object will be available within the console of your browser: | 28 | Just drag the following link onto your favorites toobar; when clicking it, a ``__utils__`` object will be available within the console of your browser: |
25 | 29 | ||
26 | .. raw:: html | 30 | .. raw:: html |
27 | 31 | ||
... | @@ -299,7 +303,7 @@ To get the form values:: | ... | @@ -299,7 +303,7 @@ To get the form values:: |
299 | 303 | ||
300 | **Signature:** ``log(String message[, String level])`` | 304 | **Signature:** ``log(String message[, String level])`` |
301 | 305 | ||
302 | Logs a message with an optional level. Will format the message a way CasperJS will be able to log phantomjs side. Default level is ``debug``. | 306 | Logs a message with an optional level. Will format the message a way CasperJS will be able to log phantomjs side. Default level is ``debug``:: |
303 | 307 | ||
304 | casper.start('http://foo.ner/').thenEvaluate(function() { | 308 | casper.start('http://foo.ner/').thenEvaluate(function() { |
305 | __utils__.log("We've got a problem on client side", 'error'); | 309 | __utils__.log("We've got a problem on client side", 'error'); | ... | ... |
-
Please register or sign in to post a comment