@wdio/protocols 9.0.0-alpha.78 → 9.0.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/commands/selenium.d.ts +24 -0
- package/build/commands/selenium.d.ts.map +1 -1
- package/build/commands/webdriver.d.ts +6 -6
- package/build/commands/webdriver.d.ts.map +1 -1
- package/build/index.js +5707 -16
- package/build/protocols/selenium.d.ts +35 -0
- package/build/protocols/selenium.d.ts.map +1 -1
- package/build/protocols/webdriver.d.ts +15 -6
- package/build/protocols/webdriver.d.ts.map +1 -1
- package/build/protocols/webdriverBidi.d.ts +120 -4
- package/build/protocols/webdriverBidi.d.ts.map +1 -1
- package/build/types.d.ts +8 -0
- package/build/types.d.ts.map +1 -1
- package/package.json +6 -4
- package/build/commands/appium.js +0 -1
- package/build/commands/chromium.js +0 -1
- package/build/commands/gecko.js +0 -1
- package/build/commands/mjsonwp.js +0 -1
- package/build/commands/saucelabs.js +0 -1
- package/build/commands/selenium.js +0 -1
- package/build/commands/webdriver.js +0 -1
- package/build/protocols/appium.js +0 -2191
- package/build/protocols/chromium.js +0 -530
- package/build/protocols/gecko.js +0 -112
- package/build/protocols/mjsonwp.js +0 -91
- package/build/protocols/saucelabs.js +0 -297
- package/build/protocols/selenium.js +0 -132
- package/build/protocols/webdriver.js +0 -1542
- package/build/protocols/webdriverBidi.js +0 -612
- package/build/types.js +0 -1
- package/tsconfig.prod.json +0 -12
- /package/{LICENSE-MIT → LICENSE} +0 -0
|
@@ -1,91 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
'/session/:sessionId/element/:elementId/pageIndex': {
|
|
3
|
-
GET: {
|
|
4
|
-
command: 'getPageIndex',
|
|
5
|
-
ref: 'https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints',
|
|
6
|
-
deprecated: 'In Appium 2.0, this method is marked as deprecated and currently has no available alternatives.',
|
|
7
|
-
parameters: [],
|
|
8
|
-
returns: {
|
|
9
|
-
type: 'string',
|
|
10
|
-
name: 'pageIndex',
|
|
11
|
-
},
|
|
12
|
-
},
|
|
13
|
-
},
|
|
14
|
-
'/session/:sessionId/network_connection': {
|
|
15
|
-
GET: {
|
|
16
|
-
command: 'getNetworkConnection',
|
|
17
|
-
ref: 'https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes',
|
|
18
|
-
parameters: [],
|
|
19
|
-
returns: {
|
|
20
|
-
type: 'number',
|
|
21
|
-
name: 'connectionType',
|
|
22
|
-
description: 'see https://appium.github.io/appium.io/docs/en/writing-running-appium/other/network-connection/',
|
|
23
|
-
},
|
|
24
|
-
},
|
|
25
|
-
POST: {
|
|
26
|
-
command: 'setNetworkConnection',
|
|
27
|
-
ref: 'https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes',
|
|
28
|
-
parameters: [
|
|
29
|
-
{
|
|
30
|
-
name: 'type',
|
|
31
|
-
type: 'number',
|
|
32
|
-
description: 'a bit mask that should be translated to an integer value when serialized',
|
|
33
|
-
required: true,
|
|
34
|
-
},
|
|
35
|
-
],
|
|
36
|
-
},
|
|
37
|
-
},
|
|
38
|
-
'/session/:sessionId/touch/perform': {
|
|
39
|
-
GET: {
|
|
40
|
-
command: 'touchPerform',
|
|
41
|
-
ref: 'https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures',
|
|
42
|
-
parameters: [
|
|
43
|
-
{
|
|
44
|
-
name: 'actions',
|
|
45
|
-
type: 'object[]',
|
|
46
|
-
description: 'a list of objects, each of which represents an input source and its associated actions',
|
|
47
|
-
required: true,
|
|
48
|
-
},
|
|
49
|
-
],
|
|
50
|
-
},
|
|
51
|
-
},
|
|
52
|
-
'/session/:sessionId/touch/multi/perform': {
|
|
53
|
-
GET: {
|
|
54
|
-
command: 'multiTouchPerform',
|
|
55
|
-
ref: 'https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#touch-gestures',
|
|
56
|
-
parameters: [
|
|
57
|
-
{
|
|
58
|
-
name: 'actions',
|
|
59
|
-
type: 'object[]',
|
|
60
|
-
description: 'a list of objects, each of which represents an input source and its associated actions',
|
|
61
|
-
required: true,
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: 'elementId',
|
|
65
|
-
type: 'object[]',
|
|
66
|
-
description: 'the id of an element returned in a previous call to Find Element(s)',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
69
|
-
},
|
|
70
|
-
},
|
|
71
|
-
'/session/:sessionId/receive_async_response': {
|
|
72
|
-
POST: {
|
|
73
|
-
command: 'receiveAsyncResponse',
|
|
74
|
-
ref: 'https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#mobile-json-wire-protocol-endpoints',
|
|
75
|
-
parameters: [
|
|
76
|
-
{
|
|
77
|
-
name: 'status',
|
|
78
|
-
type: 'string',
|
|
79
|
-
description: 'the expected status of the response',
|
|
80
|
-
required: true,
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: 'value',
|
|
84
|
-
type: 'string',
|
|
85
|
-
description: 'the expected value of the response',
|
|
86
|
-
required: true,
|
|
87
|
-
},
|
|
88
|
-
],
|
|
89
|
-
},
|
|
90
|
-
},
|
|
91
|
-
};
|
|
@@ -1,297 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
'/session/:sessionId/sauce/ondemand/log': {
|
|
3
|
-
POST: {
|
|
4
|
-
command: 'getPageLogs',
|
|
5
|
-
description: 'Get webpage specific log information based on the last page load.',
|
|
6
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ExtendedDebuggingTools',
|
|
7
|
-
examples: [
|
|
8
|
-
[
|
|
9
|
-
'// Get Network Logs',
|
|
10
|
-
"console.log(browser.getPageLogs('sauce:network'));",
|
|
11
|
-
'/**',
|
|
12
|
-
' * outputs:',
|
|
13
|
-
' * [{',
|
|
14
|
-
' * "url": "https://app.saucelabs.com/dashboard",',
|
|
15
|
-
' * "statusCode": 200,',
|
|
16
|
-
' * "method": "GET",',
|
|
17
|
-
' * "requestHeaders": {',
|
|
18
|
-
' * ...',
|
|
19
|
-
' * },',
|
|
20
|
-
' * "responseHeaders": {',
|
|
21
|
-
' * ...',
|
|
22
|
-
' * },',
|
|
23
|
-
' * "timing": {',
|
|
24
|
-
' * ...',
|
|
25
|
-
' * }',
|
|
26
|
-
' * }, {,',
|
|
27
|
-
' * ...',
|
|
28
|
-
' * }]',
|
|
29
|
-
' */',
|
|
30
|
-
],
|
|
31
|
-
[
|
|
32
|
-
'// Get Performance Logs (needs capturePerformance capability see: https://wiki.saucelabs.com/display/DOCS/Measure+Page+Load+Performance+Using+Test+Automation#MeasurePageLoadPerformanceUsingTestAutomation-EnableYourScript)',
|
|
33
|
-
"console.log(browser.getPageLogs('sauce:performance'));",
|
|
34
|
-
'/**',
|
|
35
|
-
' * outputs:',
|
|
36
|
-
' * {',
|
|
37
|
-
' * "speedIndex": 1472.023,',
|
|
38
|
-
' * "timeToFirstInteractive": 1243.214,',
|
|
39
|
-
' * "firstMeaningfulPaint": 892.643,',
|
|
40
|
-
' * ...',
|
|
41
|
-
' * }',
|
|
42
|
-
' */',
|
|
43
|
-
],
|
|
44
|
-
],
|
|
45
|
-
parameters: [
|
|
46
|
-
{
|
|
47
|
-
name: 'type',
|
|
48
|
-
type: 'string',
|
|
49
|
-
description: "log type (e.g. sauce:network', 'sauce:performance')",
|
|
50
|
-
required: true,
|
|
51
|
-
},
|
|
52
|
-
],
|
|
53
|
-
returns: {
|
|
54
|
-
type: 'object',
|
|
55
|
-
name: 'log',
|
|
56
|
-
description: 'log output of desired type (see example)',
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
'/session/:sessionId/sauce/ondemand/throttle/network': {
|
|
61
|
-
POST: {
|
|
62
|
-
command: 'sauceThrottleNetwork',
|
|
63
|
-
description: 'With network conditioning you can test your site on a variety of network connections, including Edge, 3G, and even offline. You can throttle the data throughput, including the maximum download and upload throughput, and use latency manipulation to enforce a minimum delay in connection round-trip time (RTT).',
|
|
64
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ThrottleNetworkCapabilities',
|
|
65
|
-
examples: [
|
|
66
|
-
[
|
|
67
|
-
'// predefined network condition',
|
|
68
|
-
"browser.sauceThrottleNetwork('offline')",
|
|
69
|
-
],
|
|
70
|
-
[
|
|
71
|
-
'// custom network condition',
|
|
72
|
-
'browser.sauceThrottleNetwork({',
|
|
73
|
-
' download: 1000,',
|
|
74
|
-
' upload: 500,',
|
|
75
|
-
" latency: 40'",
|
|
76
|
-
'})',
|
|
77
|
-
],
|
|
78
|
-
],
|
|
79
|
-
parameters: [
|
|
80
|
-
{
|
|
81
|
-
name: 'condition',
|
|
82
|
-
type: '(string|object)',
|
|
83
|
-
description: "network condition to set (e.g. 'online', 'offline', 'GPRS', 'Regular 2G', 'Good 2G', 'Regular 3G', 'Good 3G', 'Regular 4G', 'DSL', 'Wifi')",
|
|
84
|
-
required: true,
|
|
85
|
-
},
|
|
86
|
-
],
|
|
87
|
-
},
|
|
88
|
-
},
|
|
89
|
-
'/session/:sessionId/sauce/ondemand/throttle/cpu': {
|
|
90
|
-
POST: {
|
|
91
|
-
command: 'throttleCPU',
|
|
92
|
-
description: 'You can throttle the CPU in DevTools to understand how your page performs under that constraint.',
|
|
93
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ThrottleCPUCapabilities',
|
|
94
|
-
examples: [
|
|
95
|
-
[
|
|
96
|
-
'// throttle CPU and make it run 4x slower',
|
|
97
|
-
'browser.throttleCPU(4)',
|
|
98
|
-
],
|
|
99
|
-
['// reset CPU throttling', 'browser.throttleCPU(0)'],
|
|
100
|
-
],
|
|
101
|
-
parameters: [
|
|
102
|
-
{
|
|
103
|
-
name: 'rate',
|
|
104
|
-
type: 'number',
|
|
105
|
-
description: 'Rate on how much the CPU should get throttled.',
|
|
106
|
-
required: true,
|
|
107
|
-
},
|
|
108
|
-
],
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
'/session/:sessionId/sauce/ondemand/intercept': {
|
|
112
|
-
POST: {
|
|
113
|
-
command: 'interceptRequest',
|
|
114
|
-
description: 'Allows modifying any request made by the browser. You can blacklist, modify, or redirect these as required for your tests.',
|
|
115
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-InterceptNetworkRequests',
|
|
116
|
-
examples: [
|
|
117
|
-
[
|
|
118
|
-
'// redirect a request',
|
|
119
|
-
'browser.interceptRequest({',
|
|
120
|
-
" url: 'https://saucelabs.com',",
|
|
121
|
-
" redirect: 'https://google.com'",
|
|
122
|
-
'})',
|
|
123
|
-
],
|
|
124
|
-
[
|
|
125
|
-
'// Blacklist requests to 3rd party vendors',
|
|
126
|
-
'browser.interceptRequest({',
|
|
127
|
-
" url: 'https://api.segment.io/v1/p',",
|
|
128
|
-
" error: 'Failed'",
|
|
129
|
-
'})',
|
|
130
|
-
],
|
|
131
|
-
[
|
|
132
|
-
'// Modify requests to REST API (Mock REST API response)',
|
|
133
|
-
'browser.interceptRequest({',
|
|
134
|
-
" url: 'http://sampleapp.appspot.com/api/todos',",
|
|
135
|
-
' response: {',
|
|
136
|
-
' headers: {',
|
|
137
|
-
" 'x-custom-headers': 'foobar'",
|
|
138
|
-
' },',
|
|
139
|
-
' body: [{',
|
|
140
|
-
" title: 'My custom todo',",
|
|
141
|
-
' order: 1,',
|
|
142
|
-
' completed: false,',
|
|
143
|
-
" url: 'http://todo-backend-express.herokuapp.com/15727'",
|
|
144
|
-
' }]',
|
|
145
|
-
' }',
|
|
146
|
-
'})',
|
|
147
|
-
],
|
|
148
|
-
],
|
|
149
|
-
parameters: [
|
|
150
|
-
{
|
|
151
|
-
name: 'rule',
|
|
152
|
-
type: 'object',
|
|
153
|
-
description: 'A rule describing the request interception.',
|
|
154
|
-
required: true,
|
|
155
|
-
},
|
|
156
|
-
],
|
|
157
|
-
},
|
|
158
|
-
},
|
|
159
|
-
'/session/:sessionId/sauce/ondemand/performance': {
|
|
160
|
-
POST: {
|
|
161
|
-
command: 'assertPerformance',
|
|
162
|
-
description: 'Assert against the performance baseline of your app.',
|
|
163
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
164
|
-
examples: [
|
|
165
|
-
[
|
|
166
|
-
'// test performance for a page',
|
|
167
|
-
"browser.url('https://webdriver.io')",
|
|
168
|
-
'const hasRegression = browser.assertPerformance({',
|
|
169
|
-
" name: 'my performance test', // make sure that the name is also set in the sauce options in your capabilities",
|
|
170
|
-
" metrics: ['score', 'firstPaint']",
|
|
171
|
-
'})',
|
|
172
|
-
],
|
|
173
|
-
],
|
|
174
|
-
parameters: [
|
|
175
|
-
{
|
|
176
|
-
name: 'name',
|
|
177
|
-
type: 'string',
|
|
178
|
-
description: 'Name of the job you created your baseline with.',
|
|
179
|
-
required: true,
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
name: 'metrics',
|
|
183
|
-
type: 'string[]',
|
|
184
|
-
description: 'Name of metrics you want to assert agains the baseline.',
|
|
185
|
-
required: false,
|
|
186
|
-
},
|
|
187
|
-
],
|
|
188
|
-
returns: {
|
|
189
|
-
type: 'object',
|
|
190
|
-
name: 'hasRegression',
|
|
191
|
-
description: 'An object containing the result as well as metrics about the result.',
|
|
192
|
-
},
|
|
193
|
-
},
|
|
194
|
-
},
|
|
195
|
-
'/session/:sessionId/sauce/ondemand/performance/scroll': {
|
|
196
|
-
POST: {
|
|
197
|
-
command: 'jankinessCheck',
|
|
198
|
-
description: 'Perform a scroll test that evaluates the jankiness of the application.',
|
|
199
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
200
|
-
examples: [
|
|
201
|
-
[
|
|
202
|
-
'// test performance for a page',
|
|
203
|
-
"browser.url('https://webdriver.io')",
|
|
204
|
-
'browser.jankinessCheck()',
|
|
205
|
-
],
|
|
206
|
-
],
|
|
207
|
-
parameters: [],
|
|
208
|
-
returns: {
|
|
209
|
-
type: 'object',
|
|
210
|
-
name: 'testResults',
|
|
211
|
-
description: 'An object containing the score as well as metrics around how smooth the UX of the page was during the test.',
|
|
212
|
-
},
|
|
213
|
-
},
|
|
214
|
-
},
|
|
215
|
-
'/session/:sessionId/sauce/ondemand/mock': {
|
|
216
|
-
POST: {
|
|
217
|
-
command: 'mockRequest',
|
|
218
|
-
description: 'Mocks a network resource.',
|
|
219
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
220
|
-
parameters: [
|
|
221
|
-
{
|
|
222
|
-
name: 'url',
|
|
223
|
-
type: 'string',
|
|
224
|
-
description: 'URL glob to match url to mock.',
|
|
225
|
-
required: true,
|
|
226
|
-
},
|
|
227
|
-
{
|
|
228
|
-
name: 'filterOptions',
|
|
229
|
-
description: 'Additional filter options for url to mock (e.g. headers, method).',
|
|
230
|
-
type: 'object',
|
|
231
|
-
required: false,
|
|
232
|
-
},
|
|
233
|
-
],
|
|
234
|
-
returns: {
|
|
235
|
-
type: 'object',
|
|
236
|
-
name: 'mockId',
|
|
237
|
-
description: 'An object containing the id of a mock resource.',
|
|
238
|
-
},
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
'/session/:sessionId/sauce/ondemand/mock/:mockId': {
|
|
242
|
-
GET: {
|
|
243
|
-
command: 'getMockCalls',
|
|
244
|
-
description: 'Receive request information about requests that match the mocked resource.',
|
|
245
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
246
|
-
variables: [
|
|
247
|
-
{
|
|
248
|
-
name: 'mockId',
|
|
249
|
-
description: 'the id of a mock',
|
|
250
|
-
},
|
|
251
|
-
],
|
|
252
|
-
parameters: [],
|
|
253
|
-
returns: {
|
|
254
|
-
type: 'object',
|
|
255
|
-
name: 'requests',
|
|
256
|
-
description: 'A list of request information.',
|
|
257
|
-
},
|
|
258
|
-
},
|
|
259
|
-
DELETE: {
|
|
260
|
-
command: 'clearMockCalls',
|
|
261
|
-
description: 'Clear list of mock calls.',
|
|
262
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
263
|
-
variables: [
|
|
264
|
-
{
|
|
265
|
-
name: 'mockId',
|
|
266
|
-
description: 'the id of a mock',
|
|
267
|
-
},
|
|
268
|
-
],
|
|
269
|
-
parameters: [
|
|
270
|
-
{
|
|
271
|
-
type: 'boolean',
|
|
272
|
-
name: 'restore',
|
|
273
|
-
description: 'Set to true if mock should be restored as well.',
|
|
274
|
-
required: false,
|
|
275
|
-
},
|
|
276
|
-
],
|
|
277
|
-
},
|
|
278
|
-
POST: {
|
|
279
|
-
command: 'respondMock',
|
|
280
|
-
description: 'Respond if mock matches a specific resource.',
|
|
281
|
-
ref: 'https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands',
|
|
282
|
-
variables: [
|
|
283
|
-
{
|
|
284
|
-
name: 'mockId',
|
|
285
|
-
description: 'the id of a mock',
|
|
286
|
-
},
|
|
287
|
-
],
|
|
288
|
-
parameters: [
|
|
289
|
-
{
|
|
290
|
-
type: 'object',
|
|
291
|
-
name: 'payload',
|
|
292
|
-
description: 'Information on mock response.',
|
|
293
|
-
},
|
|
294
|
-
],
|
|
295
|
-
},
|
|
296
|
-
},
|
|
297
|
-
};
|
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
export default {
|
|
2
|
-
'/session/:sessionId/se/file': {
|
|
3
|
-
POST: {
|
|
4
|
-
command: 'file',
|
|
5
|
-
description: 'Upload a file to remote machine on which the browser is running.',
|
|
6
|
-
ref: 'https://www.seleniumhq.org/',
|
|
7
|
-
parameters: [
|
|
8
|
-
{
|
|
9
|
-
name: 'file',
|
|
10
|
-
type: 'string',
|
|
11
|
-
description: 'Base64-encoded zip archive containing __single__ file which to upload. In case base64-encoded data does not represent a zip archive or archive contains more than one file it will throw an unknown error.',
|
|
12
|
-
required: true,
|
|
13
|
-
},
|
|
14
|
-
],
|
|
15
|
-
returns: {
|
|
16
|
-
type: 'String',
|
|
17
|
-
name: 'path',
|
|
18
|
-
description: 'Absolute path of uploaded file on remote machine.',
|
|
19
|
-
},
|
|
20
|
-
},
|
|
21
|
-
},
|
|
22
|
-
'/grid/api/hub/': {
|
|
23
|
-
GET: {
|
|
24
|
-
isHubCommand: true,
|
|
25
|
-
command: 'getHubConfig',
|
|
26
|
-
description: 'Receive hub config remotely.',
|
|
27
|
-
ref: 'https://github.com/nicegraham/selenium-grid2-api#gridapihub',
|
|
28
|
-
parameters: [],
|
|
29
|
-
returns: {
|
|
30
|
-
type: 'Object',
|
|
31
|
-
name: 'config',
|
|
32
|
-
description: 'Returns the hub config with slotCount, timeouts and other information.',
|
|
33
|
-
},
|
|
34
|
-
},
|
|
35
|
-
},
|
|
36
|
-
'/grid/api/testsession?session=:session': {
|
|
37
|
-
GET: {
|
|
38
|
-
isHubCommand: true,
|
|
39
|
-
command: 'gridTestSession',
|
|
40
|
-
description: 'Get the details of the Selenium Grid node running a session.',
|
|
41
|
-
ref: 'https://github.com/nicegraham/selenium-grid2-api#gridapitestsession',
|
|
42
|
-
parameters: [],
|
|
43
|
-
variables: [
|
|
44
|
-
{
|
|
45
|
-
name: 'session',
|
|
46
|
-
description: 'The id of the session to receive hub details for.',
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
returns: {
|
|
50
|
-
type: 'Object',
|
|
51
|
-
name: 'details',
|
|
52
|
-
description: 'Object containing information about session details.',
|
|
53
|
-
},
|
|
54
|
-
},
|
|
55
|
-
},
|
|
56
|
-
'/grid/api/proxy': {
|
|
57
|
-
GET: {
|
|
58
|
-
isHubCommand: true,
|
|
59
|
-
command: 'gridProxyDetails',
|
|
60
|
-
description: 'Get proxy details.',
|
|
61
|
-
ref: 'https://github.com/nicegraham/selenium-grid2-api#gridapiproxy',
|
|
62
|
-
parameters: [
|
|
63
|
-
{
|
|
64
|
-
name: 'id',
|
|
65
|
-
type: 'string',
|
|
66
|
-
description: 'the id of the proxy (can be received using gridTestSession command).',
|
|
67
|
-
required: true,
|
|
68
|
-
},
|
|
69
|
-
],
|
|
70
|
-
returns: {
|
|
71
|
-
type: 'Object',
|
|
72
|
-
name: 'details',
|
|
73
|
-
description: 'Object containing information about proxy.',
|
|
74
|
-
},
|
|
75
|
-
},
|
|
76
|
-
},
|
|
77
|
-
'/lifecycle-manager?action=:action': {
|
|
78
|
-
GET: {
|
|
79
|
-
isHubCommand: true,
|
|
80
|
-
command: 'manageSeleniumHubLifecycle',
|
|
81
|
-
description: 'Manage lifecycle of hub node.',
|
|
82
|
-
ref: 'https://github.com/nicegraham/selenium-grid2-api#lifecycle-manager',
|
|
83
|
-
parameters: [],
|
|
84
|
-
variables: [
|
|
85
|
-
{
|
|
86
|
-
name: 'action',
|
|
87
|
-
description: "Command to call on Selenium Hub. The only implemented action is to 'shutdown' the hub.",
|
|
88
|
-
},
|
|
89
|
-
],
|
|
90
|
-
},
|
|
91
|
-
},
|
|
92
|
-
'/graphql': {
|
|
93
|
-
POST: {
|
|
94
|
-
isHubCommand: true,
|
|
95
|
-
command: 'queryGrid',
|
|
96
|
-
description: 'Send GraphQL queries to the Selenium (hub or node) server to fetch data. (Only supported with Selenium v4 Server)',
|
|
97
|
-
ref: 'https://www.selenium.dev/documentation/grid/advanced_features/graphql_support/',
|
|
98
|
-
parameters: [
|
|
99
|
-
{
|
|
100
|
-
name: 'query',
|
|
101
|
-
type: 'string',
|
|
102
|
-
description: 'A GraphQL query to be send to the server.',
|
|
103
|
-
required: true,
|
|
104
|
-
},
|
|
105
|
-
],
|
|
106
|
-
examples: [
|
|
107
|
-
[
|
|
108
|
-
"const result = await browser.queryGrid('{ nodesInfo { nodes { status, uri } } }');",
|
|
109
|
-
'console.log(JSON.stringify(result, null, 4))',
|
|
110
|
-
'/**',
|
|
111
|
-
' * outputs:',
|
|
112
|
-
' * {',
|
|
113
|
-
' * "data": {',
|
|
114
|
-
' * "nodesInfo": {',
|
|
115
|
-
' * "nodes": [{',
|
|
116
|
-
' * "status": "UP",',
|
|
117
|
-
' * "uri": "http://192.168.0.39:4444"',
|
|
118
|
-
' * }]',
|
|
119
|
-
' * }',
|
|
120
|
-
' * }',
|
|
121
|
-
' * }',
|
|
122
|
-
' */',
|
|
123
|
-
],
|
|
124
|
-
],
|
|
125
|
-
returns: {
|
|
126
|
-
type: 'Object',
|
|
127
|
-
name: 'data',
|
|
128
|
-
description: 'Result of the GraphQL query.',
|
|
129
|
-
},
|
|
130
|
-
},
|
|
131
|
-
},
|
|
132
|
-
};
|