-
-
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.
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.
- Loading branch information
Showing
4 changed files
with
84 additions
and
12 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
// <copyright file="ISpecificationCompliant.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; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
|
||
namespace OpenQA.Selenium.Remote | ||
{ | ||
/// <summary> | ||
/// Interface used to determine whether an implementing object is compliant with the W3C WebDriver specification. | ||
/// </summary> | ||
internal interface ISpecificationCompliant | ||
{ | ||
/// <summary> | ||
/// Gets or sets a value indicating whether this set of capabilities is compliant with the W3C WebDriver specification. | ||
/// </summary> | ||
bool IsSpecificationCompliant { 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