You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adding ability to detect spec-compliant capabilities in .NET
This commit updates the .NET `DesiredCapabilities` class to allow the
language bindings to construct the correct type of payload for the new
session command before sending the command to the remote end. This will
remove the burden from intermediate nodes (like the Java standalone server
and grid) from incorrectly parsing a driver using the legacy protocol
dialect (Edge, Safari, Chrome) and throwing an error on session creation.
Additionally, this commit also deprecates the static methods on the
`DesiredCapability` classes for specific browsers in .NET. For over a
year, the guidance for .NET users has been to use a browser-specific
options class (`FirefoxOptions`, `InternetExplorerOptions`, etc.) to
set specific capabilities for the driver to be instaniated. To use the
options classes with the Java standalone remote server or grid, call
the `ToCapabilities` method on the options object.
Fixes issue #4443.
/// Method to return a new DesiredCapabilities using defaults
175
185
/// </summary>
176
186
/// <returns>New instance of DesiredCapabilities for use with Firefox</returns>
187
+
[Obsolete("Use the FirefoxOptions class to set capabilities for use with Firefox. For use with the Java remote server or grid, use the ToCapabilites method of the FirefoxOptions class.")]
/// Method to return a new DesiredCapabilities using defaults
195
208
/// </summary>
196
209
/// <returns>New instance of DesiredCapabilities for use with Internet Explorer</returns>
210
+
[Obsolete("Use the InternetExplorerOptions class to set capabilities for use with Internet Explorer. For use with the Java remote server or grid, use the ToCapabilites method of the InternetExplorerOptions class.")]
@@ -203,9 +217,12 @@ public static DesiredCapabilities InternetExplorer()
203
217
/// Method to return a new DesiredCapabilities using defaults
204
218
/// </summary>
205
219
/// <returns>New instance of DesiredCapabilities for use with Microsoft Edge</returns>
220
+
[Obsolete("Use the EdgeOptions class to set capabilities for use with Edge. For use with the Java remote server or grid, use the ToCapabilites method of the EdgeOptions class.")]
@@ -250,17 +272,20 @@ public static DesiredCapabilities IPad()
250
272
/// Method to return a new DesiredCapabilities using defaults
251
273
/// </summary>
252
274
/// <returns>New instance of DesiredCapabilities for use with Chrome</returns>
275
+
[Obsolete("Use the ChromeOptions class to set capabilities for use with Chrome. For use with the Java remote server or grid, use the ToCapabilites method of the ChromeOptions class.")]
@@ -270,18 +295,24 @@ public static DesiredCapabilities Android()
270
295
/// Method to return a new DesiredCapabilities using defaults
271
296
/// </summary>
272
297
/// <returns>New instance of DesiredCapabilities for use with Opera</returns>
298
+
[Obsolete("Use the OperaOptions class to set capabilities for use with Opera. For use with the Java remote server or grid, use the ToCapabilites method of the OperaOptions class.")]
/// Method to return a new DesiredCapabilities using defaults
280
308
/// </summary>
281
309
/// <returns>New instance of DesiredCapabilities for use with Safari</returns>
310
+
[Obsolete("Use the SafariOptions class to set capabilities for use with Safari. For use with the Java remote server or grid, use the ToCapabilites method of the SafariOptions class.")]
0 commit comments