Merge pull request #709 from clochix/patch-3
Add documentation for ClientUtils.log()
Showing
1 changed file
with
13 additions
and
0 deletions
... | @@ -292,6 +292,19 @@ To get the form values:: | ... | @@ -292,6 +292,19 @@ To get the form values:: |
292 | 292 | ||
293 | __utils__.getFormValues('form#login'); // {username: 'foo', password: 'bar'} | 293 | __utils__.getFormValues('form#login'); // {username: 'foo', password: 'bar'} |
294 | 294 | ||
295 | .. index:: log | ||
296 | |||
297 | ``log()`` | ||
298 | ------------------------------------------------------------------------------- | ||
299 | |||
300 | **Signature:** ``log(String message[, String level])`` | ||
301 | |||
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``. | ||
303 | |||
304 | casper.start('http://foo.ner/').thenEvaluate(function() { | ||
305 | __utils__.log("We've got a problem on client side", 'error'); | ||
306 | }); | ||
307 | |||
295 | ``mouseEvent()`` | 308 | ``mouseEvent()`` |
296 | ------------------------------------------------------------------------------- | 309 | ------------------------------------------------------------------------------- |
297 | 310 | ... | ... |
-
Please register or sign in to post a comment