File tree Expand file tree Collapse file tree 10 files changed +20
-50
lines changed Expand file tree Collapse file tree 10 files changed +20
-50
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,8 @@ class WaitForAttribute extends events.EventEmitter {
2626 constructor ( ) {
2727 super ( ) ;
2828
29- this . timeoutRetryInMilliseconds = 100 ;
30- this . defaultTimeoutInMilliseconds = 5000 ;
29+ this . timeoutRetryInMilliseconds = this . api . globals . waitForConditionPollInterval || 100 ;
30+ this . defaultTimeoutInMilliseconds = this . api . globals . waitForConditionTimeout || 5000 ;
3131 this . locateStrategy = "css" ;
3232 this . startTimeInMilliseconds = null ;
3333 }
@@ -51,9 +51,6 @@ class WaitForAttribute extends events.EventEmitter {
5151
5252 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
5353
54- if ( typeof timeoutInMilliseconds !== 'number' ) {
55- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
56- }
5754 if ( typeof timeoutInMilliseconds !== 'number' ) {
5855 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
5956 }
Original file line number Diff line number Diff line change @@ -19,17 +19,14 @@ class WaitForJqueryAjaxRequest extends events.EventEmitter {
1919 constructor ( ) {
2020 super ( ) ;
2121
22- this . timeoutRetryInMilliseconds = 100 ;
23- this . defaultTimeoutInMilliseconds = 5000 ;
22+ this . timeoutRetryInMilliseconds = this . api . globals . waitForConditionPollInterval || 100 ;
23+ this . defaultTimeoutInMilliseconds = this . api . globals . waitForConditionTimeout || 5000 ;
2424 this . startTimeInMilliseconds = null ;
2525 }
2626
2727 command ( timeoutInMilliseconds , defaultMessage ) {
2828 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
2929
30- if ( typeof timeoutInMilliseconds !== 'number' ) {
31- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
32- }
3330 if ( typeof timeoutInMilliseconds !== 'number' ) {
3431 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
3532 }
Original file line number Diff line number Diff line change @@ -22,17 +22,14 @@ class WaitForJqueryElement extends events.EventEmitter {
2222 constructor ( ) {
2323 super ( ) ;
2424
25- this . timeoutRetryInMilliseconds = 100 ;
26- this . defaultTimeoutInMilliseconds = 5000 ;
25+ this . timeoutRetryInMilliseconds = this . api . globals . waitForConditionPollInterval || 100 ;
26+ this . defaultTimeoutInMilliseconds = this . api . globals . waitForConditionTimeout || 5000 ;
2727 this . startTimeInMilliseconds = null ;
2828 }
2929
3030 command ( elementSelector , timeoutInMilliseconds , defaultMessage ) {
3131 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
3232
33- if ( typeof timeoutInMilliseconds !== 'number' ) {
34- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
35- }
3633 if ( typeof timeoutInMilliseconds !== 'number' ) {
3734 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
3835 }
Original file line number Diff line number Diff line change @@ -25,8 +25,8 @@ class WaitForText extends events.EventEmitter {
2525 constructor ( ) {
2626 super ( ) ;
2727
28- this . timeoutRetryInMilliseconds = 100 ;
29- this . defaultTimeoutInMilliseconds = 5000 ;
28+ this . timeoutRetryInMilliseconds = this . api . globals . waitForConditionPollInterval || 100 ;
29+ this . defaultTimeoutInMilliseconds = this . api . globals . waitForConditionTimeout || 5000 ;
3030 this . locateStrategy = "css" ;
3131 this . startTimeInMilliseconds = null ;
3232 }
@@ -46,9 +46,6 @@ class WaitForText extends events.EventEmitter {
4646
4747 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
4848
49- if ( typeof timeoutInMilliseconds !== 'number' ) {
50- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
51- }
5249 if ( typeof timeoutInMilliseconds !== 'number' ) {
5350 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
5451 }
Original file line number Diff line number Diff line change @@ -24,17 +24,14 @@ class WaitForTitle extends events.EventEmitter {
2424 constructor ( ) {
2525 super ( ) ;
2626
27- this . timeoutRetryInMilliseconds = 100 ;
28- this . defaultTimeoutInMilliseconds = 5000 ;
27+ this . timeoutRetryInMilliseconds = this . api . globals . waitForConditionPollInterval || 100 ;
28+ this . defaultTimeoutInMilliseconds = this . api . globals . waitForConditionTimeout || 5000 ;
2929 this . startTimeInMilliseconds = null ;
3030 }
3131
3232 command ( checker , timeoutInMilliseconds , defaultMessage ) {
3333 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
3434
35- if ( typeof timeoutInMilliseconds !== 'number' ) {
36- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
37- }
3835 if ( typeof timeoutInMilliseconds !== 'number' ) {
3936 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
4037 }
Original file line number Diff line number Diff line change @@ -48,8 +48,8 @@ var WaitForAttribute = function (_events$EventEmitter) {
4848
4949 var _this = _possibleConstructorReturn ( this , ( WaitForAttribute . __proto__ || Object . getPrototypeOf ( WaitForAttribute ) ) . call ( this ) ) ;
5050
51- _this . timeoutRetryInMilliseconds = 100 ;
52- _this . defaultTimeoutInMilliseconds = 5000 ;
51+ _this . timeoutRetryInMilliseconds = _this . api . globals . waitForConditionPollInterval || 100 ;
52+ _this . defaultTimeoutInMilliseconds = _this . api . globals . waitForConditionTimeout || 5000 ;
5353 _this . locateStrategy = "css" ;
5454 _this . startTimeInMilliseconds = null ;
5555 return _this ;
@@ -79,9 +79,6 @@ var WaitForAttribute = function (_events$EventEmitter) {
7979
8080 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
8181
82- if ( typeof timeoutInMilliseconds !== 'number' ) {
83- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
84- }
8582 if ( typeof timeoutInMilliseconds !== 'number' ) {
8683 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
8784 }
Original file line number Diff line number Diff line change @@ -41,8 +41,8 @@ var WaitForJqueryAjaxRequest = function (_events$EventEmitter) {
4141
4242 var _this = _possibleConstructorReturn ( this , ( WaitForJqueryAjaxRequest . __proto__ || Object . getPrototypeOf ( WaitForJqueryAjaxRequest ) ) . call ( this ) ) ;
4343
44- _this . timeoutRetryInMilliseconds = 100 ;
45- _this . defaultTimeoutInMilliseconds = 5000 ;
44+ _this . timeoutRetryInMilliseconds = _this . api . globals . waitForConditionPollInterval || 100 ;
45+ _this . defaultTimeoutInMilliseconds = _this . api . globals . waitForConditionTimeout || 5000 ;
4646 _this . startTimeInMilliseconds = null ;
4747 return _this ;
4848 }
@@ -54,9 +54,6 @@ var WaitForJqueryAjaxRequest = function (_events$EventEmitter) {
5454
5555 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
5656
57- if ( typeof timeoutInMilliseconds !== 'number' ) {
58- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
59- }
6057 if ( typeof timeoutInMilliseconds !== 'number' ) {
6158 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
6259 }
Original file line number Diff line number Diff line change @@ -44,8 +44,8 @@ var WaitForJqueryElement = function (_events$EventEmitter) {
4444
4545 var _this = _possibleConstructorReturn ( this , ( WaitForJqueryElement . __proto__ || Object . getPrototypeOf ( WaitForJqueryElement ) ) . call ( this ) ) ;
4646
47- _this . timeoutRetryInMilliseconds = 100 ;
48- _this . defaultTimeoutInMilliseconds = 5000 ;
47+ _this . timeoutRetryInMilliseconds = _this . api . globals . waitForConditionPollInterval || 100 ;
48+ _this . defaultTimeoutInMilliseconds = _this . api . globals . waitForConditionTimeout || 5000 ;
4949 _this . startTimeInMilliseconds = null ;
5050 return _this ;
5151 }
@@ -57,9 +57,6 @@ var WaitForJqueryElement = function (_events$EventEmitter) {
5757
5858 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
5959
60- if ( typeof timeoutInMilliseconds !== 'number' ) {
61- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
62- }
6360 if ( typeof timeoutInMilliseconds !== 'number' ) {
6461 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
6562 }
Original file line number Diff line number Diff line change @@ -47,8 +47,8 @@ var WaitForText = function (_events$EventEmitter) {
4747
4848 var _this = _possibleConstructorReturn ( this , ( WaitForText . __proto__ || Object . getPrototypeOf ( WaitForText ) ) . call ( this ) ) ;
4949
50- _this . timeoutRetryInMilliseconds = 100 ;
51- _this . defaultTimeoutInMilliseconds = 5000 ;
50+ _this . timeoutRetryInMilliseconds = _this . api . globals . waitForConditionPollInterval || 100 ;
51+ _this . defaultTimeoutInMilliseconds = _this . api . globals . waitForConditionTimeout || 5000 ;
5252 _this . locateStrategy = "css" ;
5353 _this . startTimeInMilliseconds = null ;
5454 return _this ;
@@ -78,9 +78,6 @@ var WaitForText = function (_events$EventEmitter) {
7878
7979 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
8080
81- if ( typeof timeoutInMilliseconds !== 'number' ) {
82- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
83- }
8481 if ( typeof timeoutInMilliseconds !== 'number' ) {
8582 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
8683 }
Original file line number Diff line number Diff line change @@ -46,8 +46,8 @@ var WaitForTitle = function (_events$EventEmitter) {
4646
4747 var _this = _possibleConstructorReturn ( this , ( WaitForTitle . __proto__ || Object . getPrototypeOf ( WaitForTitle ) ) . call ( this ) ) ;
4848
49- _this . timeoutRetryInMilliseconds = 100 ;
50- _this . defaultTimeoutInMilliseconds = 5000 ;
49+ _this . timeoutRetryInMilliseconds = _this . api . globals . waitForConditionPollInterval || 100 ;
50+ _this . defaultTimeoutInMilliseconds = _this . api . globals . waitForConditionTimeout || 5000 ;
5151 _this . startTimeInMilliseconds = null ;
5252 return _this ;
5353 }
@@ -59,9 +59,6 @@ var WaitForTitle = function (_events$EventEmitter) {
5959
6060 this . startTimeInMilliseconds = new Date ( ) . getTime ( ) ;
6161
62- if ( typeof timeoutInMilliseconds !== 'number' ) {
63- timeoutInMilliseconds = this . api . globals . waitForConditionTimeout ;
64- }
6562 if ( typeof timeoutInMilliseconds !== 'number' ) {
6663 timeoutInMilliseconds = this . defaultTimeoutInMilliseconds ;
6764 }
You can’t perform that action at this time.
0 commit comments