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
000df9f4
...
000df9f4823dd03f7a9aaacd971781e1d9613217
authored
2012-05-21 12:06:40 +0200
by
Brikou CARRE
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
removed empty quotes
1 parent
ca75a1e4
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
8 additions
and
8 deletions
samples/bbcshots.js
samples/dynamic.js
samples/each.js
samples/googlelinks.js
samples/googlematch.js
samples/multirun.js
samples/bbcshots.js
View file @
000df9f
...
...
@@ -19,7 +19,7 @@ casper.start('http://www.bbc.co.uk/', function() {
nbLinks
=
this
.
evaluate
(
function
()
{
return
__utils__
.
findAll
(
'#promo2_carousel_items_items li'
).
length
;
});
this
.
echo
(
""
+
nbLinks
+
" items founds"
);
this
.
echo
(
nbLinks
+
" items founds"
);
// hide navigation arrows
this
.
hide
(
'.nav_left'
);
this
.
hide
(
'.nav_right'
);
...
...
samples/dynamic.js
View file @
000df9f
...
...
@@ -36,7 +36,7 @@ var start = function start(link) {
var
addLinks
=
function
addLinks
(
link
)
{
this
.
then
(
function
()
{
var
found
=
this
.
evaluate
(
searchLinks
);
this
.
echo
(
""
+
found
.
length
+
" links found on "
+
link
);
this
.
echo
(
found
.
length
+
" links found on "
+
link
);
links
=
links
.
concat
(
found
);
});
};
...
...
samples/each.js
View file @
000df9f
...
...
@@ -10,7 +10,7 @@ casper.start();
casper
.
each
(
links
,
function
(
self
,
link
)
{
this
.
thenOpen
(
link
,
function
()
{
this
.
echo
(
""
+
(
this
.
getTitle
())
+
" - "
+
link
);
this
.
echo
((
this
.
getTitle
())
+
" - "
+
link
);
});
});
...
...
samples/googlelinks.js
View file @
000df9f
...
...
@@ -32,7 +32,7 @@ casper.then(function() {
casper
.
run
(
function
()
{
// display results
this
.
echo
(
""
+
links
.
length
+
" links found:"
);
this
.
echo
(
links
.
length
+
" links found:"
);
this
.
echo
(
" - "
+
links
.
join
(
"\n - "
));
this
.
exit
();
});
...
...
samples/googlematch.js
View file @
000df9f
...
...
@@ -49,7 +49,7 @@ casper.each(terms, function(self, term) {
term
:
term
,
score
:
score
});
self
.
echo
(
""
+
term
+
": "
+
score
);
self
.
echo
(
term
+
": "
+
score
);
});
});
...
...
samples/multirun.js
View file @
000df9f
...
...
@@ -13,7 +13,7 @@ var suites = [
this
.
echo
(
"Page title: "
+
(
this
.
getTitle
()));
});
this
.
then
(
function
()
{
this
.
echo
(
""
+
(
this
.
evaluate
(
countLinks
))
+
" links"
);
this
.
echo
((
this
.
evaluate
(
countLinks
))
+
" links"
);
});
},
function
()
{
this
.
echo
(
'Suite 2'
);
...
...
@@ -21,7 +21,7 @@ var suites = [
this
.
echo
(
"Page title: "
+
(
this
.
getTitle
()));
});
this
.
then
(
function
()
{
this
.
echo
(
""
+
(
this
.
evaluate
(
countLinks
))
+
" links"
);
this
.
echo
((
this
.
evaluate
(
countLinks
))
+
" links"
);
});
},
function
()
{
this
.
echo
(
'Suite 3'
);
...
...
@@ -29,7 +29,7 @@ var suites = [
this
.
echo
(
"Page title: "
+
(
this
.
getTitle
()));
});
this
.
then
(
function
()
{
this
.
echo
(
""
+
(
this
.
evaluate
(
countLinks
))
+
" links"
);
this
.
echo
((
this
.
evaluate
(
countLinks
))
+
" links"
);
});
}
];
...
...
Please
register
or
sign in
to post a comment