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
a03c6757
...
a03c6757610475c84acdac5bee7007d1a741a049
authored
2011-10-06 12:41:05 +0200
by
Nicolas Perriault
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
reintroduced CasperUtils#exists, erroneously deleted on merge
1 parent
e13b9169
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
0 deletions
casper.js
casper.js
View file @
a03c675
...
...
@@ -546,6 +546,20 @@
};
/**
* Checks if a given DOM element exists in remote page.
*
* @param String selector CSS3 selector
* @return Boolean
*/
this
.
exists
=
function
(
selector
)
{
try
{
return
document
.
querySelectorAll
(
selector
).
length
>
0
;
}
catch
(
e
)
{
return
false
;
}
};
/**
* Downloads a resource behind an url and returns its base64-encoded
* contents.
*
...
...
Please
register
or
sign in
to post a comment