forked from SeleniumHQ/selenium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathWebDriverResult.cs
272 lines (225 loc) · 11.2 KB
/
WebDriverResult.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
// <copyright file="WebDriverResult.cs" company="Selenium 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;
#nullable enable
namespace OpenQA.Selenium
{
/// <summary>
/// Specifies return values for actions in the driver.
/// </summary>
public enum WebDriverResult
{
/// <summary>
/// The action was successful.
/// </summary>
Success = 0,
/// <summary>
/// The index specified for the action was out of the acceptable range.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
IndexOutOfBounds = 1,
/// <summary>
/// No collection was specified.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoCollection = 2,
/// <summary>
/// No string was specified.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoString = 3,
/// <summary>
/// No string length was specified.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoStringLength = 4,
/// <summary>
/// No string wrapper was specified.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoStringWrapper = 5,
/// <summary>
/// Occurs if the given <see href="https://www.w3.org/TR/webdriver2/#dfn-session-id">session id</see> is not in the list of <see href="https://www.w3.org/TR/webdriver2/#dfn-active-sessions">active sessions</see>, meaning the session either does not exist or that it's not active.
/// </summary>
NoSuchDriver = 6,
/// <summary>
/// An element could not be located on the page using the given search parameters.
/// </summary>
NoSuchElement = 7,
/// <summary>
/// A command to switch to a frame could not be satisfied because the frame could not be found.
/// </summary>
NoSuchFrame = 8,
/// <summary>
/// A command could not be executed because the <see href="https://www.w3.org/TR/webdriver2/#dfn-remote-ends">remote end</see> is not aware of it.
/// </summary>
UnknownCommand = 9,
/// <summary>
/// A command failed because the referenced element is no longer attached to the DOM.
/// </summary>
ObsoleteElement = 10,
/// <summary>
/// The specified element is not displayed.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
ElementNotDisplayed = 11,
/// <summary>
/// A command could not be completed because the element is in an invalid state, e.g. attempting to <see href="https://www.w3.org/TR/webdriver2/#dfn-element-clear">clear</see> an element that isn't both <see href="https://www.w3.org/TR/webdriver2/#dfn-editable">editable</see> and <see href="https://www.w3.org/TR/webdriver2/#dfn-resettable-elements">resettable</see>.
/// </summary>
InvalidElementState = 12,
/// <summary>
/// An unknown error occurred in the <see href="https://www.w3.org/TR/webdriver2/#dfn-remote-ends">remote end</see> while processing the command.
/// </summary>
UnknownError = 13,
/// <summary>
/// An unhandled error occurred.
/// </summary>
[Obsolete("This value is no longer set for unknown errors: use UnknownError instead. Will be removed in 4.30")]
UnhandledError = UnknownError,
/// <summary>
/// An error occurred, but it was expected.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
ExpectedError = 14,
/// <summary>
/// The specified element is not selected.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
ElementNotSelectable = 15,
/// <summary>
/// No document matching the criteria exists.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoSuchDocument = 16,
/// <summary>
/// An error occurred while executing JavaScript supplied by the user.
/// </summary>
UnexpectedJavaScriptError = 17,
/// <summary>
/// No result is available from the JavaScript execution.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoScriptResult = 18,
/// <summary>
/// The result from the JavaScript execution is not recognized.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
XPathLookupError = 19,
/// <summary>
/// No collection matching the criteria exists.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NoSuchCollection = 20,
/// <summary>
/// An operation did not complete before its timeout expired.
/// </summary>
Timeout = 21,
/// <summary>
/// A null pointer was received.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
NullPointer = 22,
/// <summary>
/// A command to switch to a window could not be satisfied because the window could not be found.
/// </summary>
NoSuchWindow = 23,
/// <summary>
/// An illegal attempt was made to set a cookie under a different domain than the current page.
/// </summary>
InvalidCookieDomain = 24,
/// <summary>
/// A command to set a cookie's value could not be satisfied.
/// </summary>
UnableToSetCookie = 25,
/// <summary>
/// A modal dialog was open, blocking this operation.
/// </summary>
UnexpectedAlertOpen = 26,
/// <summary>
/// An attempt was made to operate on a modal dialog when one was not open.
/// </summary>
NoAlertPresent = 27,
/// <summary>
/// A script did not complete before its timeout expired.
/// </summary>
AsyncScriptTimeout = 28,
/// <summary>
/// The coordinates of the element are invalid.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
InvalidElementCoordinates = 29,
/// <summary>
/// Argument was an invalid selector.
/// </summary>
InvalidSelector = 32,
/// <summary>
/// A new <see href="https://www.w3.org/TR/webdriver2/#dfn-sessions">session</see> could not be created.
/// </summary>
SessionNotCreated = 33,
/// <summary>
/// The target for mouse interaction is not in the browser's viewport and cannot be brought into that viewport.
/// </summary>
MoveTargetOutOfBounds = 34,
/// <summary>
/// The XPath selector was invalid.
/// </summary>
[Obsolete("This error status is no longer returned by the WebDriver Specification https://www.w3.org/TR/webdriver2/#errors. Will be removed in 4.30")]
InvalidXPathSelector = 51,
/// <summary>
/// Navigation caused the user agent to hit a certificate warning, which is usually the result of an expired or invalid TLS certificate.
/// </summary>
InsecureCertificate = 59,
/// <summary>
/// A command could not be completed because the element is not <see href="https://www.w3.org/TR/webdriver2/#dfn-pointer-interactable">pointer</see>- or <see href="https://www.w3.org/TR/webdriver2/#dfn-keyboard-interactable">keyboard</see> interactable.
/// </summary>
ElementNotInteractable = 60,
/// <summary>
/// The arguments passed to a command are either invalid or malformed.
/// </summary>
InvalidArgument = 61,
/// <summary>
/// No cookie matching the given path name was found amongst the <see href="https://www.w3.org/TR/webdriver2/#dfn-associated-cookies">associated cookies</see> of session's current browsing context's active document.
/// </summary>
NoSuchCookie = 62,
/// <summary>
/// A screen capture was made impossible.
/// </summary>
UnableToCaptureScreen = 63,
/// <summary>
/// The <see href="https://www.w3.org/TR/webdriver2/#dfn-element-click">Element Click</see> command could not be completed because the element receiving the events is <see href="https://www.w3.org/TR/webdriver2/#dfn-obscuring">obscuring</see> the element that was requested clicked.
/// </summary>
ElementClickIntercepted = 64,
/// <summary>
/// The element does not have a shadow root.
/// </summary>
NoSuchShadowRoot = 65,
/// <summary>
/// The referenced shadow root is no longer attached to the DOM.
/// </summary>
DetachedShadowRoot = 66,
/// <summary>
/// The requested command matched a known URL but did not match any method for that URL.
/// </summary>
UnknownMethod = 67,
/// <summary>
/// Indicates that a command that should have executed properly cannot be supported for some reason.
/// </summary>
UnsupportedOperation = 68,
}
}