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
61e42819
...
61e42819e6c0ae10838715033522edbceb97c7e7
authored
2013-03-14 12:00:54 -0700
by
JF Paradis
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
refs #417 - Added options retryTimeout
1 parent
4817c308
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
2 deletions
docs/modules/casper.rst
modules/casper.js
docs/modules/casper.rst
View file @
61e4281
...
...
@@ -329,6 +329,15 @@ Viewport size, eg. ``{width: 800, height: 600}``
.. index:: timeout
``retryTimeout``
-------------------------------------------------------------------------------
**Type:** ``Number``
**Default:** ``100``
Default delay between attempts, for ``wait*`` family functions.
``waitTimeout``
-------------------------------------------------------------------------------
...
...
modules/casper.js
View file @
61e4281
...
...
@@ -119,6 +119,7 @@ var Casper = function Casper(options) {
stepTimeout
:
null
,
timeout
:
null
,
verbose
:
false
,
retryTimeout
:
100
,
waitTimeout
:
5000
};
// options
...
...
@@ -1342,7 +1343,7 @@ Casper.prototype.run = function run(onComplete, time) {
}
this
.
log
(
f
(
"Running suite: %d step%s"
,
this
.
steps
.
length
,
this
.
steps
.
length
>
1
?
"s"
:
""
),
"info"
);
this
.
emit
(
'run.start'
);
this
.
checker
=
setInterval
(
this
.
checkStep
,
(
time
?
time
:
100
),
this
,
onComplete
);
this
.
checker
=
setInterval
(
this
.
checkStep
,
(
time
?
time
:
this
.
options
.
retryTimeout
),
this
,
onComplete
);
return
this
;
};
...
...
@@ -1875,7 +1876,7 @@ Casper.prototype.waitFor = function waitFor(testFx, then, onTimeout, timeout) {
if
(
then
)
{
self
.
then
(
then
);
}
},
100
,
this
,
testFx
,
timeout
,
onTimeout
);
},
this
.
options
.
retryTimeout
,
this
,
testFx
,
timeout
,
onTimeout
);
this
.
waiters
.
push
(
interval
);
});
};
...
...
Please
register
or
sign in
to post a comment