Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
casperjs
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
62f65d75
...
62f65d750140cef9c9d3923090808826e60e4c56
authored
2012-06-28 11:50:30 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
smarter Casper.echo()
1 parent
7db58eff
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
1 deletions
docs
modules/casper.js
docs
@
fa26816f
Subproject commit
de794d9573bb5b23da162129482b2d8a9acfbddc
Subproject commit
fa26816f9ddc9f40de50c6b478b7a57265293806
...
...
modules/casper.js
View file @
62f65d7
...
...
@@ -497,6 +497,17 @@ Casper.prototype.each = function each(array, fn) {
*/
Casper
.
prototype
.
echo
=
function
echo
(
text
,
style
,
pad
)
{
"use strict"
;
if
(
!
utils
.
isString
(
text
))
{
try
{
text
=
text
.
toString
();
}
catch
(
e
)
{
try
{
text
=
utils
.
serialize
(
text
);
}
catch
(
e
)
{
text
=
''
;
}
}
}
var
message
=
style
?
this
.
colorizer
.
colorize
(
text
,
style
,
pad
)
:
text
;
console
.
log
(
this
.
filter
(
'echo.message'
,
message
)
||
message
);
return
this
;
...
...
Please
register
or
sign in
to post a comment