|
17 | 17 | // under the License. |
18 | 18 | // </copyright> |
19 | 19 |
|
| 20 | +using System; |
20 | 21 | using System.Collections.Generic; |
21 | 22 |
|
22 | 23 | namespace OpenQA.Selenium |
@@ -170,23 +171,26 @@ internal static class WebDriverError |
170 | 171 | /// <summary> |
171 | 172 | /// Represents the element not selectable error. |
172 | 173 | /// </summary> |
| 174 | + [Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")] |
173 | 175 | public const string ElementNotSelectable = "element not selectable"; |
174 | 176 |
|
175 | 177 | /// <summary> |
176 | 178 | /// Represents the element not visible error. |
177 | 179 | /// </summary> |
178 | 180 | /// 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")] |
179 | 182 | public const string ElementNotVisible = "element not visible"; |
180 | 183 |
|
181 | 184 | /// <summary> |
182 | 185 | /// Represents the invalid coordinates error. |
183 | 186 | /// </summary> |
| 187 | + [Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors")] |
184 | 188 | public const string InvalidCoordinates = "invalid coordinates"; |
185 | 189 |
|
186 | 190 | /// <summary> |
187 | 191 | /// Represents the invalid element coordinates error. |
188 | 192 | /// </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")] |
190 | 194 | public const string InvalidElementCoordinates = "invalid element coordinates"; |
191 | 195 |
|
192 | 196 | private static readonly Dictionary<string, WebDriverResult> resultMap; |
@@ -222,14 +226,6 @@ static WebDriverError() |
222 | 226 | resultMap[UnknownError] = WebDriverResult.UnknownError; |
223 | 227 | resultMap[UnknownMethod] = WebDriverResult.UnknownMethod; |
224 | 228 | 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 |
233 | 229 | } |
234 | 230 |
|
235 | 231 | /// <summary> |
|
0 commit comments