-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactoring .NET capability handling
This commit introduces a large, and intrusive refactor of the .NET bindings' capability handling. It introduces a new class, `RemoteSessionSettings`, for use with creating remote sessions via `RemoteWebDriver`. Additionally, the `DesiredCapabilities` class is now marked as deprecated and will generate a compile warning on its use. The RemoteSessionSettings class is designed for use cases where the user wants to create a remote session using RemoteWebDriver where all of the nodes in the session creation support the W3C WebDriver Specification dialect of the wire protocol. This class is designed to be used in conjunction with the browser-specific driver options classes for matching capabilities on the remote end. For single-browser cases, it is still possible (though unnecessary) to use a browser-specific driver options class (`ChromeOptions`, `FirefoxOptions`, etc.) by calling the `ToCapabilities()` method, but the capabilities returned are now read-only, and cannot be added to. Users who feel the need to modify the options class after converting to capabilities are encouraged to add the additional capabilites to the options class before the conversion by appropriate use of the `AddAdditionalCapability` method.
- Loading branch information
Showing
17 changed files
with
1,015 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace OpenQA.Selenium.Remote | ||
{ | ||
public class DriverOptionsMergeResult | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether the DriverOptions would conflict when merged with another option | ||
/// </summary> | ||
public bool IsMergeConflict { get; set; } | ||
|
||
/// <summary> | ||
/// Gets or sets the name of the name of the option that is in conflict. | ||
/// </summary> | ||
public string MergeConflictOptionName { get; set; } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
dotnet/src/webdriver/Internal/IHasCapabilitiesDictionary.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// <copyright file="IHasCapabilitiesDictionary.cs" company="WebDriver Committers"> | ||
// Licensed to the Software Freedom Conservancy (SFC) under one | ||
// or more contributor license agreements. See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership. The SFC licenses this file | ||
// to you under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
// </copyright> | ||
|
||
using System.Collections.Generic; | ||
|
||
namespace OpenQA.Selenium.Internal | ||
{ | ||
/// <summary> | ||
/// Defines the interface through which the user can access the driver used to find an element. | ||
/// </summary> | ||
internal interface IHasCapabilitiesDictionary | ||
{ | ||
/// <summary> | ||
/// Gets the underlying Dictionary for a given set of capabilities. | ||
/// </summary> | ||
Dictionary<string, object> CapabilitiesDictionary { get; } | ||
} | ||
} |
Oops, something went wrong.