@@ -59,29 +59,13 @@ public RemoteTimeouts(RemoteWebDriver driver)
59
59
/// </remarks>
60
60
public ITimeouts ImplicitlyWait ( TimeSpan timeToWait )
61
61
{
62
- // The *correct* approach to this timeout is to use the below
63
- // commented line of code and remove the remainder of this method.
64
- // However, we need to use the hard-coded timeout commmand for now,
65
- // since all drivers don't yet understand the generic "timeouts"
66
- // command endpoint.
67
- // this.ExecuteSetTimeout("implicit", timeToWait);
68
62
double milliseconds = timeToWait . TotalMilliseconds ;
69
63
if ( timeToWait == TimeSpan . MinValue )
70
64
{
71
65
milliseconds = - 1 ;
72
66
}
73
67
74
- if ( this . driver . IsSpecificationCompliant )
75
- {
76
- this . ExecuteSetTimeout ( "implicit" , timeToWait ) ;
77
- }
78
- else
79
- {
80
- Dictionary < string , object > parameters = new Dictionary < string , object > ( ) ;
81
- parameters . Add ( "ms" , milliseconds ) ;
82
- this . driver . InternalExecute ( DriverCommand . ImplicitlyWait , parameters ) ;
83
- }
84
-
68
+ this . ExecuteSetTimeout ( "implicit" , timeToWait ) ;
85
69
return this ;
86
70
}
87
71
@@ -93,21 +77,13 @@ public ITimeouts ImplicitlyWait(TimeSpan timeToWait)
93
77
/// <returns>A self reference</returns>
94
78
public ITimeouts SetScriptTimeout ( TimeSpan timeToWait )
95
79
{
96
- // The *correct* approach to this timeout is to use the below
97
- // commented line of code and remove the remainder of this method.
98
- // However, we need to use the hard-coded timeout commmand for now,
99
- // since all drivers don't yet understand the generic "timeouts"
100
- // command endpoint.
101
- // this.ExecuteSetTimeout("script", timeToWait);
102
80
double milliseconds = timeToWait . TotalMilliseconds ;
103
81
if ( timeToWait == TimeSpan . MinValue )
104
82
{
105
83
milliseconds = - 1 ;
106
84
}
107
85
108
- Dictionary < string , object > parameters = new Dictionary < string , object > ( ) ;
109
- parameters . Add ( "ms" , milliseconds ) ;
110
- this . driver . InternalExecute ( DriverCommand . SetAsyncScriptTimeout , parameters ) ;
86
+ this . ExecuteSetTimeout ( "script" , timeToWait ) ;
111
87
return this ;
112
88
}
113
89
0 commit comments