@@ -99,6 +99,7 @@ public abstract class DriverOptions
99
99
private string platformName ;
100
100
private Proxy proxy ;
101
101
private bool ? acceptInsecureCertificates ;
102
+ private bool ? useWebSocketUrl ;
102
103
private bool useStrictFileInteractability ;
103
104
private UnhandledPromptBehavior unhandledPromptBehavior = UnhandledPromptBehavior . Default ;
104
105
private PageLoadStrategy pageLoadStrategy = PageLoadStrategy . Default ;
@@ -118,6 +119,7 @@ protected DriverOptions()
118
119
this . AddKnownCapabilityName ( CapabilityType . UnhandledPromptBehavior , "UnhandledPromptBehavior property" ) ;
119
120
this . AddKnownCapabilityName ( CapabilityType . PageLoadStrategy , "PageLoadStrategy property" ) ;
120
121
this . AddKnownCapabilityName ( CapabilityType . UseStrictFileInteractability , "UseStrictFileInteractability property" ) ;
122
+ this . AddKnownCapabilityName ( CapabilityType . WebSocketUrl , "UseWebSocketUrl property" ) ;
121
123
}
122
124
123
125
/// <summary>
@@ -157,6 +159,16 @@ public bool? AcceptInsecureCertificates
157
159
set { this . acceptInsecureCertificates = value ; }
158
160
}
159
161
162
+ /// <summary>
163
+ /// Gets or sets a value indicating whether the driver should request a URL to
164
+ /// a WebSocket to be used for bidirectional communication.
165
+ /// </summary>
166
+ public bool ? UseWebSocketUrl
167
+ {
168
+ get { return this . useWebSocketUrl ; }
169
+ set { this . useWebSocketUrl = value ; }
170
+ }
171
+
160
172
/// <summary>
161
173
/// Gets or sets the value for describing how unexpected alerts are to be handled in the browser.
162
174
/// Defaults to <see cref="UnhandledPromptBehavior.Default"/>.
@@ -450,6 +462,11 @@ protected IWritableCapabilities GenerateDesiredCapabilities(bool isSpecification
450
462
capabilities . SetCapability ( CapabilityType . AcceptInsecureCertificates , this . acceptInsecureCertificates ) ;
451
463
}
452
464
465
+ if ( this . useWebSocketUrl . HasValue )
466
+ {
467
+ capabilities . SetCapability ( CapabilityType . WebSocketUrl , this . useWebSocketUrl ) ;
468
+ }
469
+
453
470
if ( this . useStrictFileInteractability )
454
471
{
455
472
capabilities . SetCapability ( CapabilityType . UseStrictFileInteractability , true ) ;
0 commit comments