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
d2a77668
...
d2a77668b8163f620945ebdd98987865a52a3bbe
authored
2011-11-30 16:11:35 -0700
by
Solomon White
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
add waitWhileSelector()
1 parent
f9b9bb39
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
casper.js
casper.js
View file @
d2a7766
...
...
@@ -904,6 +904,23 @@
return
this
.
waitFor
(
function
(
self
)
{
return
self
.
exists
(
selector
);
},
then
,
onTimeout
,
timeout
);
},
/**
* Waits until an element matching the provided CSS3 selector does not exist in
* remote DOM to process a next step.
*
* @param String selector A CSS3 selector
* @param Function then The next step to perform (optional)
* @param Function onTimeout A callback function to call on timeout (optional)
* @param Number timeout The max amount of time to wait, in milliseconds (optional)
* @return Casper
*/
waitWhileSelector
:
function
(
selector
,
then
,
onTimeout
,
timeout
)
{
timeout
=
timeout
?
timeout
:
this
.
defaultWaitTimeout
;
return
this
.
waitFor
(
function
(
self
)
{
return
!
self
.
exists
(
selector
);
},
then
,
onTimeout
,
timeout
);
}
};
...
...
Please
register
or
sign in
to post a comment