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
6be95765
...
6be957654b4f39c8a6db5d0ebfd36a60a214cd4d
authored
2012-11-15 00:04:16 +0100
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixes #277 - multiline support in ClientUtils.echo()
1 parent
29b6c486
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
modules/casper.js
modules/casper.js
View file @
6be9576
...
...
@@ -1798,13 +1798,14 @@ function createPage(casper) {
};
page
.
onConsoleMessage
=
function
onConsoleMessage
(
msg
)
{
// client utils casper console message
var
consoleTest
=
/^
\[
casper
\.
echo
\]\s?(
.
*
)
/
.
exec
(
msg
);
var
consoleTest
=
/^
\[
casper
\.
echo
\]\s?(
[\s\S]
*
)
/
.
exec
(
msg
);
if
(
consoleTest
&&
consoleTest
.
length
===
2
)
{
casper
.
echo
(
consoleTest
[
1
]);
return
;
// don't trigger remote.message event for these
}
// client utils log messages
var
logLevel
=
"info"
,
logTest
=
/^
\[
casper:
(\w
+
)\]\s?(
.*
)
/
.
exec
(
msg
);
var
logLevel
=
"info"
,
logTest
=
/^
\[
casper:
(\w
+
)\]\s?([\s\S]
*
)
/m
.
exec
(
msg
);
if
(
logTest
&&
logTest
.
length
===
3
)
{
logLevel
=
logTest
[
1
];
msg
=
logTest
[
2
];
...
...
Please
register
or
sign in
to post a comment