Skip to content

Commit edb9967

Browse files
committed
Remove mapping to obsolete webdriver errors, obsolete public-facing messages
1 parent a14ea4b commit edb9967

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

dotnet/src/webdriver/WebDriverError.cs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
// under the License.
1818
// </copyright>
1919

20+
using System;
2021
using System.Collections.Generic;
2122

2223
namespace OpenQA.Selenium
@@ -170,23 +171,26 @@ internal static class WebDriverError
170171
/// <summary>
171172
/// Represents the element not selectable error.
172173
/// </summary>
174+
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")]
173175
public const string ElementNotSelectable = "element not selectable";
174176

175177
/// <summary>
176178
/// Represents the element not visible error.
177179
/// </summary>
178180
/// TODO: Remove this string; it is no longer valid in the specification.
181+
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")]
179182
public const string ElementNotVisible = "element not visible";
180183

181184
/// <summary>
182185
/// Represents the invalid coordinates error.
183186
/// </summary>
187+
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")]
184188
public const string InvalidCoordinates = "invalid coordinates";
185189

186190
/// <summary>
187191
/// Represents the invalid element coordinates error.
188192
/// </summary>
189-
/// TODO: Remove this string; it is no longer valid in the specification.
193+
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")]
190194
public const string InvalidElementCoordinates = "invalid element coordinates";
191195

192196
private static readonly Dictionary<string, WebDriverResult> resultMap;
@@ -222,14 +226,6 @@ static WebDriverError()
222226
resultMap[UnknownError] = WebDriverResult.UnknownError;
223227
resultMap[UnknownMethod] = WebDriverResult.UnknownMethod;
224228
resultMap[UnsupportedOperation] = WebDriverResult.UnsupportedOperation;
225-
226-
// TODO: Remove these strings; it is no longer valid in the specification.
227-
#pragma warning disable CS0618 // Type or member is obsolete
228-
resultMap[ElementNotSelectable] = WebDriverResult.ElementNotSelectable;
229-
resultMap[ElementNotVisible] = WebDriverResult.ElementNotDisplayed;
230-
resultMap[InvalidCoordinates] = WebDriverResult.InvalidElementCoordinates;
231-
resultMap[InvalidElementCoordinates] = WebDriverResult.InvalidElementCoordinates;
232-
#pragma warning restore CS0618 // Type or member is obsolete
233229
}
234230

235231
/// <summary>

0 commit comments

Comments
 (0)