@wdio/protocols 8.0.15 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/index.d.ts +9 -10
- package/build/index.d.ts.map +1 -1
- package/build/index.js +9 -11
- package/build/protocols/appium.d.ts +1244 -0
- package/build/protocols/appium.d.ts.map +1 -0
- package/build/protocols/appium.js +1602 -0
- package/build/protocols/chromium.d.ts +384 -0
- package/build/protocols/chromium.d.ts.map +1 -0
- package/build/protocols/chromium.js +530 -0
- package/build/protocols/gecko.d.ts +76 -0
- package/build/protocols/gecko.d.ts.map +1 -0
- package/build/protocols/gecko.js +112 -0
- package/build/protocols/jsonwp.d.ts +1245 -0
- package/build/protocols/jsonwp.d.ts.map +1 -0
- package/build/protocols/jsonwp.js +1511 -0
- package/build/protocols/mjsonwp.d.ts +112 -0
- package/build/protocols/mjsonwp.d.ts.map +1 -0
- package/build/protocols/mjsonwp.js +126 -0
- package/build/protocols/saucelabs.d.ts +162 -0
- package/build/protocols/saucelabs.d.ts.map +1 -0
- package/build/protocols/saucelabs.js +297 -0
- package/build/protocols/selenium.d.ts +106 -0
- package/build/protocols/selenium.d.ts.map +1 -0
- package/build/protocols/selenium.js +132 -0
- package/build/protocols/webdriver.d.ts +1080 -0
- package/build/protocols/webdriver.d.ts.map +1 -0
- package/build/protocols/webdriver.js +1495 -0
- package/build/protocols/webdriverBidi.d.ts +35 -0
- package/build/protocols/webdriverBidi.d.ts.map +1 -0
- package/build/protocols/webdriverBidi.js +37 -0
- package/build/types.d.ts +8 -7
- package/build/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/protocols/appium.json +0 -1469
- package/protocols/chromium.json +0 -494
- package/protocols/gecko.json +0 -105
- package/protocols/jsonwp.json +0 -1366
- package/protocols/mjsonwp.json +0 -114
- package/protocols/saucelabs.json +0 -276
- package/protocols/selenium.json +0 -122
- package/protocols/webdriver.json +0 -1331
- package/protocols/webdriverBidi.json +0 -33
|
@@ -0,0 +1,1511 @@
|
|
|
1
|
+
export default {
|
|
2
|
+
'/status': {
|
|
3
|
+
GET: {
|
|
4
|
+
command: 'status',
|
|
5
|
+
description: "Query the server's current status. The server should respond with a general \"HTTP 200 OK\" response if it is alive and accepting commands. The response body should be a JSON object describing the state of the server. All server implementations should return two basic objects describing the server's current platform and when the server was built. All fields are optional; if omitted, the client should assume the value is unknown. Furthermore, server implementations may include additional fields not listed here.",
|
|
6
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#status',
|
|
7
|
+
parameters: [],
|
|
8
|
+
returns: {
|
|
9
|
+
type: 'Object',
|
|
10
|
+
name: 'status',
|
|
11
|
+
description: 'An object describing the general status of the server.',
|
|
12
|
+
},
|
|
13
|
+
},
|
|
14
|
+
},
|
|
15
|
+
'/session': {
|
|
16
|
+
POST: {
|
|
17
|
+
command: 'newSession',
|
|
18
|
+
description: 'Create a new session. The server should attempt to create a session that most closely matches the desired and required capabilities. Required capabilities have higher priority than desired capabilities and must be set for the session to be created.',
|
|
19
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#session-1',
|
|
20
|
+
parameters: [
|
|
21
|
+
{
|
|
22
|
+
name: 'desiredCapabilities',
|
|
23
|
+
type: 'object',
|
|
24
|
+
description: "An object describing the session's desired capabilities.",
|
|
25
|
+
required: true,
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'requiredCapabilities',
|
|
29
|
+
type: 'object',
|
|
30
|
+
description: "An object describing the session's required capabilities (Optional).",
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
returns: {
|
|
34
|
+
type: 'Object',
|
|
35
|
+
name: 'capabilities',
|
|
36
|
+
description: "An object describing the session's capabilities.",
|
|
37
|
+
},
|
|
38
|
+
},
|
|
39
|
+
},
|
|
40
|
+
'/sessions': {
|
|
41
|
+
GET: {
|
|
42
|
+
command: 'getSessions',
|
|
43
|
+
description: 'Returns a list of the currently active sessions. Each session will be returned as a list of JSON objects containing `id` and `capabilities`.',
|
|
44
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessions',
|
|
45
|
+
parameters: [],
|
|
46
|
+
returns: {
|
|
47
|
+
type: 'Object[]',
|
|
48
|
+
name: 'capabilities',
|
|
49
|
+
description: 'A list of the currently active sessions.',
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
'/session/:sessionId': {
|
|
54
|
+
GET: {
|
|
55
|
+
command: 'getSession',
|
|
56
|
+
description: 'Retrieve the capabilities of the specified session.',
|
|
57
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionid',
|
|
58
|
+
parameters: [],
|
|
59
|
+
returns: {
|
|
60
|
+
type: 'Object',
|
|
61
|
+
name: 'capabilities',
|
|
62
|
+
description: "An object describing the session's capabilities.",
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
DELETE: {
|
|
66
|
+
command: 'deleteSession',
|
|
67
|
+
description: 'Delete the session.',
|
|
68
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionid',
|
|
69
|
+
parameters: [],
|
|
70
|
+
},
|
|
71
|
+
},
|
|
72
|
+
'/session/:sessionId/timeouts': {
|
|
73
|
+
POST: {
|
|
74
|
+
command: 'setTimeouts',
|
|
75
|
+
description: 'Configure the amount of time that a particular type of operation can execute for before they are aborted and a |Timeout| error is returned to the client.',
|
|
76
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtimeouts',
|
|
77
|
+
parameters: [
|
|
78
|
+
{
|
|
79
|
+
name: 'type',
|
|
80
|
+
type: 'string',
|
|
81
|
+
description: 'The type of operation to set the timeout for. Valid values are: "script" for script timeouts, "implicit" for modifying the implicit wait timeout and "page load" for setting a page load timeout.',
|
|
82
|
+
required: true,
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
name: 'ms',
|
|
86
|
+
type: 'number',
|
|
87
|
+
description: 'The amount of time, in milliseconds, that time-limited commands are permitted to run',
|
|
88
|
+
required: true,
|
|
89
|
+
},
|
|
90
|
+
],
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
'/session/:sessionId/timeouts/async_script': {
|
|
94
|
+
POST: {
|
|
95
|
+
command: 'setAsyncTimeout',
|
|
96
|
+
description: 'Set the amount of time, in milliseconds, that asynchronous scripts executed by `/session/:sessionId/execute_async` are permitted to run before they are aborted and a `Timeout` error is returned to the client.',
|
|
97
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtimeoutsasync_script',
|
|
98
|
+
parameters: [
|
|
99
|
+
{
|
|
100
|
+
name: 'ms',
|
|
101
|
+
type: 'number',
|
|
102
|
+
description: 'The amount of time, in milliseconds, that time-limited commands are permitted to run',
|
|
103
|
+
required: true,
|
|
104
|
+
},
|
|
105
|
+
],
|
|
106
|
+
},
|
|
107
|
+
},
|
|
108
|
+
'/session/:sessionId/timeouts/implicit_wait': {
|
|
109
|
+
POST: {
|
|
110
|
+
command: 'setImplicitTimeout',
|
|
111
|
+
description: 'Set the amount of time the driver should wait when searching for elements. When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever occurs first. When searching for multiple elements, the driver should poll the page until at least one element is found or the timeout expires, at which point it should return an empty list. If this command is never sent, the driver should default to an implicit wait of 0ms.',
|
|
112
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtimeoutsimplicit_wait',
|
|
113
|
+
parameters: [
|
|
114
|
+
{
|
|
115
|
+
name: 'ms',
|
|
116
|
+
type: 'number',
|
|
117
|
+
description: 'The amount of time, in milliseconds, to wait on an element.',
|
|
118
|
+
required: true,
|
|
119
|
+
},
|
|
120
|
+
],
|
|
121
|
+
},
|
|
122
|
+
},
|
|
123
|
+
'/session/:sessionId/url': {
|
|
124
|
+
GET: {
|
|
125
|
+
command: 'getUrl',
|
|
126
|
+
description: 'Retrieve the URL of the current page.',
|
|
127
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidurl',
|
|
128
|
+
parameters: [],
|
|
129
|
+
returns: {
|
|
130
|
+
type: 'String',
|
|
131
|
+
name: 'url',
|
|
132
|
+
description: 'The current URL.',
|
|
133
|
+
},
|
|
134
|
+
},
|
|
135
|
+
POST: {
|
|
136
|
+
command: 'navigateTo',
|
|
137
|
+
description: 'Navigate to a new URL.',
|
|
138
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidurl',
|
|
139
|
+
parameters: [
|
|
140
|
+
{
|
|
141
|
+
name: 'url',
|
|
142
|
+
type: 'string',
|
|
143
|
+
description: 'The URL to navigate to.',
|
|
144
|
+
required: true,
|
|
145
|
+
},
|
|
146
|
+
],
|
|
147
|
+
},
|
|
148
|
+
},
|
|
149
|
+
'/session/:sessionId/back': {
|
|
150
|
+
POST: {
|
|
151
|
+
command: 'back',
|
|
152
|
+
description: 'Navigate backwards in the browser history, if possible.',
|
|
153
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidback',
|
|
154
|
+
parameters: [],
|
|
155
|
+
},
|
|
156
|
+
},
|
|
157
|
+
'/session/:sessionId/forward': {
|
|
158
|
+
POST: {
|
|
159
|
+
command: 'forward',
|
|
160
|
+
description: 'Navigate forwards in the browser history, if possible.',
|
|
161
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidforward',
|
|
162
|
+
parameters: [],
|
|
163
|
+
},
|
|
164
|
+
},
|
|
165
|
+
'/session/:sessionId/refresh': {
|
|
166
|
+
POST: {
|
|
167
|
+
command: 'refresh',
|
|
168
|
+
description: 'Refresh the current page.',
|
|
169
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidrefresh',
|
|
170
|
+
parameters: [],
|
|
171
|
+
},
|
|
172
|
+
},
|
|
173
|
+
'/session/:sessionId/title': {
|
|
174
|
+
GET: {
|
|
175
|
+
command: 'getTitle',
|
|
176
|
+
description: 'Get the current page title.',
|
|
177
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtitle',
|
|
178
|
+
parameters: [],
|
|
179
|
+
returns: {
|
|
180
|
+
type: 'String',
|
|
181
|
+
name: 'title',
|
|
182
|
+
description: 'The current page title.',
|
|
183
|
+
},
|
|
184
|
+
},
|
|
185
|
+
},
|
|
186
|
+
'/session/:sessionId/window_handle': {
|
|
187
|
+
GET: {
|
|
188
|
+
command: 'getWindowHandle',
|
|
189
|
+
description: 'Retrieve the current window handle.',
|
|
190
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidwindow_handle',
|
|
191
|
+
parameters: [],
|
|
192
|
+
returns: {
|
|
193
|
+
type: 'String',
|
|
194
|
+
name: 'windowHandle',
|
|
195
|
+
description: 'The current window handle.',
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
},
|
|
199
|
+
'/session/:sessionId/window_handles': {
|
|
200
|
+
GET: {
|
|
201
|
+
command: 'getWindowHandles',
|
|
202
|
+
description: 'Retrieve the list of all window handles available to the session.',
|
|
203
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidwindow_handles',
|
|
204
|
+
parameters: [],
|
|
205
|
+
returns: {
|
|
206
|
+
type: 'String[]',
|
|
207
|
+
name: 'windowHandles',
|
|
208
|
+
description: 'A list of window handles.',
|
|
209
|
+
},
|
|
210
|
+
},
|
|
211
|
+
},
|
|
212
|
+
'/session/:sessionId/window': {
|
|
213
|
+
DELETE: {
|
|
214
|
+
command: 'closeWindow',
|
|
215
|
+
description: 'Close the current window.',
|
|
216
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidwindow',
|
|
217
|
+
parameters: [],
|
|
218
|
+
},
|
|
219
|
+
POST: {
|
|
220
|
+
command: 'switchToWindow',
|
|
221
|
+
description: 'Change focus to another window. The window to change focus to may be specified by its server assigned window handle, or by the value of its `name` attribute.',
|
|
222
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidwindow',
|
|
223
|
+
parameters: [
|
|
224
|
+
{
|
|
225
|
+
name: 'name',
|
|
226
|
+
type: 'string',
|
|
227
|
+
description: 'The window to change focus to',
|
|
228
|
+
required: true,
|
|
229
|
+
},
|
|
230
|
+
],
|
|
231
|
+
},
|
|
232
|
+
},
|
|
233
|
+
'/session/:sessionId/frame': {
|
|
234
|
+
POST: {
|
|
235
|
+
command: 'switchToFrame',
|
|
236
|
+
description: "Change focus to another frame on the page. If the frame `id` is `null`, the server should switch to the page's default content.",
|
|
237
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidframe',
|
|
238
|
+
parameters: [
|
|
239
|
+
{
|
|
240
|
+
name: 'id',
|
|
241
|
+
type: '(string|number|object|null)',
|
|
242
|
+
description: 'Identifier for the frame to change focus to',
|
|
243
|
+
required: true,
|
|
244
|
+
},
|
|
245
|
+
],
|
|
246
|
+
},
|
|
247
|
+
},
|
|
248
|
+
'/session/:sessionId/frame/parent': {
|
|
249
|
+
POST: {
|
|
250
|
+
command: 'switchToParentFrame',
|
|
251
|
+
description: 'Change focus to the parent context. If the current context is the top level browsing context, the context remains unchanged.',
|
|
252
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidframeparent',
|
|
253
|
+
parameters: [],
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
'/session/:sessionId/window/current/position': {
|
|
257
|
+
GET: {
|
|
258
|
+
command: 'getWindowPosition',
|
|
259
|
+
description: 'Get the position of the current focussed window.',
|
|
260
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidwindowwindowhandleposition',
|
|
261
|
+
parameters: [],
|
|
262
|
+
returns: {
|
|
263
|
+
type: 'Object',
|
|
264
|
+
name: 'positon',
|
|
265
|
+
description: 'The X and Y coordinates for the window, relative to the upper left corner of the screen.',
|
|
266
|
+
},
|
|
267
|
+
},
|
|
268
|
+
POST: {
|
|
269
|
+
command: 'setWindowPosition',
|
|
270
|
+
description: 'Change the position of the current focussed window.',
|
|
271
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidwindowwindowhandleposition',
|
|
272
|
+
parameters: [
|
|
273
|
+
{
|
|
274
|
+
name: 'x',
|
|
275
|
+
type: 'number',
|
|
276
|
+
description: 'The X coordinate to position the window at, relative to the upper left corner of the screen.',
|
|
277
|
+
required: true,
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
name: 'y',
|
|
281
|
+
type: 'number',
|
|
282
|
+
description: 'The Y coordinate to position the window at, relative to the upper left corner of the screen.',
|
|
283
|
+
required: true,
|
|
284
|
+
},
|
|
285
|
+
],
|
|
286
|
+
returns: {
|
|
287
|
+
type: 'Object',
|
|
288
|
+
name: 'positon',
|
|
289
|
+
description: 'The X and Y coordinates for the window, relative to the upper left corner of the screen.',
|
|
290
|
+
},
|
|
291
|
+
},
|
|
292
|
+
},
|
|
293
|
+
'/session/:sessionId/window/current/size': {
|
|
294
|
+
GET: {
|
|
295
|
+
command: '_getWindowSize',
|
|
296
|
+
description: 'Get the size of the current focused window.',
|
|
297
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidwindowwindowhandlesize',
|
|
298
|
+
parameters: [],
|
|
299
|
+
returns: {
|
|
300
|
+
type: 'Object',
|
|
301
|
+
name: 'size',
|
|
302
|
+
description: 'The size of the window.',
|
|
303
|
+
},
|
|
304
|
+
},
|
|
305
|
+
POST: {
|
|
306
|
+
command: '_setWindowSize',
|
|
307
|
+
description: 'Change the size of the current focused window.',
|
|
308
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidwindowwindowhandlesize',
|
|
309
|
+
parameters: [
|
|
310
|
+
{
|
|
311
|
+
name: 'width',
|
|
312
|
+
type: 'number',
|
|
313
|
+
description: 'the new window width',
|
|
314
|
+
required: true,
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
name: 'height',
|
|
318
|
+
type: 'number',
|
|
319
|
+
description: 'the new window height',
|
|
320
|
+
required: true,
|
|
321
|
+
},
|
|
322
|
+
],
|
|
323
|
+
},
|
|
324
|
+
},
|
|
325
|
+
'/session/:sessionId/window/current/maximize': {
|
|
326
|
+
POST: {
|
|
327
|
+
command: 'maximizeWindow',
|
|
328
|
+
description: 'Maximize the current focused window if not already maximized.',
|
|
329
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidwindowwindowhandlemaximize',
|
|
330
|
+
parameters: [],
|
|
331
|
+
},
|
|
332
|
+
},
|
|
333
|
+
'/session/:sessionId/element': {
|
|
334
|
+
POST: {
|
|
335
|
+
command: 'findElement',
|
|
336
|
+
description: 'Search for an element on the page, starting from the document root. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.',
|
|
337
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelement',
|
|
338
|
+
parameters: [
|
|
339
|
+
{
|
|
340
|
+
name: 'using',
|
|
341
|
+
type: 'string',
|
|
342
|
+
description: 'the locator strategy to use',
|
|
343
|
+
required: true,
|
|
344
|
+
},
|
|
345
|
+
{
|
|
346
|
+
name: 'value',
|
|
347
|
+
type: 'string',
|
|
348
|
+
description: 'the search target',
|
|
349
|
+
required: true,
|
|
350
|
+
},
|
|
351
|
+
],
|
|
352
|
+
returns: {
|
|
353
|
+
type: 'object',
|
|
354
|
+
name: 'ELEMENT',
|
|
355
|
+
description: 'A WebElement JSON object for the located element.',
|
|
356
|
+
},
|
|
357
|
+
},
|
|
358
|
+
},
|
|
359
|
+
'/session/:sessionId/elements': {
|
|
360
|
+
POST: {
|
|
361
|
+
command: 'findElements',
|
|
362
|
+
description: 'Search for multiple elements on the page, starting from the document root. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.',
|
|
363
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelements',
|
|
364
|
+
parameters: [
|
|
365
|
+
{
|
|
366
|
+
name: 'using',
|
|
367
|
+
type: 'string',
|
|
368
|
+
description: 'the locator strategy to use',
|
|
369
|
+
required: true,
|
|
370
|
+
},
|
|
371
|
+
{
|
|
372
|
+
name: 'value',
|
|
373
|
+
type: 'string',
|
|
374
|
+
description: 'the search target',
|
|
375
|
+
required: true,
|
|
376
|
+
},
|
|
377
|
+
],
|
|
378
|
+
returns: {
|
|
379
|
+
type: 'object[]',
|
|
380
|
+
name: 'ELEMENTS',
|
|
381
|
+
description: 'A list of WebElement JSON objects for the located elements.',
|
|
382
|
+
},
|
|
383
|
+
},
|
|
384
|
+
},
|
|
385
|
+
'/session/:sessionId/element/:elementId/element': {
|
|
386
|
+
POST: {
|
|
387
|
+
command: 'findElementFromElement',
|
|
388
|
+
description: 'Search for an element on the page, starting from the identified element. The located element will be returned as a WebElement JSON object. The table below lists the locator strategies that each server should support. Each locator must return the first matching element located in the DOM.',
|
|
389
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidelement',
|
|
390
|
+
variables: [
|
|
391
|
+
{
|
|
392
|
+
name: 'elementId',
|
|
393
|
+
description: 'ID of the element to route the command to',
|
|
394
|
+
},
|
|
395
|
+
],
|
|
396
|
+
parameters: [
|
|
397
|
+
{
|
|
398
|
+
name: 'using',
|
|
399
|
+
type: 'string',
|
|
400
|
+
description: 'the locator strategy to use',
|
|
401
|
+
required: true,
|
|
402
|
+
},
|
|
403
|
+
{
|
|
404
|
+
name: 'value',
|
|
405
|
+
type: 'string',
|
|
406
|
+
description: 'the search target',
|
|
407
|
+
required: true,
|
|
408
|
+
},
|
|
409
|
+
],
|
|
410
|
+
returns: {
|
|
411
|
+
type: 'object',
|
|
412
|
+
name: 'ELEMENT',
|
|
413
|
+
description: 'A WebElement JSON object for the located element.',
|
|
414
|
+
},
|
|
415
|
+
},
|
|
416
|
+
},
|
|
417
|
+
'/session/:sessionId/element/:elementId/elements': {
|
|
418
|
+
POST: {
|
|
419
|
+
command: 'findElementsFromElement',
|
|
420
|
+
description: 'Search for multiple elements on the page, starting from the identified element. The located elements will be returned as a WebElement JSON objects. The table below lists the locator strategies that each server should support. Elements should be returned in the order located in the DOM.',
|
|
421
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidelements',
|
|
422
|
+
variables: [
|
|
423
|
+
{
|
|
424
|
+
name: 'elementId',
|
|
425
|
+
description: 'ID of the element to route the command to',
|
|
426
|
+
},
|
|
427
|
+
],
|
|
428
|
+
parameters: [
|
|
429
|
+
{
|
|
430
|
+
name: 'using',
|
|
431
|
+
type: 'string',
|
|
432
|
+
description: 'the locator strategy to use',
|
|
433
|
+
required: true,
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
name: 'value',
|
|
437
|
+
type: 'string',
|
|
438
|
+
description: 'the search target',
|
|
439
|
+
required: true,
|
|
440
|
+
},
|
|
441
|
+
],
|
|
442
|
+
returns: {
|
|
443
|
+
type: 'object[]',
|
|
444
|
+
name: 'ELEMENTS',
|
|
445
|
+
description: 'A list of WebElement JSON objects for the located elements.',
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
},
|
|
449
|
+
'/session/:sessionId/element/active': {
|
|
450
|
+
POST: {
|
|
451
|
+
command: 'getActiveElement',
|
|
452
|
+
description: 'Get the element on the page that currently has focus. The element will be returned as a WebElement JSON object.',
|
|
453
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementactive',
|
|
454
|
+
parameters: [],
|
|
455
|
+
returns: {
|
|
456
|
+
type: 'String',
|
|
457
|
+
name: 'ELEMENT',
|
|
458
|
+
description: 'A WebElement JSON object for the active element.',
|
|
459
|
+
},
|
|
460
|
+
},
|
|
461
|
+
},
|
|
462
|
+
'/session/:sessionId/element/:elementId/selected': {
|
|
463
|
+
GET: {
|
|
464
|
+
command: 'isElementSelected',
|
|
465
|
+
description: 'Determine if an `OPTION` element, or an `INPUT` element of type `checkbox` or `radiobutton` is currently selected.',
|
|
466
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidselected',
|
|
467
|
+
variables: [
|
|
468
|
+
{
|
|
469
|
+
name: 'elementId',
|
|
470
|
+
description: 'ID of the element to route the command to',
|
|
471
|
+
},
|
|
472
|
+
],
|
|
473
|
+
parameters: [],
|
|
474
|
+
returns: {
|
|
475
|
+
type: 'Boolean',
|
|
476
|
+
name: 'isSelected',
|
|
477
|
+
description: 'Whether the element is selected.',
|
|
478
|
+
},
|
|
479
|
+
},
|
|
480
|
+
},
|
|
481
|
+
'/session/:sessionId/element/:elementId/displayed': {
|
|
482
|
+
GET: {
|
|
483
|
+
command: 'isElementDisplayed',
|
|
484
|
+
description: 'Determine if an element is currently displayed.',
|
|
485
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementiddisplayed',
|
|
486
|
+
variables: [
|
|
487
|
+
{
|
|
488
|
+
name: 'elementId',
|
|
489
|
+
description: 'ID of the element to route the command to',
|
|
490
|
+
},
|
|
491
|
+
],
|
|
492
|
+
parameters: [],
|
|
493
|
+
returns: {
|
|
494
|
+
type: 'Boolean',
|
|
495
|
+
name: 'isDisplayed',
|
|
496
|
+
description: 'Whether the element is displayed.',
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
},
|
|
500
|
+
'/session/:sessionId/element/:elementId/attribute/:name': {
|
|
501
|
+
GET: {
|
|
502
|
+
command: 'getElementAttribute',
|
|
503
|
+
description: "Get the value of an element's attribute.",
|
|
504
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidattributename',
|
|
505
|
+
variables: [
|
|
506
|
+
{
|
|
507
|
+
name: 'elementId',
|
|
508
|
+
description: 'ID of the element to route the command to',
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: 'name',
|
|
512
|
+
description: 'name of the attribute value to retrieve',
|
|
513
|
+
},
|
|
514
|
+
],
|
|
515
|
+
parameters: [],
|
|
516
|
+
returns: {
|
|
517
|
+
type: 'String|Null',
|
|
518
|
+
name: 'attribute',
|
|
519
|
+
description: 'The value of the attribute, or null if it is not set on the element.',
|
|
520
|
+
},
|
|
521
|
+
},
|
|
522
|
+
},
|
|
523
|
+
'/session/:sessionId/element/:elementId/css/:propertyName': {
|
|
524
|
+
GET: {
|
|
525
|
+
command: 'getElementCSSValue',
|
|
526
|
+
description: "Query the value of an element's computed CSS property. The CSS property to query should be specified using the CSS property name, __not__ the JavaScript property name (e.g. `background-color` instead of `backgroundColor`).",
|
|
527
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidcsspropertyname',
|
|
528
|
+
variables: [
|
|
529
|
+
{
|
|
530
|
+
name: 'elementId',
|
|
531
|
+
description: 'ID of the element to route the command to',
|
|
532
|
+
},
|
|
533
|
+
{
|
|
534
|
+
name: 'propertyName',
|
|
535
|
+
description: 'name of the CSS property to retrieve',
|
|
536
|
+
},
|
|
537
|
+
],
|
|
538
|
+
parameters: [],
|
|
539
|
+
returns: {
|
|
540
|
+
type: 'String',
|
|
541
|
+
name: 'propertyName',
|
|
542
|
+
description: 'The value of the specified CSS property.',
|
|
543
|
+
},
|
|
544
|
+
},
|
|
545
|
+
},
|
|
546
|
+
'/session/:sessionId/element/:elementId/text': {
|
|
547
|
+
GET: {
|
|
548
|
+
command: 'getElementText',
|
|
549
|
+
description: 'Returns the visible text for the element.',
|
|
550
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidtext',
|
|
551
|
+
variables: [
|
|
552
|
+
{
|
|
553
|
+
name: 'elementId',
|
|
554
|
+
description: 'ID of the element to route the command to',
|
|
555
|
+
},
|
|
556
|
+
],
|
|
557
|
+
parameters: [],
|
|
558
|
+
returns: {
|
|
559
|
+
type: 'String',
|
|
560
|
+
name: 'text',
|
|
561
|
+
description: 'The visible text of the element.',
|
|
562
|
+
},
|
|
563
|
+
},
|
|
564
|
+
},
|
|
565
|
+
'/session/:sessionId/element/:elementId/name': {
|
|
566
|
+
GET: {
|
|
567
|
+
command: 'getElementTagName',
|
|
568
|
+
description: "Query for an element's tag name.",
|
|
569
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidname',
|
|
570
|
+
variables: [
|
|
571
|
+
{
|
|
572
|
+
name: 'elementId',
|
|
573
|
+
description: 'ID of the element to route the command to',
|
|
574
|
+
},
|
|
575
|
+
],
|
|
576
|
+
parameters: [],
|
|
577
|
+
returns: {
|
|
578
|
+
type: 'String',
|
|
579
|
+
name: 'tagName',
|
|
580
|
+
description: "The element's tag name, as a lowercase string.",
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
},
|
|
584
|
+
'/session/:sessionId/element/:elementId/location': {
|
|
585
|
+
GET: {
|
|
586
|
+
command: 'getElementLocation',
|
|
587
|
+
description: "Determine an element's location on the page. The point `(0, 0)` refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with `x` and `y` properties.",
|
|
588
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidlocation',
|
|
589
|
+
variables: [
|
|
590
|
+
{
|
|
591
|
+
name: 'elementId',
|
|
592
|
+
description: 'ID of the element to route the command to',
|
|
593
|
+
},
|
|
594
|
+
],
|
|
595
|
+
parameters: [],
|
|
596
|
+
returns: {
|
|
597
|
+
type: 'Object',
|
|
598
|
+
name: 'location',
|
|
599
|
+
description: 'The X and Y coordinates for the element on the page.',
|
|
600
|
+
},
|
|
601
|
+
},
|
|
602
|
+
},
|
|
603
|
+
'/session/:sessionId/element/:elementId/location_in_view': {
|
|
604
|
+
GET: {
|
|
605
|
+
command: 'getElementLocationInView',
|
|
606
|
+
description: "Determine an element's location on the screen once it has been scrolled into view.<br /><br />__Note:__ This is considered an internal command and should only be used to determine an element's location for correctly generating native events.",
|
|
607
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidlocation_in_view',
|
|
608
|
+
variables: [
|
|
609
|
+
{
|
|
610
|
+
name: 'elementId',
|
|
611
|
+
description: 'ID of the element to route the command to',
|
|
612
|
+
},
|
|
613
|
+
],
|
|
614
|
+
parameters: [],
|
|
615
|
+
returns: {
|
|
616
|
+
type: 'Object',
|
|
617
|
+
name: 'location',
|
|
618
|
+
description: 'The X and Y coordinates for the element on the page.',
|
|
619
|
+
},
|
|
620
|
+
},
|
|
621
|
+
},
|
|
622
|
+
'/session/:sessionId/element/:elementId/size': {
|
|
623
|
+
GET: {
|
|
624
|
+
command: 'getElementSize',
|
|
625
|
+
description: "Determine an element's size in pixels. The size will be returned as a JSON object with `width` and `height` properties.",
|
|
626
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsize',
|
|
627
|
+
variables: [
|
|
628
|
+
{
|
|
629
|
+
name: 'elementId',
|
|
630
|
+
description: 'ID of the element to route the command to',
|
|
631
|
+
},
|
|
632
|
+
],
|
|
633
|
+
parameters: [],
|
|
634
|
+
returns: {
|
|
635
|
+
type: 'Object',
|
|
636
|
+
name: 'size',
|
|
637
|
+
description: 'The width and height of the element, in pixels.',
|
|
638
|
+
},
|
|
639
|
+
},
|
|
640
|
+
},
|
|
641
|
+
'/session/:sessionId/element/:elementId/enabled': {
|
|
642
|
+
GET: {
|
|
643
|
+
command: 'isElementEnabled',
|
|
644
|
+
description: 'Determine if an element is currently enabled.',
|
|
645
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidenabled',
|
|
646
|
+
variables: [
|
|
647
|
+
{
|
|
648
|
+
name: 'elementId',
|
|
649
|
+
description: 'ID of the element to route the command to',
|
|
650
|
+
},
|
|
651
|
+
],
|
|
652
|
+
parameters: [],
|
|
653
|
+
returns: {
|
|
654
|
+
type: 'Boolean',
|
|
655
|
+
name: 'isEnabled',
|
|
656
|
+
description: 'Whether the element is enabled.',
|
|
657
|
+
},
|
|
658
|
+
},
|
|
659
|
+
},
|
|
660
|
+
'/session/:sessionId/element/:elementId/click': {
|
|
661
|
+
POST: {
|
|
662
|
+
command: 'elementClick',
|
|
663
|
+
description: 'Click any mouse button (at the coordinates set by the last moveto command). Note that calling this command after calling buttondown and before calling button up (or any out-of-order interactions sequence) will yield undefined behaviour).',
|
|
664
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclick',
|
|
665
|
+
variables: [
|
|
666
|
+
{
|
|
667
|
+
name: 'elementId',
|
|
668
|
+
description: 'ID of the element to route the command to',
|
|
669
|
+
},
|
|
670
|
+
],
|
|
671
|
+
parameters: [],
|
|
672
|
+
},
|
|
673
|
+
},
|
|
674
|
+
'/session/:sessionId/element/:elementId/equals/:otherId': {
|
|
675
|
+
GET: {
|
|
676
|
+
command: 'elementEquals',
|
|
677
|
+
description: 'Compare elements with each other.',
|
|
678
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidequalsother',
|
|
679
|
+
variables: [
|
|
680
|
+
{
|
|
681
|
+
name: 'elementId',
|
|
682
|
+
description: 'ID of the element to route the command to',
|
|
683
|
+
},
|
|
684
|
+
{
|
|
685
|
+
name: 'otherElementId',
|
|
686
|
+
description: 'ID of the element to compare against',
|
|
687
|
+
},
|
|
688
|
+
],
|
|
689
|
+
parameters: [],
|
|
690
|
+
returns: {
|
|
691
|
+
type: 'Boolean',
|
|
692
|
+
name: 'isEqual',
|
|
693
|
+
description: 'Whether the two IDs refer to the same element.',
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
'/session/:sessionId/element/:elementId/submit': {
|
|
698
|
+
POST: {
|
|
699
|
+
command: 'elementSubmit',
|
|
700
|
+
description: '',
|
|
701
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidsubmit',
|
|
702
|
+
variables: [
|
|
703
|
+
{
|
|
704
|
+
name: 'elementId',
|
|
705
|
+
description: 'ID of the form element to be submitted',
|
|
706
|
+
},
|
|
707
|
+
],
|
|
708
|
+
parameters: [],
|
|
709
|
+
},
|
|
710
|
+
},
|
|
711
|
+
'/session/:sessionId/element/:elementId/clear': {
|
|
712
|
+
POST: {
|
|
713
|
+
command: 'elementClear',
|
|
714
|
+
description: '',
|
|
715
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidclear',
|
|
716
|
+
variables: [
|
|
717
|
+
{
|
|
718
|
+
name: 'elementId',
|
|
719
|
+
description: 'ID of the element to route the command to',
|
|
720
|
+
},
|
|
721
|
+
],
|
|
722
|
+
parameters: [],
|
|
723
|
+
},
|
|
724
|
+
},
|
|
725
|
+
'/session/:sessionId/element/:elementId/value': {
|
|
726
|
+
POST: {
|
|
727
|
+
command: 'elementSendKeys',
|
|
728
|
+
description: '',
|
|
729
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidelementidvalue',
|
|
730
|
+
variables: [
|
|
731
|
+
{
|
|
732
|
+
name: 'elementId',
|
|
733
|
+
description: 'ID of the element to route the command to',
|
|
734
|
+
},
|
|
735
|
+
],
|
|
736
|
+
parameters: [
|
|
737
|
+
{
|
|
738
|
+
name: 'value',
|
|
739
|
+
type: 'string[]',
|
|
740
|
+
description: 'The sequence of keys to type. An array must be provided.',
|
|
741
|
+
required: true,
|
|
742
|
+
},
|
|
743
|
+
],
|
|
744
|
+
},
|
|
745
|
+
},
|
|
746
|
+
'/session/:sessionId/keys': {
|
|
747
|
+
POST: {
|
|
748
|
+
command: 'sendKeys',
|
|
749
|
+
description: '',
|
|
750
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidkeys',
|
|
751
|
+
parameters: [
|
|
752
|
+
{
|
|
753
|
+
name: 'value',
|
|
754
|
+
type: 'string[]',
|
|
755
|
+
description: 'The sequence of keys to type. An array must be provided.',
|
|
756
|
+
required: true,
|
|
757
|
+
},
|
|
758
|
+
],
|
|
759
|
+
},
|
|
760
|
+
},
|
|
761
|
+
'/session/:sessionId/source': {
|
|
762
|
+
GET: {
|
|
763
|
+
command: 'getPageSource',
|
|
764
|
+
description: '',
|
|
765
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidsource',
|
|
766
|
+
parameters: [],
|
|
767
|
+
returns: {
|
|
768
|
+
type: 'String',
|
|
769
|
+
name: 'source',
|
|
770
|
+
description: 'The current page source.',
|
|
771
|
+
},
|
|
772
|
+
},
|
|
773
|
+
},
|
|
774
|
+
'/session/:sessionId/execute': {
|
|
775
|
+
POST: {
|
|
776
|
+
command: 'executeScript',
|
|
777
|
+
description: '',
|
|
778
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute',
|
|
779
|
+
parameters: [
|
|
780
|
+
{
|
|
781
|
+
name: 'script',
|
|
782
|
+
type: 'string',
|
|
783
|
+
description: 'the script to execute',
|
|
784
|
+
required: true,
|
|
785
|
+
},
|
|
786
|
+
{
|
|
787
|
+
name: 'args',
|
|
788
|
+
type: '(string|object|number|boolean|undefined)[]',
|
|
789
|
+
description: 'the script arguments',
|
|
790
|
+
required: false,
|
|
791
|
+
},
|
|
792
|
+
],
|
|
793
|
+
returns: {
|
|
794
|
+
type: '*',
|
|
795
|
+
name: 'result',
|
|
796
|
+
description: 'The script result.',
|
|
797
|
+
},
|
|
798
|
+
},
|
|
799
|
+
},
|
|
800
|
+
'/session/:sessionId/execute_async': {
|
|
801
|
+
POST: {
|
|
802
|
+
command: 'executeAsyncScript',
|
|
803
|
+
description: '',
|
|
804
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidexecute_async',
|
|
805
|
+
parameters: [
|
|
806
|
+
{
|
|
807
|
+
name: 'script',
|
|
808
|
+
type: 'string',
|
|
809
|
+
description: 'the script to execute',
|
|
810
|
+
required: true,
|
|
811
|
+
},
|
|
812
|
+
{
|
|
813
|
+
name: 'args',
|
|
814
|
+
type: '(string|object|number|boolean|undefined)[]',
|
|
815
|
+
description: 'the script arguments',
|
|
816
|
+
required: true,
|
|
817
|
+
},
|
|
818
|
+
],
|
|
819
|
+
returns: {
|
|
820
|
+
type: '*',
|
|
821
|
+
name: 'result',
|
|
822
|
+
description: 'The script result.',
|
|
823
|
+
},
|
|
824
|
+
},
|
|
825
|
+
},
|
|
826
|
+
'/session/:sessionId/cookie': {
|
|
827
|
+
GET: {
|
|
828
|
+
command: 'getAllCookies',
|
|
829
|
+
description: '',
|
|
830
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidcookie',
|
|
831
|
+
parameters: [],
|
|
832
|
+
returns: {
|
|
833
|
+
type: 'Object[]',
|
|
834
|
+
name: 'cookies',
|
|
835
|
+
description: 'A list of cookies.',
|
|
836
|
+
},
|
|
837
|
+
},
|
|
838
|
+
POST: {
|
|
839
|
+
command: 'addCookie',
|
|
840
|
+
description: '',
|
|
841
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidcookie',
|
|
842
|
+
parameters: [
|
|
843
|
+
{
|
|
844
|
+
name: 'cookie',
|
|
845
|
+
type: 'object',
|
|
846
|
+
description: 'A JSON object representing a cookie. It must have at least the name and value fields and could have more, including expiry-time and so on',
|
|
847
|
+
required: true,
|
|
848
|
+
},
|
|
849
|
+
],
|
|
850
|
+
},
|
|
851
|
+
DELETE: {
|
|
852
|
+
command: 'deleteAllCookies',
|
|
853
|
+
description: '',
|
|
854
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidcookie',
|
|
855
|
+
parameters: [],
|
|
856
|
+
},
|
|
857
|
+
},
|
|
858
|
+
'/session/:sessionId/cookie/:name': {
|
|
859
|
+
DELETE: {
|
|
860
|
+
command: 'deleteCookie',
|
|
861
|
+
description: '',
|
|
862
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidcookiename',
|
|
863
|
+
variables: [
|
|
864
|
+
{
|
|
865
|
+
name: 'name',
|
|
866
|
+
description: 'name of the cookie to retrieve',
|
|
867
|
+
},
|
|
868
|
+
],
|
|
869
|
+
parameters: [],
|
|
870
|
+
},
|
|
871
|
+
},
|
|
872
|
+
'/session/:sessionId/dismiss_alert': {
|
|
873
|
+
POST: {
|
|
874
|
+
command: 'dismissAlert',
|
|
875
|
+
description: '',
|
|
876
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessioniddismiss_alert',
|
|
877
|
+
parameters: [],
|
|
878
|
+
},
|
|
879
|
+
},
|
|
880
|
+
'/session/:sessionId/accept_alert': {
|
|
881
|
+
POST: {
|
|
882
|
+
command: 'acceptAlert',
|
|
883
|
+
description: '',
|
|
884
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidaccept_alert',
|
|
885
|
+
parameters: [],
|
|
886
|
+
},
|
|
887
|
+
},
|
|
888
|
+
'/session/:sessionId/alert_text': {
|
|
889
|
+
GET: {
|
|
890
|
+
command: 'getAlertText',
|
|
891
|
+
description: '',
|
|
892
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidalert_text',
|
|
893
|
+
parameters: [],
|
|
894
|
+
returns: {
|
|
895
|
+
type: 'String',
|
|
896
|
+
name: 'alertText',
|
|
897
|
+
description: 'The text of the currently displayed alert.',
|
|
898
|
+
},
|
|
899
|
+
},
|
|
900
|
+
POST: {
|
|
901
|
+
command: 'sendAlertText',
|
|
902
|
+
description: '',
|
|
903
|
+
ref: 'https://w3c.github.io/webdriver/webdriver-spec.html#dfn-send-alert-text',
|
|
904
|
+
parameters: [
|
|
905
|
+
{
|
|
906
|
+
name: 'text',
|
|
907
|
+
type: 'string',
|
|
908
|
+
description: 'keystrokes to send to the prompt() dialog',
|
|
909
|
+
required: true,
|
|
910
|
+
},
|
|
911
|
+
],
|
|
912
|
+
},
|
|
913
|
+
},
|
|
914
|
+
'/session/:sessionId/screenshot': {
|
|
915
|
+
GET: {
|
|
916
|
+
command: 'takeScreenshot',
|
|
917
|
+
description: '',
|
|
918
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidscreenshot',
|
|
919
|
+
parameters: [],
|
|
920
|
+
returns: {
|
|
921
|
+
type: 'String',
|
|
922
|
+
name: 'screenshot',
|
|
923
|
+
description: 'screenshot as a base64 encoded PNG',
|
|
924
|
+
},
|
|
925
|
+
},
|
|
926
|
+
},
|
|
927
|
+
'/session/:sessionId/ime/available_engines': {
|
|
928
|
+
GET: {
|
|
929
|
+
command: 'getAvailableEngines',
|
|
930
|
+
description: '',
|
|
931
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidimeavailable_engines',
|
|
932
|
+
parameters: [],
|
|
933
|
+
returns: {
|
|
934
|
+
type: 'String[]',
|
|
935
|
+
name: 'engines',
|
|
936
|
+
description: 'A list of available engines',
|
|
937
|
+
},
|
|
938
|
+
},
|
|
939
|
+
},
|
|
940
|
+
'/session/:sessionId/ime/active_engine': {
|
|
941
|
+
GET: {
|
|
942
|
+
command: 'getActiveEngine',
|
|
943
|
+
description: '',
|
|
944
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidimeactive_engine',
|
|
945
|
+
parameters: [],
|
|
946
|
+
returns: {
|
|
947
|
+
type: 'String',
|
|
948
|
+
name: 'engine',
|
|
949
|
+
description: 'The name of the active IME engine',
|
|
950
|
+
},
|
|
951
|
+
},
|
|
952
|
+
},
|
|
953
|
+
'/session/:sessionId/ime/activated': {
|
|
954
|
+
GET: {
|
|
955
|
+
command: 'isIMEActivated',
|
|
956
|
+
description: '',
|
|
957
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidimeactivated',
|
|
958
|
+
parameters: [],
|
|
959
|
+
returns: {
|
|
960
|
+
type: 'Boolean',
|
|
961
|
+
name: 'isActive',
|
|
962
|
+
description: 'true if IME input is available and currently active, false otherwise',
|
|
963
|
+
},
|
|
964
|
+
},
|
|
965
|
+
},
|
|
966
|
+
'/session/:sessionId/ime/deactivate': {
|
|
967
|
+
POST: {
|
|
968
|
+
command: 'deactivateIME',
|
|
969
|
+
description: '',
|
|
970
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidimedeactivate',
|
|
971
|
+
parameters: [],
|
|
972
|
+
},
|
|
973
|
+
},
|
|
974
|
+
'/session/:sessionId/ime/activate': {
|
|
975
|
+
POST: {
|
|
976
|
+
command: 'activateIME',
|
|
977
|
+
description: '',
|
|
978
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidimeactivate',
|
|
979
|
+
parameters: [
|
|
980
|
+
{
|
|
981
|
+
name: 'engine',
|
|
982
|
+
type: 'string',
|
|
983
|
+
description: 'name of the engine to activate',
|
|
984
|
+
required: true,
|
|
985
|
+
},
|
|
986
|
+
],
|
|
987
|
+
},
|
|
988
|
+
},
|
|
989
|
+
'/session/:sessionId/orientation': {
|
|
990
|
+
GET: {
|
|
991
|
+
command: 'getOrientation',
|
|
992
|
+
description: '',
|
|
993
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidorientation',
|
|
994
|
+
parameters: [],
|
|
995
|
+
returns: {
|
|
996
|
+
type: 'String',
|
|
997
|
+
name: 'orientation',
|
|
998
|
+
description: 'The current browser orientation corresponding to a value defined in ScreenOrientation: {LANDSCAPE|PORTRAIT}.',
|
|
999
|
+
},
|
|
1000
|
+
},
|
|
1001
|
+
POST: {
|
|
1002
|
+
command: 'setOrientation',
|
|
1003
|
+
description: '',
|
|
1004
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidorientation',
|
|
1005
|
+
parameters: [
|
|
1006
|
+
{
|
|
1007
|
+
name: 'orientation',
|
|
1008
|
+
type: 'string',
|
|
1009
|
+
description: 'the new browser orientation as defined in ScreenOrientation: {LANDSCAPE|PORTRAIT}',
|
|
1010
|
+
required: true,
|
|
1011
|
+
},
|
|
1012
|
+
],
|
|
1013
|
+
},
|
|
1014
|
+
},
|
|
1015
|
+
'/session/:sessionId/moveto': {
|
|
1016
|
+
POST: {
|
|
1017
|
+
command: 'moveToElement',
|
|
1018
|
+
description: '',
|
|
1019
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidmoveto',
|
|
1020
|
+
parameters: [
|
|
1021
|
+
{
|
|
1022
|
+
name: 'element',
|
|
1023
|
+
type: '(string|null)',
|
|
1024
|
+
description: 'opaque ID assigned to the element to move to, as described in the WebElement JSON Object, if not specified or is null, the offset is relative to current position of the mouse',
|
|
1025
|
+
required: false,
|
|
1026
|
+
},
|
|
1027
|
+
{
|
|
1028
|
+
name: 'xoffset',
|
|
1029
|
+
type: 'number',
|
|
1030
|
+
description: 'x offset to move to, relative to the top-left corner of the element, if not specified, the mouse will move to the middle of the element',
|
|
1031
|
+
required: false,
|
|
1032
|
+
},
|
|
1033
|
+
{
|
|
1034
|
+
name: 'yoffset',
|
|
1035
|
+
type: 'number',
|
|
1036
|
+
description: 'y offset to move to, relative to the top-left corner of the element, if not specified, the mouse will move to the middle of the element',
|
|
1037
|
+
required: false,
|
|
1038
|
+
},
|
|
1039
|
+
],
|
|
1040
|
+
},
|
|
1041
|
+
},
|
|
1042
|
+
'/session/:sessionId/buttondown': {
|
|
1043
|
+
POST: {
|
|
1044
|
+
command: 'buttonDown',
|
|
1045
|
+
description: 'Click and hold the left mouse button (at the coordinates set by the last moveto command). Note that the next mouse-related command that should follow is buttonup . Any other mouse command (such as click or another call to buttondown) will yield undefined behaviour.',
|
|
1046
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttondown',
|
|
1047
|
+
parameters: [
|
|
1048
|
+
{
|
|
1049
|
+
name: 'button',
|
|
1050
|
+
type: 'number',
|
|
1051
|
+
description: 'which button, enum: LEFT = 0, MIDDLE = 1 , RIGHT = 2, defaults to the left mouse button if not specified',
|
|
1052
|
+
required: false,
|
|
1053
|
+
},
|
|
1054
|
+
],
|
|
1055
|
+
},
|
|
1056
|
+
},
|
|
1057
|
+
'/session/:sessionId/buttonup': {
|
|
1058
|
+
POST: {
|
|
1059
|
+
command: 'buttonUp',
|
|
1060
|
+
description: 'Releases the mouse button previously held (where the mouse is currently at). Must be called once for every buttondown command issued. See the note in click and buttondown about implications of out-of-order commands.',
|
|
1061
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidbuttonup',
|
|
1062
|
+
parameters: [
|
|
1063
|
+
{
|
|
1064
|
+
name: 'button',
|
|
1065
|
+
type: 'number',
|
|
1066
|
+
description: 'which button, enum: LEFT = 0, MIDDLE = 1 , RIGHT = 2, defaults to the left mouse button if not specified',
|
|
1067
|
+
required: false,
|
|
1068
|
+
},
|
|
1069
|
+
],
|
|
1070
|
+
},
|
|
1071
|
+
},
|
|
1072
|
+
'/session/:sessionId/click': {
|
|
1073
|
+
POST: {
|
|
1074
|
+
command: 'positionClick',
|
|
1075
|
+
description: 'Clicks at the current mouse coordinates (set by moveto).',
|
|
1076
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidclick',
|
|
1077
|
+
parameters: [
|
|
1078
|
+
{
|
|
1079
|
+
name: 'button',
|
|
1080
|
+
type: 'number',
|
|
1081
|
+
description: 'which button, enum: LEFT = 0, RIGHT = 2, defaults to the left mouse button if not specified',
|
|
1082
|
+
required: false,
|
|
1083
|
+
},
|
|
1084
|
+
],
|
|
1085
|
+
},
|
|
1086
|
+
},
|
|
1087
|
+
'/session/:sessionId/doubleclick': {
|
|
1088
|
+
POST: {
|
|
1089
|
+
command: 'positionDoubleClick',
|
|
1090
|
+
description: 'Double-clicks at the current mouse coordinates (set by moveto).',
|
|
1091
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessioniddoubleclick',
|
|
1092
|
+
parameters: [],
|
|
1093
|
+
},
|
|
1094
|
+
},
|
|
1095
|
+
'/session/:sessionId/touch/click': {
|
|
1096
|
+
POST: {
|
|
1097
|
+
command: 'touchClick',
|
|
1098
|
+
description: 'Single tap on the touch enabled device.',
|
|
1099
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchclick',
|
|
1100
|
+
parameters: [
|
|
1101
|
+
{
|
|
1102
|
+
name: 'element',
|
|
1103
|
+
type: 'string',
|
|
1104
|
+
description: 'ID of the element to single tap on.',
|
|
1105
|
+
required: true,
|
|
1106
|
+
},
|
|
1107
|
+
],
|
|
1108
|
+
},
|
|
1109
|
+
},
|
|
1110
|
+
'/session/:sessionId/touch/down': {
|
|
1111
|
+
POST: {
|
|
1112
|
+
command: 'touchDown',
|
|
1113
|
+
description: 'Finger down on the screen.',
|
|
1114
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchdown',
|
|
1115
|
+
parameters: [
|
|
1116
|
+
{
|
|
1117
|
+
name: 'x',
|
|
1118
|
+
type: 'number',
|
|
1119
|
+
description: 'x coordinate on the screen',
|
|
1120
|
+
required: true,
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
name: 'y',
|
|
1124
|
+
type: 'number',
|
|
1125
|
+
description: 'y coordinate on the screen',
|
|
1126
|
+
required: true,
|
|
1127
|
+
},
|
|
1128
|
+
],
|
|
1129
|
+
},
|
|
1130
|
+
},
|
|
1131
|
+
'/session/:sessionId/touch/up': {
|
|
1132
|
+
POST: {
|
|
1133
|
+
command: 'touchUp',
|
|
1134
|
+
description: 'Finger up on the screen.',
|
|
1135
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchup',
|
|
1136
|
+
parameters: [
|
|
1137
|
+
{
|
|
1138
|
+
name: 'x',
|
|
1139
|
+
type: 'number',
|
|
1140
|
+
description: 'x coordinate on the screen',
|
|
1141
|
+
required: true,
|
|
1142
|
+
},
|
|
1143
|
+
{
|
|
1144
|
+
name: 'y',
|
|
1145
|
+
type: 'number',
|
|
1146
|
+
description: 'y coordinate on the screen',
|
|
1147
|
+
required: true,
|
|
1148
|
+
},
|
|
1149
|
+
],
|
|
1150
|
+
},
|
|
1151
|
+
},
|
|
1152
|
+
'/session/:sessionId/touch/move': {
|
|
1153
|
+
POST: {
|
|
1154
|
+
command: 'touchMove',
|
|
1155
|
+
description: 'Finger move on the screen.',
|
|
1156
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchmove',
|
|
1157
|
+
parameters: [
|
|
1158
|
+
{
|
|
1159
|
+
name: 'x',
|
|
1160
|
+
type: 'number',
|
|
1161
|
+
description: 'x coordinate on the screen',
|
|
1162
|
+
required: true,
|
|
1163
|
+
},
|
|
1164
|
+
{
|
|
1165
|
+
name: 'y',
|
|
1166
|
+
type: 'number',
|
|
1167
|
+
description: 'y coordinate on the screen',
|
|
1168
|
+
required: true,
|
|
1169
|
+
},
|
|
1170
|
+
],
|
|
1171
|
+
},
|
|
1172
|
+
},
|
|
1173
|
+
'/session/:sessionId/touch/scroll': {
|
|
1174
|
+
POST: {
|
|
1175
|
+
command: 'touchScroll',
|
|
1176
|
+
description: 'Finger move on the screen.',
|
|
1177
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchscroll',
|
|
1178
|
+
parameters: [
|
|
1179
|
+
{
|
|
1180
|
+
name: 'xoffset',
|
|
1181
|
+
type: 'number',
|
|
1182
|
+
description: 'the x offset in pixels to scroll by',
|
|
1183
|
+
required: true,
|
|
1184
|
+
},
|
|
1185
|
+
{
|
|
1186
|
+
name: 'yoffset',
|
|
1187
|
+
type: 'number',
|
|
1188
|
+
description: 'the y offset in pixels to scroll by',
|
|
1189
|
+
required: true,
|
|
1190
|
+
},
|
|
1191
|
+
{
|
|
1192
|
+
name: 'element',
|
|
1193
|
+
type: 'string',
|
|
1194
|
+
description: 'ID of the element where the scroll starts',
|
|
1195
|
+
required: false,
|
|
1196
|
+
},
|
|
1197
|
+
],
|
|
1198
|
+
},
|
|
1199
|
+
},
|
|
1200
|
+
'/session/:sessionId/touch/doubleclick': {
|
|
1201
|
+
POST: {
|
|
1202
|
+
command: 'touchDoubleClick',
|
|
1203
|
+
description: 'Double tap on the touch screen using finger motion events.',
|
|
1204
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchdoubleclick',
|
|
1205
|
+
parameters: [
|
|
1206
|
+
{
|
|
1207
|
+
name: 'element',
|
|
1208
|
+
type: 'string',
|
|
1209
|
+
description: 'ID of the element to double tap on',
|
|
1210
|
+
required: true,
|
|
1211
|
+
},
|
|
1212
|
+
],
|
|
1213
|
+
},
|
|
1214
|
+
},
|
|
1215
|
+
'/session/:sessionId/touch/longclick': {
|
|
1216
|
+
POST: {
|
|
1217
|
+
command: 'touchLongClick',
|
|
1218
|
+
description: 'Long press on the touch screen using finger motion events.',
|
|
1219
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchlongclick',
|
|
1220
|
+
parameters: [
|
|
1221
|
+
{
|
|
1222
|
+
name: 'element',
|
|
1223
|
+
type: 'string',
|
|
1224
|
+
description: 'ID of the element to long press on',
|
|
1225
|
+
required: true,
|
|
1226
|
+
},
|
|
1227
|
+
],
|
|
1228
|
+
},
|
|
1229
|
+
},
|
|
1230
|
+
'/session/:sessionId/touch/flick': {
|
|
1231
|
+
POST: {
|
|
1232
|
+
command: 'touchFlick',
|
|
1233
|
+
description: 'Flick on the touch screen using finger motion events. This flickcommand starts at a particulat screen location.',
|
|
1234
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidtouchflick',
|
|
1235
|
+
parameters: [
|
|
1236
|
+
{
|
|
1237
|
+
name: 'xoffset',
|
|
1238
|
+
type: 'number',
|
|
1239
|
+
description: 'the x offset in pixels to flick by',
|
|
1240
|
+
required: false,
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: 'yoffset',
|
|
1244
|
+
type: 'number',
|
|
1245
|
+
description: 'the y offset in pixels to flick by',
|
|
1246
|
+
required: false,
|
|
1247
|
+
},
|
|
1248
|
+
{
|
|
1249
|
+
name: 'element',
|
|
1250
|
+
type: 'string',
|
|
1251
|
+
description: 'ID of the element where the flick starts',
|
|
1252
|
+
required: false,
|
|
1253
|
+
},
|
|
1254
|
+
{
|
|
1255
|
+
name: 'speed',
|
|
1256
|
+
type: 'number',
|
|
1257
|
+
description: 'the speed in pixels per seconds',
|
|
1258
|
+
required: false,
|
|
1259
|
+
},
|
|
1260
|
+
{
|
|
1261
|
+
name: 'xspeed',
|
|
1262
|
+
type: 'number',
|
|
1263
|
+
description: 'the x speed in pixels per second',
|
|
1264
|
+
required: false,
|
|
1265
|
+
},
|
|
1266
|
+
{
|
|
1267
|
+
name: 'yspeed',
|
|
1268
|
+
type: 'number',
|
|
1269
|
+
description: 'the y speed in pixels per second',
|
|
1270
|
+
required: false,
|
|
1271
|
+
},
|
|
1272
|
+
],
|
|
1273
|
+
},
|
|
1274
|
+
},
|
|
1275
|
+
'/session/:sessionId/location': {
|
|
1276
|
+
GET: {
|
|
1277
|
+
command: 'getGeoLocation',
|
|
1278
|
+
description: 'Get the current geo location.',
|
|
1279
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidlocation',
|
|
1280
|
+
parameters: [],
|
|
1281
|
+
returns: {
|
|
1282
|
+
type: 'Object',
|
|
1283
|
+
name: 'location',
|
|
1284
|
+
description: 'The current geo location.',
|
|
1285
|
+
},
|
|
1286
|
+
},
|
|
1287
|
+
POST: {
|
|
1288
|
+
command: 'setGeoLocation',
|
|
1289
|
+
description: 'Set the current geo location.',
|
|
1290
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocation',
|
|
1291
|
+
parameters: [
|
|
1292
|
+
{
|
|
1293
|
+
name: 'location',
|
|
1294
|
+
type: 'object',
|
|
1295
|
+
description: 'the new location (`{latitude: number, longitude: number, altitude: number}`)',
|
|
1296
|
+
required: true,
|
|
1297
|
+
},
|
|
1298
|
+
],
|
|
1299
|
+
},
|
|
1300
|
+
},
|
|
1301
|
+
'/session/:sessionId/local_storage': {
|
|
1302
|
+
GET: {
|
|
1303
|
+
command: 'getLocalStorage',
|
|
1304
|
+
description: 'Get all keys of the storage.',
|
|
1305
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidlocal_storage',
|
|
1306
|
+
parameters: [],
|
|
1307
|
+
returns: {
|
|
1308
|
+
type: 'String[]',
|
|
1309
|
+
name: 'keys',
|
|
1310
|
+
description: 'The list of keys.',
|
|
1311
|
+
},
|
|
1312
|
+
},
|
|
1313
|
+
POST: {
|
|
1314
|
+
command: 'setLocalStorage',
|
|
1315
|
+
description: 'Set the storage item for the given key.',
|
|
1316
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidlocal_storage',
|
|
1317
|
+
parameters: [
|
|
1318
|
+
{
|
|
1319
|
+
name: 'key',
|
|
1320
|
+
type: 'string',
|
|
1321
|
+
description: 'the key to set',
|
|
1322
|
+
required: true,
|
|
1323
|
+
},
|
|
1324
|
+
{
|
|
1325
|
+
name: 'value',
|
|
1326
|
+
type: 'string',
|
|
1327
|
+
description: 'the value to set',
|
|
1328
|
+
required: true,
|
|
1329
|
+
},
|
|
1330
|
+
],
|
|
1331
|
+
},
|
|
1332
|
+
DELETE: {
|
|
1333
|
+
command: 'clearLocalStorage',
|
|
1334
|
+
description: 'Clear the storage.',
|
|
1335
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidlocal_storage',
|
|
1336
|
+
parameters: [],
|
|
1337
|
+
},
|
|
1338
|
+
},
|
|
1339
|
+
'/session/:sessionId/local_storage/key/:key': {
|
|
1340
|
+
GET: {
|
|
1341
|
+
command: 'getLocalStorageItem',
|
|
1342
|
+
description: 'Get the storage item for the given key.',
|
|
1343
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidlocal_storagekeykey',
|
|
1344
|
+
variables: [
|
|
1345
|
+
{
|
|
1346
|
+
name: 'key',
|
|
1347
|
+
description: 'the key to get',
|
|
1348
|
+
},
|
|
1349
|
+
],
|
|
1350
|
+
parameters: [],
|
|
1351
|
+
returns: {
|
|
1352
|
+
type: 'String',
|
|
1353
|
+
name: 'item',
|
|
1354
|
+
description: 'The storage item of given key.',
|
|
1355
|
+
},
|
|
1356
|
+
},
|
|
1357
|
+
DELETE: {
|
|
1358
|
+
command: 'deleteLocalStorageItem',
|
|
1359
|
+
description: '',
|
|
1360
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidlocal_storagekeykey',
|
|
1361
|
+
variables: [
|
|
1362
|
+
{
|
|
1363
|
+
name: 'key',
|
|
1364
|
+
description: 'the key to remove',
|
|
1365
|
+
},
|
|
1366
|
+
],
|
|
1367
|
+
parameters: [],
|
|
1368
|
+
},
|
|
1369
|
+
},
|
|
1370
|
+
'/session/:sessionId/local_storage/size': {
|
|
1371
|
+
GET: {
|
|
1372
|
+
command: 'getLocalStorageSize',
|
|
1373
|
+
description: 'Get the number of items in the storage.',
|
|
1374
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlocal_storagesize',
|
|
1375
|
+
parameters: [],
|
|
1376
|
+
returns: {
|
|
1377
|
+
type: 'Number',
|
|
1378
|
+
name: 'itemCnt',
|
|
1379
|
+
description: 'The number of items in the storage.',
|
|
1380
|
+
},
|
|
1381
|
+
},
|
|
1382
|
+
},
|
|
1383
|
+
'/session/:sessionId/session_storage': {
|
|
1384
|
+
GET: {
|
|
1385
|
+
command: 'getSessionStorage',
|
|
1386
|
+
description: 'Get all keys of the storage.',
|
|
1387
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidsession_storage',
|
|
1388
|
+
parameters: [],
|
|
1389
|
+
returns: {
|
|
1390
|
+
type: 'String[]',
|
|
1391
|
+
name: 'keys',
|
|
1392
|
+
description: 'The list of keys.',
|
|
1393
|
+
},
|
|
1394
|
+
},
|
|
1395
|
+
POST: {
|
|
1396
|
+
command: 'setSessionStorage',
|
|
1397
|
+
description: 'Set the storage item for the given key.',
|
|
1398
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidsession_storage',
|
|
1399
|
+
parameters: [
|
|
1400
|
+
{
|
|
1401
|
+
name: 'key',
|
|
1402
|
+
type: 'string',
|
|
1403
|
+
description: 'the key to set',
|
|
1404
|
+
required: true,
|
|
1405
|
+
},
|
|
1406
|
+
{
|
|
1407
|
+
name: 'value',
|
|
1408
|
+
type: 'string',
|
|
1409
|
+
description: 'the value to set',
|
|
1410
|
+
required: true,
|
|
1411
|
+
},
|
|
1412
|
+
],
|
|
1413
|
+
},
|
|
1414
|
+
DELETE: {
|
|
1415
|
+
command: 'clearSessionStorage',
|
|
1416
|
+
description: 'Clear the storage.',
|
|
1417
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidsession_storage',
|
|
1418
|
+
parameters: [],
|
|
1419
|
+
},
|
|
1420
|
+
},
|
|
1421
|
+
'/session/:sessionId/session_storage/key/:key': {
|
|
1422
|
+
GET: {
|
|
1423
|
+
command: 'getSessionStorageItem',
|
|
1424
|
+
description: 'Get the storage item for the given key.',
|
|
1425
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#get-sessionsessionidsession_storagekeykey',
|
|
1426
|
+
variables: [
|
|
1427
|
+
{
|
|
1428
|
+
name: 'key',
|
|
1429
|
+
description: 'the key to get',
|
|
1430
|
+
},
|
|
1431
|
+
],
|
|
1432
|
+
parameters: [],
|
|
1433
|
+
returns: {
|
|
1434
|
+
type: 'String',
|
|
1435
|
+
name: 'item',
|
|
1436
|
+
description: 'The storage item of given key.',
|
|
1437
|
+
},
|
|
1438
|
+
},
|
|
1439
|
+
DELETE: {
|
|
1440
|
+
command: 'deleteSessionStorageItem',
|
|
1441
|
+
description: 'Remove the storage item for the given key.',
|
|
1442
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#delete-sessionsessionidsession_storagekeykey',
|
|
1443
|
+
variables: [
|
|
1444
|
+
{
|
|
1445
|
+
name: 'key',
|
|
1446
|
+
description: 'the key to remove',
|
|
1447
|
+
},
|
|
1448
|
+
],
|
|
1449
|
+
parameters: [],
|
|
1450
|
+
},
|
|
1451
|
+
},
|
|
1452
|
+
'/session/:sessionId/session_storage/size': {
|
|
1453
|
+
GET: {
|
|
1454
|
+
command: 'getSessionStorageSize',
|
|
1455
|
+
description: 'Get the number of items in the storage.',
|
|
1456
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidsession_storagesize',
|
|
1457
|
+
parameters: [],
|
|
1458
|
+
returns: {
|
|
1459
|
+
type: 'Number',
|
|
1460
|
+
name: 'itemCnt',
|
|
1461
|
+
description: 'The number of items in the storage.',
|
|
1462
|
+
},
|
|
1463
|
+
},
|
|
1464
|
+
},
|
|
1465
|
+
'/session/:sessionId/log': {
|
|
1466
|
+
POST: {
|
|
1467
|
+
command: 'getLogs',
|
|
1468
|
+
description: 'Get the log for a given log type. Log buffer is reset after each request.',
|
|
1469
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlog',
|
|
1470
|
+
parameters: [
|
|
1471
|
+
{
|
|
1472
|
+
name: 'type',
|
|
1473
|
+
type: 'string',
|
|
1474
|
+
description: 'the log type',
|
|
1475
|
+
required: true,
|
|
1476
|
+
},
|
|
1477
|
+
],
|
|
1478
|
+
returns: {
|
|
1479
|
+
type: 'Object[]',
|
|
1480
|
+
name: 'logs',
|
|
1481
|
+
description: 'The list of log entries.',
|
|
1482
|
+
},
|
|
1483
|
+
},
|
|
1484
|
+
},
|
|
1485
|
+
'/session/:sessionId/log/types': {
|
|
1486
|
+
GET: {
|
|
1487
|
+
command: 'getLogTypes',
|
|
1488
|
+
description: 'Get available log types.',
|
|
1489
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes',
|
|
1490
|
+
parameters: [],
|
|
1491
|
+
returns: {
|
|
1492
|
+
type: 'String[]',
|
|
1493
|
+
name: 'logTypes',
|
|
1494
|
+
description: 'The list of available log types.',
|
|
1495
|
+
},
|
|
1496
|
+
},
|
|
1497
|
+
},
|
|
1498
|
+
'/session/:sessionId/application_cache/status': {
|
|
1499
|
+
GET: {
|
|
1500
|
+
command: 'getApplicationCacheStatus',
|
|
1501
|
+
description: 'Get the status of the html5 application cache.',
|
|
1502
|
+
ref: 'https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidapplication_cachestatus',
|
|
1503
|
+
parameters: [],
|
|
1504
|
+
returns: {
|
|
1505
|
+
type: 'Number',
|
|
1506
|
+
name: 'statusCode',
|
|
1507
|
+
description: 'Status code for application cache: `{UNCACHED = 0, IDLE = 1, CHECKING = 2, DOWNLOADING = 3, UPDATE_READY = 4, OBSOLETE = 5}`',
|
|
1508
|
+
},
|
|
1509
|
+
},
|
|
1510
|
+
},
|
|
1511
|
+
};
|