@browserstack/mcp-server 2.2.2 → 2.3.0-beta.1
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/capability/appautomate.capability-index.json +3233 -0
- package/capability/automate.capability-index.json +2068 -0
- package/dist/tools/capability-registry/bind.js +56 -0
- package/dist/tools/capability-registry/config.d.ts +1 -25
- package/dist/tools/capability-registry/config.js +40 -1
- package/dist/tools/capability-registry/discovery.d.ts +1 -1
- package/dist/tools/capability-registry/egress.js +21 -3
- package/dist/tools/capability-registry/index-loader.d.ts +33 -7
- package/dist/tools/capability-registry/index-loader.js +99 -26
- package/dist/tools/capability-registry/register.d.ts +1 -1
- package/dist/tools/capability-registry/register.js +21 -5
- package/dist/tools/capability-registry/resolve.js +42 -1
- package/dist/tools/capability-registry/types.d.ts +86 -0
- package/package.json +1 -1
|
@@ -0,0 +1,2068 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schema_version": 1,
|
|
3
|
+
"version": "0.1",
|
|
4
|
+
"build_id": "automate-authored",
|
|
5
|
+
"automate": {
|
|
6
|
+
"summary": "BrowserStack Automate: drive a real desktop or mobile browser page by page. The account side lists every operating system, browser and version combination available, reports parallel-session capacity, and keeps each session's record \u2014 status, shareable link, video, and console, network and profiling logs \u2014 after the browser is released. The session side opens a browser on a chosen combination and drives it: navigate, go back and forward, reload, read the page HTML and element text, find elements by CSS or XPath, click, type, clear, run JavaScript, screenshot the viewport, resize the window, move between tabs and iframes, and read cookies. Web pages are RUN here \u2014 unlike Test Management, which authors cases, and Test Reporting, which records results pushed in from a runner. Mobile APPS are not here: those are App Automate, which drives an installed app rather than a browser. Scrolling is done through execute_script, there is no capability that waits, and element ids go stale as soon as the page navigates or re-renders. A session holds a browser until it is ended.",
|
|
7
|
+
"routing_terms": [
|
|
8
|
+
"automate",
|
|
9
|
+
"browser",
|
|
10
|
+
"web",
|
|
11
|
+
"website",
|
|
12
|
+
"web page",
|
|
13
|
+
"chrome",
|
|
14
|
+
"firefox",
|
|
15
|
+
"safari",
|
|
16
|
+
"edge",
|
|
17
|
+
"desktop browser",
|
|
18
|
+
"mobile browser",
|
|
19
|
+
"selenium",
|
|
20
|
+
"webdriver",
|
|
21
|
+
"navigate",
|
|
22
|
+
"url",
|
|
23
|
+
"click",
|
|
24
|
+
"type",
|
|
25
|
+
"scroll",
|
|
26
|
+
"iframe",
|
|
27
|
+
"tab",
|
|
28
|
+
"cookie",
|
|
29
|
+
"screenshot",
|
|
30
|
+
"console logs",
|
|
31
|
+
"network logs",
|
|
32
|
+
"har",
|
|
33
|
+
"browser session",
|
|
34
|
+
"cross browser"
|
|
35
|
+
],
|
|
36
|
+
"base_url": "https://hub.browserstack.com",
|
|
37
|
+
"hosts": {
|
|
38
|
+
"api": "https://api.browserstack.com"
|
|
39
|
+
},
|
|
40
|
+
"auth": {
|
|
41
|
+
"type": "http",
|
|
42
|
+
"scheme": "basic"
|
|
43
|
+
},
|
|
44
|
+
"capabilities": [
|
|
45
|
+
{
|
|
46
|
+
"name": "list_browsers",
|
|
47
|
+
"method": "GET",
|
|
48
|
+
"path": "/automate/browsers.json",
|
|
49
|
+
"mode": "read",
|
|
50
|
+
"entity": "browser",
|
|
51
|
+
"intent": "List every operating system, browser and version combination this account can run a web session on, with the exact names create_session expects.",
|
|
52
|
+
"guidance": [
|
|
53
|
+
"This is a very large answer \u2014 several thousand rows, one per combination \u2014 and there is no filtering on the wire. Narrow it yourself, and never read it whole into a reply.",
|
|
54
|
+
"A desktop row carries os, os_version, browser and browser_version, with device null. A mobile row carries device and real_mobile true instead, and its browser_version is null because the browser ships with the OS.",
|
|
55
|
+
"The browser names are lower case and are what create_session takes: chrome, firefox, edge, safari, opera, and chromium on mobile.",
|
|
56
|
+
"Pass the strings exactly as they appear; an unlisted combination is refused rather than substituted."
|
|
57
|
+
],
|
|
58
|
+
"returns": [
|
|
59
|
+
"browser",
|
|
60
|
+
"browser_version",
|
|
61
|
+
"os",
|
|
62
|
+
"os_version",
|
|
63
|
+
"device",
|
|
64
|
+
"real_mobile"
|
|
65
|
+
],
|
|
66
|
+
"responses": {
|
|
67
|
+
"200": {
|
|
68
|
+
"description": "Every supported combination.",
|
|
69
|
+
"schema": {
|
|
70
|
+
"$schema": "BrowserList"
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
"401": {
|
|
74
|
+
"$response": "Unauthorized"
|
|
75
|
+
}
|
|
76
|
+
},
|
|
77
|
+
"host": "api"
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"name": "get_plan",
|
|
81
|
+
"method": "GET",
|
|
82
|
+
"path": "/automate/plan.json",
|
|
83
|
+
"mode": "read",
|
|
84
|
+
"entity": "plan",
|
|
85
|
+
"intent": "Show the Automate plan and how many parallel browser sessions are running, queued and allowed \u2014 check this before starting a session or a batch of them.",
|
|
86
|
+
"guidance": [
|
|
87
|
+
"A start past the limit queues rather than failing, which looks like a slow start; this is how to tell the two apart.",
|
|
88
|
+
"The counts are account-wide and include sessions other people and CI started.",
|
|
89
|
+
"This is the web plan. App Automate has its own, counted separately."
|
|
90
|
+
],
|
|
91
|
+
"returns": [
|
|
92
|
+
"automate_plan",
|
|
93
|
+
"parallel_sessions_running",
|
|
94
|
+
"parallel_sessions_max_allowed",
|
|
95
|
+
"team_parallel_sessions_max_allowed",
|
|
96
|
+
"queued_sessions",
|
|
97
|
+
"queued_sessions_max_allowed",
|
|
98
|
+
"terminal_access"
|
|
99
|
+
],
|
|
100
|
+
"responses": {
|
|
101
|
+
"200": {
|
|
102
|
+
"description": "Plan name and parallel usage.",
|
|
103
|
+
"schema": {
|
|
104
|
+
"$schema": "Plan"
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
"401": {
|
|
108
|
+
"$response": "Unauthorized"
|
|
109
|
+
}
|
|
110
|
+
},
|
|
111
|
+
"host": "api"
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
"name": "get_session",
|
|
115
|
+
"method": "GET",
|
|
116
|
+
"path": "/automate/sessions/{session_id}.json",
|
|
117
|
+
"mode": "read",
|
|
118
|
+
"entity": "browser_session",
|
|
119
|
+
"intent": "Get a web session's record: status, browser, duration, the shareable link, the video, and the console, network and profiling logs \u2014 use this for the links to share or to review a finished run.",
|
|
120
|
+
"guidance": [
|
|
121
|
+
"public_url opens without a BrowserStack login, so it is the link to share outside the team; it carries an auth token and should be treated as a secret.",
|
|
122
|
+
"browser_url is the session on the dashboard and needs a login.",
|
|
123
|
+
"video_url is only complete once the session has ended.",
|
|
124
|
+
"har_logs_url, browser_console_logs_url and browser_profiling_url are present only when the session was started with the matching capability; they are fetched separately and are not part of this answer.",
|
|
125
|
+
"Works for any session on the account, including ones this caller did not start."
|
|
126
|
+
],
|
|
127
|
+
"path_params": [
|
|
128
|
+
{
|
|
129
|
+
"name": "session_id",
|
|
130
|
+
"type": "string",
|
|
131
|
+
"required": true,
|
|
132
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
133
|
+
}
|
|
134
|
+
],
|
|
135
|
+
"returns": [
|
|
136
|
+
"status",
|
|
137
|
+
"reason",
|
|
138
|
+
"browser",
|
|
139
|
+
"browser_version",
|
|
140
|
+
"os",
|
|
141
|
+
"os_version",
|
|
142
|
+
"device",
|
|
143
|
+
"duration",
|
|
144
|
+
"public_url",
|
|
145
|
+
"browser_url",
|
|
146
|
+
"video_url",
|
|
147
|
+
"har_logs_url",
|
|
148
|
+
"browser_console_logs_url",
|
|
149
|
+
"browser_profiling_url",
|
|
150
|
+
"build_name",
|
|
151
|
+
"project_name",
|
|
152
|
+
"created_at",
|
|
153
|
+
"browserstack_status",
|
|
154
|
+
"hashed_id",
|
|
155
|
+
"name"
|
|
156
|
+
],
|
|
157
|
+
"responses": {
|
|
158
|
+
"200": {
|
|
159
|
+
"description": "The session record.",
|
|
160
|
+
"schema": {
|
|
161
|
+
"$schema": "SessionDetails"
|
|
162
|
+
}
|
|
163
|
+
},
|
|
164
|
+
"401": {
|
|
165
|
+
"$response": "Unauthorized"
|
|
166
|
+
}
|
|
167
|
+
},
|
|
168
|
+
"host": "api"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"name": "set_session_status",
|
|
172
|
+
"method": "PUT",
|
|
173
|
+
"path": "/automate/sessions/{session_id}.json",
|
|
174
|
+
"mode": "write",
|
|
175
|
+
"entity": "browser_session",
|
|
176
|
+
"intent": "Mark a web session passed or failed with a reason, so the dashboard shows the outcome.",
|
|
177
|
+
"guidance": [
|
|
178
|
+
"Works after the session has ended as well as during it.",
|
|
179
|
+
"Only 'passed' and 'failed' are accepted.",
|
|
180
|
+
"reason is truncated at 255 characters.",
|
|
181
|
+
"A session left unmarked reads as an abandoned run on the dashboard."
|
|
182
|
+
],
|
|
183
|
+
"path_params": [
|
|
184
|
+
{
|
|
185
|
+
"name": "session_id",
|
|
186
|
+
"type": "string",
|
|
187
|
+
"required": true,
|
|
188
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
189
|
+
}
|
|
190
|
+
],
|
|
191
|
+
"body": [
|
|
192
|
+
{
|
|
193
|
+
"name": "status",
|
|
194
|
+
"type": "string",
|
|
195
|
+
"required": true,
|
|
196
|
+
"values": [
|
|
197
|
+
"passed",
|
|
198
|
+
"failed"
|
|
199
|
+
],
|
|
200
|
+
"example": "passed"
|
|
201
|
+
},
|
|
202
|
+
{
|
|
203
|
+
"name": "reason",
|
|
204
|
+
"type": "string",
|
|
205
|
+
"maxLength": 255,
|
|
206
|
+
"description": "Short explanation shown beside the status.",
|
|
207
|
+
"example": "Cart totalled correctly after adding two items"
|
|
208
|
+
}
|
|
209
|
+
],
|
|
210
|
+
"returns": [
|
|
211
|
+
"status",
|
|
212
|
+
"reason",
|
|
213
|
+
"hashed_id",
|
|
214
|
+
"name",
|
|
215
|
+
"browser",
|
|
216
|
+
"os",
|
|
217
|
+
"os_version",
|
|
218
|
+
"build_name",
|
|
219
|
+
"project_name"
|
|
220
|
+
],
|
|
221
|
+
"responses": {
|
|
222
|
+
"200": {
|
|
223
|
+
"description": "The updated session record.",
|
|
224
|
+
"schema": {
|
|
225
|
+
"$schema": "SessionStatusUpdate"
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
"401": {
|
|
229
|
+
"$response": "Unauthorized"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"host": "api"
|
|
233
|
+
},
|
|
234
|
+
{
|
|
235
|
+
"name": "create_session",
|
|
236
|
+
"method": "POST",
|
|
237
|
+
"path": "/wd/hub/session",
|
|
238
|
+
"mode": "write",
|
|
239
|
+
"entity": "browser_session",
|
|
240
|
+
"intent": "Start a browser session on a real desktop or mobile browser and get a session id to drive it with \u2014 use this to open a page and interact with it step by step.",
|
|
241
|
+
"guidance": [
|
|
242
|
+
"A DESKTOP target needs browser_name with os and os_version; a MOBILE BROWSER needs browser_name with device_name and real_mobile instead, and takes no browser_version because the browser ships with the OS. Sending both kinds together is refused.",
|
|
243
|
+
"ON MOBILE THE BROWSER IS NAMED AFTER THE PLATFORM, not the product: Chrome on an Android phone is \"android\", Safari on an iPhone is \"iphone\" and on an iPad \"ipad\". Samsung Internet is \"samsung\" and Chromium-based mobile browsers are \"chromium\". Asking for \"chrome\" or \"safari\" on a phone is refused.",
|
|
244
|
+
"Take every value from list_browsers exactly as it spells them; an unlisted combination is refused rather than substituted.",
|
|
245
|
+
"The session id comes back at value.sessionId \u2014 carry it into every other browser_session capability.",
|
|
246
|
+
"A session starts in seconds rather than the tens of seconds a device session takes, but it still holds a browser and consumes Automate minutes until it ends: always finish with set_session_status and then delete_session.",
|
|
247
|
+
"The session ends itself after idle_timeout seconds without a command, and after 2 hours in total.",
|
|
248
|
+
"console_logs and network_logs must be asked for here; they cannot be turned on once the session is running, and get_session only links to them when they were.",
|
|
249
|
+
"Credentials belong in the Authorization header, never inside bstack:options: capabilities are echoed back in session-not-created errors."
|
|
250
|
+
],
|
|
251
|
+
"body": [
|
|
252
|
+
{
|
|
253
|
+
"name": "browser_name",
|
|
254
|
+
"type": "string",
|
|
255
|
+
"required": true,
|
|
256
|
+
"json_path": "/capabilities/alwaysMatch/browserName",
|
|
257
|
+
"values": [
|
|
258
|
+
"chrome",
|
|
259
|
+
"chromeForTesting",
|
|
260
|
+
"edge",
|
|
261
|
+
"firefox",
|
|
262
|
+
"ie",
|
|
263
|
+
"opera",
|
|
264
|
+
"safari",
|
|
265
|
+
"android",
|
|
266
|
+
"chromium",
|
|
267
|
+
"ipad",
|
|
268
|
+
"iphone",
|
|
269
|
+
"samsung"
|
|
270
|
+
],
|
|
271
|
+
"description": "Lower case except chromeForTesting, exactly as list_browsers spells it. Desktop: chrome, chromeForTesting, edge, firefox, ie, opera, safari. Mobile: android, chromium, ipad, iphone, samsung.",
|
|
272
|
+
"example": "chrome"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"name": "browser_version",
|
|
276
|
+
"type": "string",
|
|
277
|
+
"json_path": "/capabilities/alwaysMatch/browserVersion",
|
|
278
|
+
"description": "Desktop only. Omit for the newest, or for a mobile browser, which has no separate version.",
|
|
279
|
+
"example": "latest"
|
|
280
|
+
},
|
|
281
|
+
{
|
|
282
|
+
"name": "os",
|
|
283
|
+
"type": "string",
|
|
284
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/os",
|
|
285
|
+
"description": "Desktop only, paired with os_version. Only Windows and OS X; a mobile browser uses device_name instead.",
|
|
286
|
+
"example": "Windows",
|
|
287
|
+
"values": [
|
|
288
|
+
"Windows",
|
|
289
|
+
"OS X"
|
|
290
|
+
]
|
|
291
|
+
},
|
|
292
|
+
{
|
|
293
|
+
"name": "os_version",
|
|
294
|
+
"type": "string",
|
|
295
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/osVersion",
|
|
296
|
+
"description": "The desktop OS version, or the mobile device's OS version.",
|
|
297
|
+
"example": "11"
|
|
298
|
+
},
|
|
299
|
+
{
|
|
300
|
+
"name": "device_name",
|
|
301
|
+
"type": "string",
|
|
302
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/deviceName",
|
|
303
|
+
"description": "Mobile browser only, paired with real_mobile and os_version.",
|
|
304
|
+
"example": "Samsung Galaxy S23"
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
"name": "real_mobile",
|
|
308
|
+
"type": "string",
|
|
309
|
+
"values": [
|
|
310
|
+
"true"
|
|
311
|
+
],
|
|
312
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/realMobile",
|
|
313
|
+
"description": "Mobile browser only: the string \"true\", not a boolean.",
|
|
314
|
+
"example": "true"
|
|
315
|
+
},
|
|
316
|
+
{
|
|
317
|
+
"name": "resolution",
|
|
318
|
+
"type": "string",
|
|
319
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/resolution",
|
|
320
|
+
"description": "Desktop screen resolution. The browser window is smaller than this; read the real size from get_window_rect.",
|
|
321
|
+
"example": "1920x1080"
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
"name": "idle_timeout",
|
|
325
|
+
"type": "integer",
|
|
326
|
+
"minimum": 0,
|
|
327
|
+
"maximum": 300,
|
|
328
|
+
"default": 90,
|
|
329
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/idleTimeout",
|
|
330
|
+
"description": "Seconds the session may sit without a command before it is ended. Raise it when an agent drives the session step by step.",
|
|
331
|
+
"example": 300
|
|
332
|
+
},
|
|
333
|
+
{
|
|
334
|
+
"name": "video",
|
|
335
|
+
"type": "boolean",
|
|
336
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/video",
|
|
337
|
+
"description": "Record a video of the session. On by default; set false for a page showing sensitive data.",
|
|
338
|
+
"example": true
|
|
339
|
+
},
|
|
340
|
+
{
|
|
341
|
+
"name": "console_logs",
|
|
342
|
+
"type": "string",
|
|
343
|
+
"values": [
|
|
344
|
+
"disable",
|
|
345
|
+
"errors",
|
|
346
|
+
"warnings",
|
|
347
|
+
"info",
|
|
348
|
+
"verbose"
|
|
349
|
+
],
|
|
350
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/consoleLogs",
|
|
351
|
+
"description": "Capture the browser console at this level.",
|
|
352
|
+
"example": "info"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
"name": "network_logs",
|
|
356
|
+
"type": "boolean",
|
|
357
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/networkLogs",
|
|
358
|
+
"description": "Capture network traffic as a HAR, linked from get_session.",
|
|
359
|
+
"example": true
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"name": "project_name",
|
|
363
|
+
"type": "string",
|
|
364
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/projectName",
|
|
365
|
+
"description": "Groups sessions on the dashboard.",
|
|
366
|
+
"example": "Checkout flows"
|
|
367
|
+
},
|
|
368
|
+
{
|
|
369
|
+
"name": "build_name",
|
|
370
|
+
"type": "string",
|
|
371
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/buildName",
|
|
372
|
+
"description": "Build the session is filed under.",
|
|
373
|
+
"example": "agent-exploration"
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
"name": "session_name",
|
|
377
|
+
"type": "string",
|
|
378
|
+
"maxLength": 255,
|
|
379
|
+
"json_path": "/capabilities/alwaysMatch/bstack:options/sessionName",
|
|
380
|
+
"description": "Name shown for this session.",
|
|
381
|
+
"example": "cart totals"
|
|
382
|
+
}
|
|
383
|
+
],
|
|
384
|
+
"returns": [
|
|
385
|
+
"value.sessionId",
|
|
386
|
+
"value.capabilities"
|
|
387
|
+
],
|
|
388
|
+
"responses": {
|
|
389
|
+
"200": {
|
|
390
|
+
"description": "The new session.",
|
|
391
|
+
"schema": {
|
|
392
|
+
"$schema": "NewSessionResponse"
|
|
393
|
+
}
|
|
394
|
+
},
|
|
395
|
+
"400": {
|
|
396
|
+
"$response": "WebDriverError"
|
|
397
|
+
}
|
|
398
|
+
}
|
|
399
|
+
},
|
|
400
|
+
{
|
|
401
|
+
"name": "navigate_to",
|
|
402
|
+
"method": "POST",
|
|
403
|
+
"path": "/wd/hub/session/{session_id}/url",
|
|
404
|
+
"mode": "write",
|
|
405
|
+
"entity": "browser_session",
|
|
406
|
+
"intent": "Open a URL in the session's browser \u2014 use this to go to the page you want to work on.",
|
|
407
|
+
"guidance": [
|
|
408
|
+
"The call returns once the page has loaded, so there is no need to wait afterwards; a slow page is bounded by the page-load timeout rather than by this call.",
|
|
409
|
+
"A URL without a scheme is rejected: send the https:// prefix.",
|
|
410
|
+
"Navigating away invalidates every element id already held \u2014 find elements again on the new page."
|
|
411
|
+
],
|
|
412
|
+
"path_params": [
|
|
413
|
+
{
|
|
414
|
+
"name": "session_id",
|
|
415
|
+
"type": "string",
|
|
416
|
+
"required": true,
|
|
417
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
418
|
+
}
|
|
419
|
+
],
|
|
420
|
+
"body": [
|
|
421
|
+
{
|
|
422
|
+
"name": "url",
|
|
423
|
+
"type": "string",
|
|
424
|
+
"required": true,
|
|
425
|
+
"format": "uri",
|
|
426
|
+
"description": "Absolute URL including the scheme.",
|
|
427
|
+
"example": "https://www.bstackdemo.com/"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"returns": [
|
|
431
|
+
"value"
|
|
432
|
+
],
|
|
433
|
+
"responses": {
|
|
434
|
+
"200": {
|
|
435
|
+
"description": "Null on success.",
|
|
436
|
+
"schema": {
|
|
437
|
+
"$schema": "NullValueResponse"
|
|
438
|
+
}
|
|
439
|
+
},
|
|
440
|
+
"404": {
|
|
441
|
+
"$response": "WebDriverError"
|
|
442
|
+
}
|
|
443
|
+
}
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"name": "get_current_url",
|
|
447
|
+
"method": "GET",
|
|
448
|
+
"path": "/wd/hub/session/{session_id}/url",
|
|
449
|
+
"mode": "read",
|
|
450
|
+
"entity": "browser_session",
|
|
451
|
+
"intent": "Read the URL the browser is on now \u2014 use this to confirm a navigation, a redirect or a form submission went where expected.",
|
|
452
|
+
"guidance": [
|
|
453
|
+
"A single-page app can change what is on screen without changing this, so confirm from the page rather than the URL alone."
|
|
454
|
+
],
|
|
455
|
+
"path_params": [
|
|
456
|
+
{
|
|
457
|
+
"name": "session_id",
|
|
458
|
+
"type": "string",
|
|
459
|
+
"required": true,
|
|
460
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
461
|
+
}
|
|
462
|
+
],
|
|
463
|
+
"returns": [
|
|
464
|
+
"value"
|
|
465
|
+
],
|
|
466
|
+
"responses": {
|
|
467
|
+
"200": {
|
|
468
|
+
"description": "The current URL.",
|
|
469
|
+
"schema": {
|
|
470
|
+
"$schema": "StringValueResponse"
|
|
471
|
+
}
|
|
472
|
+
},
|
|
473
|
+
"404": {
|
|
474
|
+
"$response": "WebDriverError"
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
},
|
|
478
|
+
{
|
|
479
|
+
"name": "get_title",
|
|
480
|
+
"method": "GET",
|
|
481
|
+
"path": "/wd/hub/session/{session_id}/title",
|
|
482
|
+
"mode": "read",
|
|
483
|
+
"entity": "browser_session",
|
|
484
|
+
"intent": "Read the page title \u2014 the cheapest way to confirm which page is loaded.",
|
|
485
|
+
"guidance": [
|
|
486
|
+
"Far cheaper than get_page_source when all that is needed is which page is showing."
|
|
487
|
+
],
|
|
488
|
+
"path_params": [
|
|
489
|
+
{
|
|
490
|
+
"name": "session_id",
|
|
491
|
+
"type": "string",
|
|
492
|
+
"required": true,
|
|
493
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
494
|
+
}
|
|
495
|
+
],
|
|
496
|
+
"returns": [
|
|
497
|
+
"value"
|
|
498
|
+
],
|
|
499
|
+
"responses": {
|
|
500
|
+
"200": {
|
|
501
|
+
"description": "The document title.",
|
|
502
|
+
"schema": {
|
|
503
|
+
"$schema": "StringValueResponse"
|
|
504
|
+
}
|
|
505
|
+
},
|
|
506
|
+
"404": {
|
|
507
|
+
"$response": "WebDriverError"
|
|
508
|
+
}
|
|
509
|
+
}
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
"name": "go_back",
|
|
513
|
+
"method": "POST",
|
|
514
|
+
"path": "/wd/hub/session/{session_id}/back",
|
|
515
|
+
"mode": "write",
|
|
516
|
+
"entity": "browser_session",
|
|
517
|
+
"intent": "Go back one entry in the browser's history.",
|
|
518
|
+
"guidance": [
|
|
519
|
+
"Takes no parameters of its own.",
|
|
520
|
+
"Element ids from the page being left stop working; find them again.",
|
|
521
|
+
"Going back past the first page of the session does nothing and still answers 200."
|
|
522
|
+
],
|
|
523
|
+
"path_params": [
|
|
524
|
+
{
|
|
525
|
+
"name": "session_id",
|
|
526
|
+
"type": "string",
|
|
527
|
+
"required": true,
|
|
528
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
529
|
+
}
|
|
530
|
+
],
|
|
531
|
+
"returns": [
|
|
532
|
+
"value"
|
|
533
|
+
],
|
|
534
|
+
"responses": {
|
|
535
|
+
"200": {
|
|
536
|
+
"description": "Null on success.",
|
|
537
|
+
"schema": {
|
|
538
|
+
"$schema": "NullValueResponse"
|
|
539
|
+
}
|
|
540
|
+
},
|
|
541
|
+
"404": {
|
|
542
|
+
"$response": "WebDriverError"
|
|
543
|
+
}
|
|
544
|
+
},
|
|
545
|
+
"send_empty_body": true
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
"name": "go_forward",
|
|
549
|
+
"method": "POST",
|
|
550
|
+
"path": "/wd/hub/session/{session_id}/forward",
|
|
551
|
+
"mode": "write",
|
|
552
|
+
"entity": "browser_session",
|
|
553
|
+
"intent": "Go forward one entry in the browser's history, after going back.",
|
|
554
|
+
"guidance": [
|
|
555
|
+
"Takes no parameters of its own.",
|
|
556
|
+
"Does nothing when there is nothing to go forward to, and still answers 200."
|
|
557
|
+
],
|
|
558
|
+
"path_params": [
|
|
559
|
+
{
|
|
560
|
+
"name": "session_id",
|
|
561
|
+
"type": "string",
|
|
562
|
+
"required": true,
|
|
563
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
564
|
+
}
|
|
565
|
+
],
|
|
566
|
+
"returns": [
|
|
567
|
+
"value"
|
|
568
|
+
],
|
|
569
|
+
"responses": {
|
|
570
|
+
"200": {
|
|
571
|
+
"description": "Null on success.",
|
|
572
|
+
"schema": {
|
|
573
|
+
"$schema": "NullValueResponse"
|
|
574
|
+
}
|
|
575
|
+
},
|
|
576
|
+
"404": {
|
|
577
|
+
"$response": "WebDriverError"
|
|
578
|
+
}
|
|
579
|
+
},
|
|
580
|
+
"send_empty_body": true
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
"name": "refresh_page",
|
|
584
|
+
"method": "POST",
|
|
585
|
+
"path": "/wd/hub/session/{session_id}/refresh",
|
|
586
|
+
"mode": "write",
|
|
587
|
+
"entity": "browser_session",
|
|
588
|
+
"intent": "Reload the current page \u2014 use this to pick up a change the page does not reflect on its own.",
|
|
589
|
+
"guidance": [
|
|
590
|
+
"Takes no parameters of its own.",
|
|
591
|
+
"Every element id held becomes stale; find them again.",
|
|
592
|
+
"Anything typed and not submitted is lost."
|
|
593
|
+
],
|
|
594
|
+
"path_params": [
|
|
595
|
+
{
|
|
596
|
+
"name": "session_id",
|
|
597
|
+
"type": "string",
|
|
598
|
+
"required": true,
|
|
599
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
600
|
+
}
|
|
601
|
+
],
|
|
602
|
+
"returns": [
|
|
603
|
+
"value"
|
|
604
|
+
],
|
|
605
|
+
"responses": {
|
|
606
|
+
"200": {
|
|
607
|
+
"description": "Null on success.",
|
|
608
|
+
"schema": {
|
|
609
|
+
"$schema": "NullValueResponse"
|
|
610
|
+
}
|
|
611
|
+
},
|
|
612
|
+
"404": {
|
|
613
|
+
"$response": "WebDriverError"
|
|
614
|
+
}
|
|
615
|
+
},
|
|
616
|
+
"send_empty_body": true
|
|
617
|
+
},
|
|
618
|
+
{
|
|
619
|
+
"name": "get_page_source",
|
|
620
|
+
"method": "GET",
|
|
621
|
+
"path": "/wd/hub/session/{session_id}/source",
|
|
622
|
+
"mode": "read",
|
|
623
|
+
"entity": "browser_session",
|
|
624
|
+
"intent": "Get the current page's HTML \u2014 use this to find selectors, or to read content a screenshot cannot show.",
|
|
625
|
+
"guidance": [
|
|
626
|
+
"A real page runs to tens of kilobytes or more, so search it for what is needed rather than reading all of it. get_title and get_element_text answer most questions far more cheaply.",
|
|
627
|
+
"This is the page as the browser has it now, including anything scripts have changed, not the HTML the server sent.",
|
|
628
|
+
"Inside a frame this returns that frame's document; switch_to_frame with a null id first to get the top-level page back."
|
|
629
|
+
],
|
|
630
|
+
"path_params": [
|
|
631
|
+
{
|
|
632
|
+
"name": "session_id",
|
|
633
|
+
"type": "string",
|
|
634
|
+
"required": true,
|
|
635
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
636
|
+
}
|
|
637
|
+
],
|
|
638
|
+
"returns": [
|
|
639
|
+
"value"
|
|
640
|
+
],
|
|
641
|
+
"responses": {
|
|
642
|
+
"200": {
|
|
643
|
+
"description": "The page HTML.",
|
|
644
|
+
"schema": {
|
|
645
|
+
"$schema": "StringValueResponse"
|
|
646
|
+
}
|
|
647
|
+
},
|
|
648
|
+
"404": {
|
|
649
|
+
"$response": "WebDriverError"
|
|
650
|
+
}
|
|
651
|
+
},
|
|
652
|
+
"disabled": true
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
"name": "find_element",
|
|
656
|
+
"method": "POST",
|
|
657
|
+
"path": "/wd/hub/session/{session_id}/element",
|
|
658
|
+
"mode": "read",
|
|
659
|
+
"entity": "browser_session",
|
|
660
|
+
"intent": "Locate one element on the page by CSS selector, XPath or link text \u2014 use this to get the element id that click_element, send_keys and the element readers act on.",
|
|
661
|
+
"guidance": [
|
|
662
|
+
"The element id comes back under value[\"element-6066-11e4-a52e-4f735466cecf\"]; pass that string as element_id.",
|
|
663
|
+
"No match is a 404 with error \"no such element\". The element may not have rendered yet, or may be inside a frame \u2014 switch_to_frame first in that case.",
|
|
664
|
+
"A css selector is the cheapest and most stable choice; xpath is slower and brittle to markup changes.",
|
|
665
|
+
"An id goes stale the moment the page navigates, reloads or re-renders that part of the DOM, and using a stale one answers \"stale element reference\". Find it again rather than holding it across a navigation."
|
|
666
|
+
],
|
|
667
|
+
"path_params": [
|
|
668
|
+
{
|
|
669
|
+
"name": "session_id",
|
|
670
|
+
"type": "string",
|
|
671
|
+
"required": true,
|
|
672
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
673
|
+
}
|
|
674
|
+
],
|
|
675
|
+
"body": [
|
|
676
|
+
{
|
|
677
|
+
"name": "using",
|
|
678
|
+
"type": "string",
|
|
679
|
+
"required": true,
|
|
680
|
+
"values": [
|
|
681
|
+
"css selector",
|
|
682
|
+
"xpath",
|
|
683
|
+
"link text",
|
|
684
|
+
"partial link text",
|
|
685
|
+
"tag name"
|
|
686
|
+
],
|
|
687
|
+
"example": "css selector"
|
|
688
|
+
},
|
|
689
|
+
{
|
|
690
|
+
"name": "value",
|
|
691
|
+
"type": "string",
|
|
692
|
+
"required": true,
|
|
693
|
+
"description": "The selector itself, interpreted according to using.",
|
|
694
|
+
"example": ".shelf-item__buy-btn"
|
|
695
|
+
}
|
|
696
|
+
],
|
|
697
|
+
"returns": [
|
|
698
|
+
"value"
|
|
699
|
+
],
|
|
700
|
+
"responses": {
|
|
701
|
+
"200": {
|
|
702
|
+
"description": "The matching element reference.",
|
|
703
|
+
"schema": {
|
|
704
|
+
"$schema": "ElementResponse"
|
|
705
|
+
}
|
|
706
|
+
},
|
|
707
|
+
"404": {
|
|
708
|
+
"$response": "WebDriverError"
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
},
|
|
712
|
+
{
|
|
713
|
+
"name": "find_elements",
|
|
714
|
+
"method": "POST",
|
|
715
|
+
"path": "/wd/hub/session/{session_id}/elements",
|
|
716
|
+
"mode": "read",
|
|
717
|
+
"entity": "browser_session",
|
|
718
|
+
"intent": "Locate every element matching a selector \u2014 use this to count matches, or to work through a list of results, products or rows.",
|
|
719
|
+
"guidance": [
|
|
720
|
+
"No match is an EMPTY LIST and a 200, not a 404 \u2014 the opposite of find_element, which is how to test whether something is absent without handling an error.",
|
|
721
|
+
"The order is the document's own.",
|
|
722
|
+
"Each entry carries the same element-6066 key as find_element."
|
|
723
|
+
],
|
|
724
|
+
"path_params": [
|
|
725
|
+
{
|
|
726
|
+
"name": "session_id",
|
|
727
|
+
"type": "string",
|
|
728
|
+
"required": true,
|
|
729
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
730
|
+
}
|
|
731
|
+
],
|
|
732
|
+
"body": [
|
|
733
|
+
{
|
|
734
|
+
"name": "using",
|
|
735
|
+
"type": "string",
|
|
736
|
+
"required": true,
|
|
737
|
+
"values": [
|
|
738
|
+
"css selector",
|
|
739
|
+
"xpath",
|
|
740
|
+
"link text",
|
|
741
|
+
"partial link text",
|
|
742
|
+
"tag name"
|
|
743
|
+
],
|
|
744
|
+
"example": "css selector"
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
"name": "value",
|
|
748
|
+
"type": "string",
|
|
749
|
+
"required": true,
|
|
750
|
+
"description": "The selector itself, interpreted according to using.",
|
|
751
|
+
"example": ".shelf-item__buy-btn"
|
|
752
|
+
}
|
|
753
|
+
],
|
|
754
|
+
"returns": [
|
|
755
|
+
"value"
|
|
756
|
+
],
|
|
757
|
+
"responses": {
|
|
758
|
+
"200": {
|
|
759
|
+
"description": "Every matching element, possibly none.",
|
|
760
|
+
"schema": {
|
|
761
|
+
"$schema": "ElementListResponse"
|
|
762
|
+
}
|
|
763
|
+
},
|
|
764
|
+
"404": {
|
|
765
|
+
"$response": "WebDriverError"
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
769
|
+
{
|
|
770
|
+
"name": "click_element",
|
|
771
|
+
"method": "POST",
|
|
772
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/click",
|
|
773
|
+
"mode": "write",
|
|
774
|
+
"entity": "browser_session",
|
|
775
|
+
"intent": "Click an element \u2014 use this for buttons, links, checkboxes and anything else that responds to a click.",
|
|
776
|
+
"guidance": [
|
|
777
|
+
"Takes no parameters of its own.",
|
|
778
|
+
"The element must be in view and not covered. A click on something another element overlaps answers \"element click intercepted\" and names the element in the way \u2014 scroll it into view with execute_script, or dismiss the overlay first.",
|
|
779
|
+
"An element that is not visible answers \"element not interactable\".",
|
|
780
|
+
"Success means the click was dispatched, not that the page has finished reacting: read the page or the URL afterwards to confirm."
|
|
781
|
+
],
|
|
782
|
+
"path_params": [
|
|
783
|
+
{
|
|
784
|
+
"name": "session_id",
|
|
785
|
+
"type": "string",
|
|
786
|
+
"required": true,
|
|
787
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
788
|
+
},
|
|
789
|
+
{
|
|
790
|
+
"name": "element_id",
|
|
791
|
+
"type": "string",
|
|
792
|
+
"required": true,
|
|
793
|
+
"description": "Element id from find_element.",
|
|
794
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
795
|
+
}
|
|
796
|
+
],
|
|
797
|
+
"returns": [
|
|
798
|
+
"value"
|
|
799
|
+
],
|
|
800
|
+
"responses": {
|
|
801
|
+
"200": {
|
|
802
|
+
"description": "Null on success.",
|
|
803
|
+
"schema": {
|
|
804
|
+
"$schema": "NullValueResponse"
|
|
805
|
+
}
|
|
806
|
+
},
|
|
807
|
+
"404": {
|
|
808
|
+
"$response": "WebDriverError"
|
|
809
|
+
}
|
|
810
|
+
},
|
|
811
|
+
"send_empty_body": true
|
|
812
|
+
},
|
|
813
|
+
{
|
|
814
|
+
"name": "send_keys",
|
|
815
|
+
"method": "POST",
|
|
816
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/value",
|
|
817
|
+
"mode": "write",
|
|
818
|
+
"entity": "browser_session",
|
|
819
|
+
"intent": "Type into a field \u2014 use this to fill a search box, a login form or any editable input.",
|
|
820
|
+
"guidance": [
|
|
821
|
+
"APPENDS to whatever the field already holds. Call clear_element first to replace the value rather than adding to it.",
|
|
822
|
+
"Read the result back with get_element_property on \"value\", not get_element_text, which is empty for an input.",
|
|
823
|
+
"A \\n at the end submits the form, which is usually quicker than finding and clicking the submit button.",
|
|
824
|
+
"The element must be editable; typing into anything else answers \"element not interactable\".",
|
|
825
|
+
"A site's own autocomplete or dropdown may swallow the keystrokes and require a click on a suggestion instead."
|
|
826
|
+
],
|
|
827
|
+
"path_params": [
|
|
828
|
+
{
|
|
829
|
+
"name": "session_id",
|
|
830
|
+
"type": "string",
|
|
831
|
+
"required": true,
|
|
832
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
833
|
+
},
|
|
834
|
+
{
|
|
835
|
+
"name": "element_id",
|
|
836
|
+
"type": "string",
|
|
837
|
+
"required": true,
|
|
838
|
+
"description": "Element id from find_element.",
|
|
839
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
840
|
+
}
|
|
841
|
+
],
|
|
842
|
+
"body": [
|
|
843
|
+
{
|
|
844
|
+
"name": "text",
|
|
845
|
+
"type": "string",
|
|
846
|
+
"required": true,
|
|
847
|
+
"description": "The characters to type. End with \\n to submit.",
|
|
848
|
+
"example": "BrowserStack"
|
|
849
|
+
}
|
|
850
|
+
],
|
|
851
|
+
"returns": [
|
|
852
|
+
"value"
|
|
853
|
+
],
|
|
854
|
+
"responses": {
|
|
855
|
+
"200": {
|
|
856
|
+
"description": "Null on success.",
|
|
857
|
+
"schema": {
|
|
858
|
+
"$schema": "NullValueResponse"
|
|
859
|
+
}
|
|
860
|
+
},
|
|
861
|
+
"404": {
|
|
862
|
+
"$response": "WebDriverError"
|
|
863
|
+
}
|
|
864
|
+
}
|
|
865
|
+
},
|
|
866
|
+
{
|
|
867
|
+
"name": "clear_element",
|
|
868
|
+
"method": "POST",
|
|
869
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/clear",
|
|
870
|
+
"mode": "write",
|
|
871
|
+
"entity": "browser_session",
|
|
872
|
+
"intent": "Empty an input \u2014 use this before typing, since send_keys adds to what is already there.",
|
|
873
|
+
"guidance": [
|
|
874
|
+
"Takes no parameters of its own.",
|
|
875
|
+
"Confirm with get_element_property on \"value\", which reads empty afterwards.",
|
|
876
|
+
"Clearing also fires the page's own change handlers, so a form may revalidate and show an error about the now-empty field.",
|
|
877
|
+
"The element must be editable; anything else answers \"invalid element state\"."
|
|
878
|
+
],
|
|
879
|
+
"path_params": [
|
|
880
|
+
{
|
|
881
|
+
"name": "session_id",
|
|
882
|
+
"type": "string",
|
|
883
|
+
"required": true,
|
|
884
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
885
|
+
},
|
|
886
|
+
{
|
|
887
|
+
"name": "element_id",
|
|
888
|
+
"type": "string",
|
|
889
|
+
"required": true,
|
|
890
|
+
"description": "Element id from find_element.",
|
|
891
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
892
|
+
}
|
|
893
|
+
],
|
|
894
|
+
"returns": [
|
|
895
|
+
"value"
|
|
896
|
+
],
|
|
897
|
+
"responses": {
|
|
898
|
+
"200": {
|
|
899
|
+
"description": "Null on success.",
|
|
900
|
+
"schema": {
|
|
901
|
+
"$schema": "NullValueResponse"
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
"404": {
|
|
905
|
+
"$response": "WebDriverError"
|
|
906
|
+
}
|
|
907
|
+
},
|
|
908
|
+
"send_empty_body": true
|
|
909
|
+
},
|
|
910
|
+
{
|
|
911
|
+
"name": "get_element_text",
|
|
912
|
+
"method": "GET",
|
|
913
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/text",
|
|
914
|
+
"mode": "read",
|
|
915
|
+
"entity": "browser_session",
|
|
916
|
+
"intent": "Read the visible text of an element \u2014 use this to check a heading, a price, a label or an error message.",
|
|
917
|
+
"guidance": [
|
|
918
|
+
"EMPTY FOR AN INPUT. What a user typed is a property, not text: read it with get_element_property on \"value\".",
|
|
919
|
+
"This is the rendered text, so it excludes anything hidden by CSS and collapses whitespace the way the page displays it.",
|
|
920
|
+
"For a container it returns the text of everything inside it, which can be far more than expected."
|
|
921
|
+
],
|
|
922
|
+
"path_params": [
|
|
923
|
+
{
|
|
924
|
+
"name": "session_id",
|
|
925
|
+
"type": "string",
|
|
926
|
+
"required": true,
|
|
927
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
"name": "element_id",
|
|
931
|
+
"type": "string",
|
|
932
|
+
"required": true,
|
|
933
|
+
"description": "Element id from find_element.",
|
|
934
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
935
|
+
}
|
|
936
|
+
],
|
|
937
|
+
"returns": [
|
|
938
|
+
"value"
|
|
939
|
+
],
|
|
940
|
+
"responses": {
|
|
941
|
+
"200": {
|
|
942
|
+
"description": "The element's visible text.",
|
|
943
|
+
"schema": {
|
|
944
|
+
"$schema": "StringValueResponse"
|
|
945
|
+
}
|
|
946
|
+
},
|
|
947
|
+
"404": {
|
|
948
|
+
"$response": "WebDriverError"
|
|
949
|
+
}
|
|
950
|
+
},
|
|
951
|
+
"disabled": true
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
"name": "get_element_property",
|
|
955
|
+
"method": "GET",
|
|
956
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/property/{name}",
|
|
957
|
+
"mode": "read",
|
|
958
|
+
"entity": "browser_session",
|
|
959
|
+
"intent": "Read a live DOM property of an element \u2014 use this for what a field currently holds, or whether a box is checked right now.",
|
|
960
|
+
"guidance": [
|
|
961
|
+
"THIS IS THE ONE THAT READS A FIELD'S CURRENT VALUE. get_element_text is empty for an input, and the \"value\" attribute is the markup's initial value rather than what is in the box now.",
|
|
962
|
+
"Useful names: value, checked, selected, disabled, innerText, href.",
|
|
963
|
+
"A property the element does not have comes back null, not an error."
|
|
964
|
+
],
|
|
965
|
+
"path_params": [
|
|
966
|
+
{
|
|
967
|
+
"name": "session_id",
|
|
968
|
+
"type": "string",
|
|
969
|
+
"required": true,
|
|
970
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
971
|
+
},
|
|
972
|
+
{
|
|
973
|
+
"name": "element_id",
|
|
974
|
+
"type": "string",
|
|
975
|
+
"required": true,
|
|
976
|
+
"description": "Element id from find_element.",
|
|
977
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
978
|
+
},
|
|
979
|
+
{
|
|
980
|
+
"name": "name",
|
|
981
|
+
"type": "string",
|
|
982
|
+
"required": true,
|
|
983
|
+
"description": "The DOM property to read.",
|
|
984
|
+
"example": "value"
|
|
985
|
+
}
|
|
986
|
+
],
|
|
987
|
+
"returns": [
|
|
988
|
+
"value"
|
|
989
|
+
],
|
|
990
|
+
"responses": {
|
|
991
|
+
"200": {
|
|
992
|
+
"description": "The property's value, or null.",
|
|
993
|
+
"schema": {
|
|
994
|
+
"$schema": "AnyValueResponse"
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
"404": {
|
|
998
|
+
"$response": "WebDriverError"
|
|
999
|
+
}
|
|
1000
|
+
}
|
|
1001
|
+
},
|
|
1002
|
+
{
|
|
1003
|
+
"name": "get_element_attribute",
|
|
1004
|
+
"method": "GET",
|
|
1005
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/attribute/{name}",
|
|
1006
|
+
"mode": "read",
|
|
1007
|
+
"entity": "browser_session",
|
|
1008
|
+
"intent": "Read an HTML attribute of an element \u2014 use this for ids, classes, data- attributes and link targets as the markup declares them.",
|
|
1009
|
+
"guidance": [
|
|
1010
|
+
"This is the attribute as written in the HTML, which is NOT what a field currently holds: for that, use get_element_property on \"value\".",
|
|
1011
|
+
"An attribute the element does not carry comes back null rather than an error, so null means absent, not empty.",
|
|
1012
|
+
"An attribute a script has changed may still read as the original markup; the property is the live view."
|
|
1013
|
+
],
|
|
1014
|
+
"path_params": [
|
|
1015
|
+
{
|
|
1016
|
+
"name": "session_id",
|
|
1017
|
+
"type": "string",
|
|
1018
|
+
"required": true,
|
|
1019
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1020
|
+
},
|
|
1021
|
+
{
|
|
1022
|
+
"name": "element_id",
|
|
1023
|
+
"type": "string",
|
|
1024
|
+
"required": true,
|
|
1025
|
+
"description": "Element id from find_element.",
|
|
1026
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
1027
|
+
},
|
|
1028
|
+
{
|
|
1029
|
+
"name": "name",
|
|
1030
|
+
"type": "string",
|
|
1031
|
+
"required": true,
|
|
1032
|
+
"description": "The attribute to read.",
|
|
1033
|
+
"example": "class"
|
|
1034
|
+
}
|
|
1035
|
+
],
|
|
1036
|
+
"returns": [
|
|
1037
|
+
"value"
|
|
1038
|
+
],
|
|
1039
|
+
"responses": {
|
|
1040
|
+
"200": {
|
|
1041
|
+
"description": "The attribute's value, or null when absent.",
|
|
1042
|
+
"schema": {
|
|
1043
|
+
"$schema": "NullableStringResponse"
|
|
1044
|
+
}
|
|
1045
|
+
},
|
|
1046
|
+
"404": {
|
|
1047
|
+
"$response": "WebDriverError"
|
|
1048
|
+
}
|
|
1049
|
+
},
|
|
1050
|
+
"disabled": true
|
|
1051
|
+
},
|
|
1052
|
+
{
|
|
1053
|
+
"name": "is_element_displayed",
|
|
1054
|
+
"method": "GET",
|
|
1055
|
+
"path": "/wd/hub/session/{session_id}/element/{element_id}/displayed",
|
|
1056
|
+
"mode": "read",
|
|
1057
|
+
"entity": "browser_session",
|
|
1058
|
+
"intent": "Check whether an element is actually visible on the page \u2014 use this before clicking, or to confirm something appeared or went away.",
|
|
1059
|
+
"guidance": [
|
|
1060
|
+
"False for an element that exists in the DOM but is hidden, zero-sized or has no visible text, which is why find_element succeeding does not mean a click will.",
|
|
1061
|
+
"It does not say whether the element is scrolled into view or covered by something else; a click can still be intercepted."
|
|
1062
|
+
],
|
|
1063
|
+
"path_params": [
|
|
1064
|
+
{
|
|
1065
|
+
"name": "session_id",
|
|
1066
|
+
"type": "string",
|
|
1067
|
+
"required": true,
|
|
1068
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1069
|
+
},
|
|
1070
|
+
{
|
|
1071
|
+
"name": "element_id",
|
|
1072
|
+
"type": "string",
|
|
1073
|
+
"required": true,
|
|
1074
|
+
"description": "Element id from find_element.",
|
|
1075
|
+
"example": "f.31006BCEEF25A5A489371DAD0726B51F.d.B5F92408.e.13"
|
|
1076
|
+
}
|
|
1077
|
+
],
|
|
1078
|
+
"returns": [
|
|
1079
|
+
"value"
|
|
1080
|
+
],
|
|
1081
|
+
"responses": {
|
|
1082
|
+
"200": {
|
|
1083
|
+
"description": "True when the element is visible.",
|
|
1084
|
+
"schema": {
|
|
1085
|
+
"$schema": "BooleanValueResponse"
|
|
1086
|
+
}
|
|
1087
|
+
},
|
|
1088
|
+
"404": {
|
|
1089
|
+
"$response": "WebDriverError"
|
|
1090
|
+
}
|
|
1091
|
+
},
|
|
1092
|
+
"disabled": true
|
|
1093
|
+
},
|
|
1094
|
+
{
|
|
1095
|
+
"name": "execute_script",
|
|
1096
|
+
"method": "POST",
|
|
1097
|
+
"path": "/wd/hub/session/{session_id}/execute/sync",
|
|
1098
|
+
"mode": "write",
|
|
1099
|
+
"entity": "browser_session",
|
|
1100
|
+
"intent": "Run JavaScript in the page \u2014 use this to scroll, read something the element readers cannot reach, or drive a control that resists clicking.",
|
|
1101
|
+
"guidance": [
|
|
1102
|
+
"SCROLLING LIVES HERE: window.scrollTo(0, document.body.scrollHeight) goes to the bottom, and arguments[0].scrollIntoView({block:'center'}) brings an element into view before clicking it.",
|
|
1103
|
+
"`return` is required to get a value back; without it the answer is null.",
|
|
1104
|
+
"An element id can be passed in args as {\"element-6066-11e4-a52e-4f735466cecf\": \"<id>\"} and arrives as a real element in arguments.",
|
|
1105
|
+
"It runs with the page's own privileges and can change anything, so a script that alters state is as consequential as a click.",
|
|
1106
|
+
"A script that throws answers \"javascript error\" with the page's own message."
|
|
1107
|
+
],
|
|
1108
|
+
"path_params": [
|
|
1109
|
+
{
|
|
1110
|
+
"name": "session_id",
|
|
1111
|
+
"type": "string",
|
|
1112
|
+
"required": true,
|
|
1113
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1114
|
+
}
|
|
1115
|
+
],
|
|
1116
|
+
"body": [
|
|
1117
|
+
{
|
|
1118
|
+
"name": "script",
|
|
1119
|
+
"type": "string",
|
|
1120
|
+
"required": true,
|
|
1121
|
+
"description": "The JavaScript to run. Use `return` to get a value back.",
|
|
1122
|
+
"example": "window.scrollTo(0, document.body.scrollHeight); return window.scrollY"
|
|
1123
|
+
},
|
|
1124
|
+
{
|
|
1125
|
+
"name": "args",
|
|
1126
|
+
"type": "array",
|
|
1127
|
+
"required": true,
|
|
1128
|
+
"description": "Arguments, available as `arguments` in the script. Send an empty list when there are none.",
|
|
1129
|
+
"example": []
|
|
1130
|
+
}
|
|
1131
|
+
],
|
|
1132
|
+
"returns": [
|
|
1133
|
+
"value"
|
|
1134
|
+
],
|
|
1135
|
+
"responses": {
|
|
1136
|
+
"200": {
|
|
1137
|
+
"description": "Whatever the script returned.",
|
|
1138
|
+
"schema": {
|
|
1139
|
+
"$schema": "AnyValueResponse"
|
|
1140
|
+
}
|
|
1141
|
+
},
|
|
1142
|
+
"404": {
|
|
1143
|
+
"$response": "WebDriverError"
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
1146
|
+
},
|
|
1147
|
+
{
|
|
1148
|
+
"name": "take_screenshot",
|
|
1149
|
+
"method": "GET",
|
|
1150
|
+
"path": "/wd/hub/session/{session_id}/screenshot",
|
|
1151
|
+
"mode": "read",
|
|
1152
|
+
"entity": "browser_session",
|
|
1153
|
+
"intent": "Take a screenshot of the browser's viewport, as a base64 PNG \u2014 use this to see the page as a user would.",
|
|
1154
|
+
"guidance": [
|
|
1155
|
+
"Returned inline as base64 and typically tens of kilobytes, so take one when the picture is needed rather than after every step.",
|
|
1156
|
+
"The VIEWPORT only, not the whole page: anything below the fold needs scrolling into view first with execute_script.",
|
|
1157
|
+
"get_element_text and get_title answer most checks far more cheaply than reading an image."
|
|
1158
|
+
],
|
|
1159
|
+
"path_params": [
|
|
1160
|
+
{
|
|
1161
|
+
"name": "session_id",
|
|
1162
|
+
"type": "string",
|
|
1163
|
+
"required": true,
|
|
1164
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1165
|
+
}
|
|
1166
|
+
],
|
|
1167
|
+
"returns": [
|
|
1168
|
+
"value"
|
|
1169
|
+
],
|
|
1170
|
+
"responses": {
|
|
1171
|
+
"200": {
|
|
1172
|
+
"description": "Base64-encoded PNG of the viewport.",
|
|
1173
|
+
"schema": {
|
|
1174
|
+
"$schema": "StringValueResponse"
|
|
1175
|
+
}
|
|
1176
|
+
},
|
|
1177
|
+
"404": {
|
|
1178
|
+
"$response": "WebDriverError"
|
|
1179
|
+
}
|
|
1180
|
+
}
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
"name": "get_window_rect",
|
|
1184
|
+
"method": "GET",
|
|
1185
|
+
"path": "/wd/hub/session/{session_id}/window/rect",
|
|
1186
|
+
"mode": "read",
|
|
1187
|
+
"entity": "browser_session",
|
|
1188
|
+
"intent": "Read the browser window's size and position \u2014 use this to learn the real viewport before planning anything that depends on layout.",
|
|
1189
|
+
"guidance": [
|
|
1190
|
+
"The window is smaller than the screen resolution asked for at session start, because of the browser's own chrome; this is the real figure."
|
|
1191
|
+
],
|
|
1192
|
+
"path_params": [
|
|
1193
|
+
{
|
|
1194
|
+
"name": "session_id",
|
|
1195
|
+
"type": "string",
|
|
1196
|
+
"required": true,
|
|
1197
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1198
|
+
}
|
|
1199
|
+
],
|
|
1200
|
+
"returns": [
|
|
1201
|
+
"value.width",
|
|
1202
|
+
"value.height",
|
|
1203
|
+
"value.x",
|
|
1204
|
+
"value.y"
|
|
1205
|
+
],
|
|
1206
|
+
"responses": {
|
|
1207
|
+
"200": {
|
|
1208
|
+
"description": "The window rectangle.",
|
|
1209
|
+
"schema": {
|
|
1210
|
+
"$schema": "RectResponse"
|
|
1211
|
+
}
|
|
1212
|
+
},
|
|
1213
|
+
"404": {
|
|
1214
|
+
"$response": "WebDriverError"
|
|
1215
|
+
}
|
|
1216
|
+
},
|
|
1217
|
+
"disabled": true
|
|
1218
|
+
},
|
|
1219
|
+
{
|
|
1220
|
+
"name": "set_window_rect",
|
|
1221
|
+
"method": "POST",
|
|
1222
|
+
"path": "/wd/hub/session/{session_id}/window/rect",
|
|
1223
|
+
"mode": "write",
|
|
1224
|
+
"entity": "browser_session",
|
|
1225
|
+
"intent": "Resize or move the browser window \u2014 use this to check a layout at a particular width.",
|
|
1226
|
+
"guidance": [
|
|
1227
|
+
"The response is the rectangle actually applied, which can differ from the one asked for: a window cannot exceed the screen, and some sizes are adjusted.",
|
|
1228
|
+
"Resizing re-lays out the page, so element positions change and anything measured before is stale.",
|
|
1229
|
+
"A real mobile browser is not uniformly resizable: an Android device accepts the call, while iOS refuses it with a 405. Read the size back from get_window_rect rather than assuming either."
|
|
1230
|
+
],
|
|
1231
|
+
"path_params": [
|
|
1232
|
+
{
|
|
1233
|
+
"name": "session_id",
|
|
1234
|
+
"type": "string",
|
|
1235
|
+
"required": true,
|
|
1236
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1237
|
+
}
|
|
1238
|
+
],
|
|
1239
|
+
"body": [
|
|
1240
|
+
{
|
|
1241
|
+
"name": "width",
|
|
1242
|
+
"type": "integer",
|
|
1243
|
+
"minimum": 0,
|
|
1244
|
+
"example": 1200
|
|
1245
|
+
},
|
|
1246
|
+
{
|
|
1247
|
+
"name": "height",
|
|
1248
|
+
"type": "integer",
|
|
1249
|
+
"minimum": 0,
|
|
1250
|
+
"example": 900
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
"name": "x",
|
|
1254
|
+
"type": "integer",
|
|
1255
|
+
"example": 0
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
"name": "y",
|
|
1259
|
+
"type": "integer",
|
|
1260
|
+
"example": 0
|
|
1261
|
+
}
|
|
1262
|
+
],
|
|
1263
|
+
"returns": [
|
|
1264
|
+
"value.width",
|
|
1265
|
+
"value.height",
|
|
1266
|
+
"value.x",
|
|
1267
|
+
"value.y"
|
|
1268
|
+
],
|
|
1269
|
+
"responses": {
|
|
1270
|
+
"200": {
|
|
1271
|
+
"description": "The rectangle now in effect.",
|
|
1272
|
+
"schema": {
|
|
1273
|
+
"$schema": "RectResponse"
|
|
1274
|
+
}
|
|
1275
|
+
},
|
|
1276
|
+
"404": {
|
|
1277
|
+
"$response": "WebDriverError"
|
|
1278
|
+
}
|
|
1279
|
+
},
|
|
1280
|
+
"disabled": true
|
|
1281
|
+
},
|
|
1282
|
+
{
|
|
1283
|
+
"name": "maximize_window",
|
|
1284
|
+
"method": "POST",
|
|
1285
|
+
"path": "/wd/hub/session/{session_id}/window/maximize",
|
|
1286
|
+
"mode": "write",
|
|
1287
|
+
"entity": "browser_session",
|
|
1288
|
+
"intent": "Maximise the browser window \u2014 use this to give the page the most room before reading a wide layout.",
|
|
1289
|
+
"guidance": [
|
|
1290
|
+
"Takes no parameters of its own.",
|
|
1291
|
+
"Page layout changes, so anything measured before is stale.",
|
|
1292
|
+
"Aimed at a desktop browser; a real mobile browser is already full screen and may refuse it."
|
|
1293
|
+
],
|
|
1294
|
+
"path_params": [
|
|
1295
|
+
{
|
|
1296
|
+
"name": "session_id",
|
|
1297
|
+
"type": "string",
|
|
1298
|
+
"required": true,
|
|
1299
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1300
|
+
}
|
|
1301
|
+
],
|
|
1302
|
+
"returns": [
|
|
1303
|
+
"value.width",
|
|
1304
|
+
"value.height",
|
|
1305
|
+
"value.x",
|
|
1306
|
+
"value.y"
|
|
1307
|
+
],
|
|
1308
|
+
"responses": {
|
|
1309
|
+
"200": {
|
|
1310
|
+
"description": "The rectangle after maximising.",
|
|
1311
|
+
"schema": {
|
|
1312
|
+
"$schema": "RectResponse"
|
|
1313
|
+
}
|
|
1314
|
+
},
|
|
1315
|
+
"404": {
|
|
1316
|
+
"$response": "WebDriverError"
|
|
1317
|
+
}
|
|
1318
|
+
},
|
|
1319
|
+
"send_empty_body": true,
|
|
1320
|
+
"disabled": true
|
|
1321
|
+
},
|
|
1322
|
+
{
|
|
1323
|
+
"name": "list_window_handles",
|
|
1324
|
+
"method": "GET",
|
|
1325
|
+
"path": "/wd/hub/session/{session_id}/window/handles",
|
|
1326
|
+
"mode": "read",
|
|
1327
|
+
"entity": "browser_session",
|
|
1328
|
+
"intent": "List the open tabs and windows \u2014 use this to find a tab a link opened, before switching to it.",
|
|
1329
|
+
"guidance": [
|
|
1330
|
+
"The first handle is the one the session started in. A new tab appears at the end.",
|
|
1331
|
+
"A handle is opaque and only valid within this session.",
|
|
1332
|
+
"Commands keep going to the tab last switched to, even after a link opens another one \u2014 a click that opens a tab does not move the session into it."
|
|
1333
|
+
],
|
|
1334
|
+
"path_params": [
|
|
1335
|
+
{
|
|
1336
|
+
"name": "session_id",
|
|
1337
|
+
"type": "string",
|
|
1338
|
+
"required": true,
|
|
1339
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1340
|
+
}
|
|
1341
|
+
],
|
|
1342
|
+
"returns": [
|
|
1343
|
+
"value"
|
|
1344
|
+
],
|
|
1345
|
+
"responses": {
|
|
1346
|
+
"200": {
|
|
1347
|
+
"description": "Every open tab or window.",
|
|
1348
|
+
"schema": {
|
|
1349
|
+
"$schema": "StringListResponse"
|
|
1350
|
+
}
|
|
1351
|
+
},
|
|
1352
|
+
"404": {
|
|
1353
|
+
"$response": "WebDriverError"
|
|
1354
|
+
}
|
|
1355
|
+
}
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
"name": "switch_to_window",
|
|
1359
|
+
"method": "POST",
|
|
1360
|
+
"path": "/wd/hub/session/{session_id}/window",
|
|
1361
|
+
"mode": "write",
|
|
1362
|
+
"entity": "browser_session",
|
|
1363
|
+
"intent": "Point the session at a different tab or window \u2014 use this after a link opens one, so later commands act on it.",
|
|
1364
|
+
"guidance": [
|
|
1365
|
+
"Use a handle exactly as list_window_handles returned it; an invented one answers \"no such window\".",
|
|
1366
|
+
"Element ids from the previous tab do not carry over.",
|
|
1367
|
+
"Switching does not close anything; the other tab stays open."
|
|
1368
|
+
],
|
|
1369
|
+
"path_params": [
|
|
1370
|
+
{
|
|
1371
|
+
"name": "session_id",
|
|
1372
|
+
"type": "string",
|
|
1373
|
+
"required": true,
|
|
1374
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1375
|
+
}
|
|
1376
|
+
],
|
|
1377
|
+
"body": [
|
|
1378
|
+
{
|
|
1379
|
+
"name": "handle",
|
|
1380
|
+
"type": "string",
|
|
1381
|
+
"required": true,
|
|
1382
|
+
"description": "Handle from list_window_handles.",
|
|
1383
|
+
"example": "2FFCF2904DC789DD82BACEF48E43AE93"
|
|
1384
|
+
}
|
|
1385
|
+
],
|
|
1386
|
+
"returns": [
|
|
1387
|
+
"value"
|
|
1388
|
+
],
|
|
1389
|
+
"responses": {
|
|
1390
|
+
"200": {
|
|
1391
|
+
"description": "Null on success.",
|
|
1392
|
+
"schema": {
|
|
1393
|
+
"$schema": "NullValueResponse"
|
|
1394
|
+
}
|
|
1395
|
+
},
|
|
1396
|
+
"404": {
|
|
1397
|
+
"$response": "WebDriverError"
|
|
1398
|
+
}
|
|
1399
|
+
}
|
|
1400
|
+
},
|
|
1401
|
+
{
|
|
1402
|
+
"name": "open_new_window",
|
|
1403
|
+
"method": "POST",
|
|
1404
|
+
"path": "/wd/hub/session/{session_id}/window/new",
|
|
1405
|
+
"mode": "write",
|
|
1406
|
+
"entity": "browser_session",
|
|
1407
|
+
"intent": "Open a new tab or window \u2014 use this to work on two pages at once.",
|
|
1408
|
+
"guidance": [
|
|
1409
|
+
"The new handle comes back in the response, but the session does NOT move into it: call switch_to_window next.",
|
|
1410
|
+
"The new tab starts blank; navigate_to after switching."
|
|
1411
|
+
],
|
|
1412
|
+
"path_params": [
|
|
1413
|
+
{
|
|
1414
|
+
"name": "session_id",
|
|
1415
|
+
"type": "string",
|
|
1416
|
+
"required": true,
|
|
1417
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1418
|
+
}
|
|
1419
|
+
],
|
|
1420
|
+
"body": [
|
|
1421
|
+
{
|
|
1422
|
+
"name": "type",
|
|
1423
|
+
"type": "string",
|
|
1424
|
+
"values": [
|
|
1425
|
+
"tab",
|
|
1426
|
+
"window"
|
|
1427
|
+
],
|
|
1428
|
+
"example": "tab",
|
|
1429
|
+
"description": "Open a tab or a separate window."
|
|
1430
|
+
}
|
|
1431
|
+
],
|
|
1432
|
+
"returns": [
|
|
1433
|
+
"value.handle",
|
|
1434
|
+
"value.type"
|
|
1435
|
+
],
|
|
1436
|
+
"responses": {
|
|
1437
|
+
"200": {
|
|
1438
|
+
"description": "The new tab's handle.",
|
|
1439
|
+
"schema": {
|
|
1440
|
+
"$schema": "NewWindowResponse"
|
|
1441
|
+
}
|
|
1442
|
+
},
|
|
1443
|
+
"404": {
|
|
1444
|
+
"$response": "WebDriverError"
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
{
|
|
1449
|
+
"name": "switch_to_frame",
|
|
1450
|
+
"method": "POST",
|
|
1451
|
+
"path": "/wd/hub/session/{session_id}/frame",
|
|
1452
|
+
"mode": "write",
|
|
1453
|
+
"entity": "browser_session",
|
|
1454
|
+
"intent": "Move into an iframe, or back out to the top-level page \u2014 use this when the content you need is inside an embedded frame.",
|
|
1455
|
+
"guidance": [
|
|
1456
|
+
"SEND null TO GET BACK TO THE TOP-LEVEL PAGE. Until you do, every find_element and the page source apply to the frame only, which is the usual reason an element that is plainly on screen cannot be found.",
|
|
1457
|
+
"An index counts the frames in document order from 0, and an out-of-range one answers 404 \"no such frame\".",
|
|
1458
|
+
"A frame can also be entered by passing an element id found for the iframe itself.",
|
|
1459
|
+
"Element ids do not survive a frame switch.",
|
|
1460
|
+
"Send the index as a number and null as a real null. A quoted \"0\" or \"null\" is refused with \"invalid argument\" rather than treated as a frame."
|
|
1461
|
+
],
|
|
1462
|
+
"path_params": [
|
|
1463
|
+
{
|
|
1464
|
+
"name": "session_id",
|
|
1465
|
+
"type": "string",
|
|
1466
|
+
"required": true,
|
|
1467
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1468
|
+
}
|
|
1469
|
+
],
|
|
1470
|
+
"body": [
|
|
1471
|
+
{
|
|
1472
|
+
"name": "id",
|
|
1473
|
+
"type": "any",
|
|
1474
|
+
"required": true,
|
|
1475
|
+
"description": "The frame's index as a NUMBER, or an element reference for the iframe, or null to return to the top-level page. The type matters: sent as text, each of these is refused as an invalid argument.",
|
|
1476
|
+
"example": 0
|
|
1477
|
+
}
|
|
1478
|
+
],
|
|
1479
|
+
"returns": [
|
|
1480
|
+
"value"
|
|
1481
|
+
],
|
|
1482
|
+
"responses": {
|
|
1483
|
+
"200": {
|
|
1484
|
+
"description": "Null on success.",
|
|
1485
|
+
"schema": {
|
|
1486
|
+
"$schema": "NullValueResponse"
|
|
1487
|
+
}
|
|
1488
|
+
},
|
|
1489
|
+
"404": {
|
|
1490
|
+
"$response": "WebDriverError"
|
|
1491
|
+
}
|
|
1492
|
+
}
|
|
1493
|
+
},
|
|
1494
|
+
{
|
|
1495
|
+
"name": "get_cookies",
|
|
1496
|
+
"method": "GET",
|
|
1497
|
+
"path": "/wd/hub/session/{session_id}/cookie",
|
|
1498
|
+
"mode": "read",
|
|
1499
|
+
"entity": "browser_session",
|
|
1500
|
+
"intent": "Read the cookies for the current page \u2014 use this to check a login or consent cookie was set.",
|
|
1501
|
+
"guidance": [
|
|
1502
|
+
"Only cookies visible to the current page's domain; navigating elsewhere gives a different set.",
|
|
1503
|
+
"An empty list means none for this domain, not an error.",
|
|
1504
|
+
"A session that has not navigated anywhere yet has no cookies at all."
|
|
1505
|
+
],
|
|
1506
|
+
"path_params": [
|
|
1507
|
+
{
|
|
1508
|
+
"name": "session_id",
|
|
1509
|
+
"type": "string",
|
|
1510
|
+
"required": true,
|
|
1511
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1512
|
+
}
|
|
1513
|
+
],
|
|
1514
|
+
"returns": [
|
|
1515
|
+
"value"
|
|
1516
|
+
],
|
|
1517
|
+
"responses": {
|
|
1518
|
+
"200": {
|
|
1519
|
+
"description": "The cookies for this domain.",
|
|
1520
|
+
"schema": {
|
|
1521
|
+
"$schema": "CookieListResponse"
|
|
1522
|
+
}
|
|
1523
|
+
},
|
|
1524
|
+
"404": {
|
|
1525
|
+
"$response": "WebDriverError"
|
|
1526
|
+
}
|
|
1527
|
+
},
|
|
1528
|
+
"disabled": true
|
|
1529
|
+
},
|
|
1530
|
+
{
|
|
1531
|
+
"name": "delete_session",
|
|
1532
|
+
"method": "DELETE",
|
|
1533
|
+
"path": "/wd/hub/session/{session_id}",
|
|
1534
|
+
"mode": "write",
|
|
1535
|
+
"entity": "browser_session",
|
|
1536
|
+
"intent": "End a browser session and release the browser \u2014 use this when the flow is finished, after marking it passed or failed.",
|
|
1537
|
+
"guidance": [
|
|
1538
|
+
"Mark the outcome with set_session_status FIRST; an unmarked session reads as abandoned on the dashboard.",
|
|
1539
|
+
"The session record, video and logs survive and stay readable with get_session.",
|
|
1540
|
+
"A session already ended answers 404, which means it is gone rather than that something failed.",
|
|
1541
|
+
"Every session consumes Automate minutes until it ends, so end it even when the run failed."
|
|
1542
|
+
],
|
|
1543
|
+
"path_params": [
|
|
1544
|
+
{
|
|
1545
|
+
"name": "session_id",
|
|
1546
|
+
"type": "string",
|
|
1547
|
+
"required": true,
|
|
1548
|
+
"example": "0123456789abcdef0123456789abcdef01234567"
|
|
1549
|
+
}
|
|
1550
|
+
],
|
|
1551
|
+
"returns": [
|
|
1552
|
+
"value"
|
|
1553
|
+
],
|
|
1554
|
+
"responses": {
|
|
1555
|
+
"200": {
|
|
1556
|
+
"description": "Null on success.",
|
|
1557
|
+
"schema": {
|
|
1558
|
+
"$schema": "NullValueResponse"
|
|
1559
|
+
}
|
|
1560
|
+
},
|
|
1561
|
+
"404": {
|
|
1562
|
+
"$response": "WebDriverError"
|
|
1563
|
+
}
|
|
1564
|
+
}
|
|
1565
|
+
}
|
|
1566
|
+
],
|
|
1567
|
+
"schemas": {
|
|
1568
|
+
"StringValueResponse": {
|
|
1569
|
+
"type": "object",
|
|
1570
|
+
"properties": {
|
|
1571
|
+
"value": {
|
|
1572
|
+
"type": "string"
|
|
1573
|
+
}
|
|
1574
|
+
}
|
|
1575
|
+
},
|
|
1576
|
+
"NullableStringResponse": {
|
|
1577
|
+
"type": "object",
|
|
1578
|
+
"properties": {
|
|
1579
|
+
"value": {
|
|
1580
|
+
"type": "string",
|
|
1581
|
+
"description": "Null when the attribute is absent."
|
|
1582
|
+
}
|
|
1583
|
+
}
|
|
1584
|
+
},
|
|
1585
|
+
"BooleanValueResponse": {
|
|
1586
|
+
"type": "object",
|
|
1587
|
+
"properties": {
|
|
1588
|
+
"value": {
|
|
1589
|
+
"type": "boolean"
|
|
1590
|
+
}
|
|
1591
|
+
}
|
|
1592
|
+
},
|
|
1593
|
+
"NullValueResponse": {
|
|
1594
|
+
"type": "object",
|
|
1595
|
+
"properties": {
|
|
1596
|
+
"value": {
|
|
1597
|
+
"type": "null"
|
|
1598
|
+
}
|
|
1599
|
+
}
|
|
1600
|
+
},
|
|
1601
|
+
"AnyValueResponse": {
|
|
1602
|
+
"type": "object",
|
|
1603
|
+
"properties": {
|
|
1604
|
+
"value": {
|
|
1605
|
+
"description": "Whatever the call produced; the shape depends on what was asked for."
|
|
1606
|
+
}
|
|
1607
|
+
}
|
|
1608
|
+
},
|
|
1609
|
+
"StringListResponse": {
|
|
1610
|
+
"type": "object",
|
|
1611
|
+
"properties": {
|
|
1612
|
+
"value": {
|
|
1613
|
+
"type": "array",
|
|
1614
|
+
"items": {
|
|
1615
|
+
"type": "string"
|
|
1616
|
+
}
|
|
1617
|
+
}
|
|
1618
|
+
}
|
|
1619
|
+
},
|
|
1620
|
+
"ElementResponse": {
|
|
1621
|
+
"type": "object",
|
|
1622
|
+
"properties": {
|
|
1623
|
+
"value": {
|
|
1624
|
+
"type": "object",
|
|
1625
|
+
"properties": {
|
|
1626
|
+
"element-6066-11e4-a52e-4f735466cecf": {
|
|
1627
|
+
"type": "string",
|
|
1628
|
+
"description": "The element id to pass as element_id."
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
}
|
|
1632
|
+
}
|
|
1633
|
+
},
|
|
1634
|
+
"ElementListResponse": {
|
|
1635
|
+
"type": "object",
|
|
1636
|
+
"properties": {
|
|
1637
|
+
"value": {
|
|
1638
|
+
"type": "array",
|
|
1639
|
+
"items": {
|
|
1640
|
+
"type": "object",
|
|
1641
|
+
"properties": {
|
|
1642
|
+
"element-6066-11e4-a52e-4f735466cecf": {
|
|
1643
|
+
"type": "string"
|
|
1644
|
+
}
|
|
1645
|
+
}
|
|
1646
|
+
}
|
|
1647
|
+
}
|
|
1648
|
+
}
|
|
1649
|
+
},
|
|
1650
|
+
"RectResponse": {
|
|
1651
|
+
"type": "object",
|
|
1652
|
+
"properties": {
|
|
1653
|
+
"value": {
|
|
1654
|
+
"type": "object",
|
|
1655
|
+
"properties": {
|
|
1656
|
+
"x": {
|
|
1657
|
+
"type": "integer"
|
|
1658
|
+
},
|
|
1659
|
+
"y": {
|
|
1660
|
+
"type": "integer"
|
|
1661
|
+
},
|
|
1662
|
+
"width": {
|
|
1663
|
+
"type": "integer"
|
|
1664
|
+
},
|
|
1665
|
+
"height": {
|
|
1666
|
+
"type": "integer"
|
|
1667
|
+
}
|
|
1668
|
+
}
|
|
1669
|
+
}
|
|
1670
|
+
}
|
|
1671
|
+
},
|
|
1672
|
+
"NewWindowResponse": {
|
|
1673
|
+
"type": "object",
|
|
1674
|
+
"properties": {
|
|
1675
|
+
"value": {
|
|
1676
|
+
"type": "object",
|
|
1677
|
+
"properties": {
|
|
1678
|
+
"handle": {
|
|
1679
|
+
"type": "string"
|
|
1680
|
+
},
|
|
1681
|
+
"type": {
|
|
1682
|
+
"type": "string"
|
|
1683
|
+
}
|
|
1684
|
+
}
|
|
1685
|
+
}
|
|
1686
|
+
}
|
|
1687
|
+
},
|
|
1688
|
+
"CookieListResponse": {
|
|
1689
|
+
"type": "object",
|
|
1690
|
+
"properties": {
|
|
1691
|
+
"value": {
|
|
1692
|
+
"type": "array",
|
|
1693
|
+
"items": {
|
|
1694
|
+
"type": "object",
|
|
1695
|
+
"properties": {
|
|
1696
|
+
"name": {
|
|
1697
|
+
"type": "string"
|
|
1698
|
+
},
|
|
1699
|
+
"value": {
|
|
1700
|
+
"type": "string"
|
|
1701
|
+
},
|
|
1702
|
+
"domain": {
|
|
1703
|
+
"type": "string"
|
|
1704
|
+
},
|
|
1705
|
+
"path": {
|
|
1706
|
+
"type": "string"
|
|
1707
|
+
},
|
|
1708
|
+
"secure": {
|
|
1709
|
+
"type": "boolean"
|
|
1710
|
+
},
|
|
1711
|
+
"httpOnly": {
|
|
1712
|
+
"type": "boolean"
|
|
1713
|
+
},
|
|
1714
|
+
"expiry": {
|
|
1715
|
+
"type": "integer"
|
|
1716
|
+
}
|
|
1717
|
+
}
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
}
|
|
1721
|
+
},
|
|
1722
|
+
"NewSessionResponse": {
|
|
1723
|
+
"type": "object",
|
|
1724
|
+
"properties": {
|
|
1725
|
+
"value": {
|
|
1726
|
+
"type": "object",
|
|
1727
|
+
"properties": {
|
|
1728
|
+
"sessionId": {
|
|
1729
|
+
"type": "string",
|
|
1730
|
+
"description": "Carry this into every other browser_session capability."
|
|
1731
|
+
},
|
|
1732
|
+
"capabilities": {
|
|
1733
|
+
"type": "object",
|
|
1734
|
+
"description": "What the hub negotiated, including the browser version actually given."
|
|
1735
|
+
}
|
|
1736
|
+
}
|
|
1737
|
+
}
|
|
1738
|
+
}
|
|
1739
|
+
},
|
|
1740
|
+
"WebDriverErrorBody": {
|
|
1741
|
+
"type": "object",
|
|
1742
|
+
"properties": {
|
|
1743
|
+
"value": {
|
|
1744
|
+
"type": "object",
|
|
1745
|
+
"properties": {
|
|
1746
|
+
"error": {
|
|
1747
|
+
"type": "string",
|
|
1748
|
+
"description": "The WebDriver error code, such as \"no such element\"."
|
|
1749
|
+
},
|
|
1750
|
+
"message": {
|
|
1751
|
+
"type": "string"
|
|
1752
|
+
},
|
|
1753
|
+
"stacktrace": {
|
|
1754
|
+
"type": "string"
|
|
1755
|
+
}
|
|
1756
|
+
}
|
|
1757
|
+
}
|
|
1758
|
+
}
|
|
1759
|
+
},
|
|
1760
|
+
"BrowserList": {
|
|
1761
|
+
"type": "array",
|
|
1762
|
+
"items": {
|
|
1763
|
+
"type": "object",
|
|
1764
|
+
"properties": {
|
|
1765
|
+
"browser": {
|
|
1766
|
+
"type": "string",
|
|
1767
|
+
"description": "Lower case, as create_session takes it."
|
|
1768
|
+
},
|
|
1769
|
+
"browser_version": {
|
|
1770
|
+
"type": "string",
|
|
1771
|
+
"description": "Null for a mobile browser, which ships with the OS."
|
|
1772
|
+
},
|
|
1773
|
+
"os": {
|
|
1774
|
+
"type": "string"
|
|
1775
|
+
},
|
|
1776
|
+
"os_version": {
|
|
1777
|
+
"type": "string"
|
|
1778
|
+
},
|
|
1779
|
+
"device": {
|
|
1780
|
+
"type": "string",
|
|
1781
|
+
"description": "Null for a desktop combination."
|
|
1782
|
+
},
|
|
1783
|
+
"real_mobile": {
|
|
1784
|
+
"type": "boolean",
|
|
1785
|
+
"description": "True for a real phone or tablet."
|
|
1786
|
+
}
|
|
1787
|
+
}
|
|
1788
|
+
}
|
|
1789
|
+
},
|
|
1790
|
+
"Plan": {
|
|
1791
|
+
"type": "object",
|
|
1792
|
+
"properties": {
|
|
1793
|
+
"automate_plan": {
|
|
1794
|
+
"type": "string"
|
|
1795
|
+
},
|
|
1796
|
+
"parallel_sessions_running": {
|
|
1797
|
+
"type": "integer",
|
|
1798
|
+
"description": "Account-wide, including other people's sessions."
|
|
1799
|
+
},
|
|
1800
|
+
"parallel_sessions_max_allowed": {
|
|
1801
|
+
"type": "integer"
|
|
1802
|
+
},
|
|
1803
|
+
"team_parallel_sessions_max_allowed": {
|
|
1804
|
+
"type": "integer"
|
|
1805
|
+
},
|
|
1806
|
+
"queued_sessions": {
|
|
1807
|
+
"type": "integer"
|
|
1808
|
+
},
|
|
1809
|
+
"queued_sessions_max_allowed": {
|
|
1810
|
+
"type": "integer"
|
|
1811
|
+
},
|
|
1812
|
+
"terminal_access": {
|
|
1813
|
+
"type": "string"
|
|
1814
|
+
}
|
|
1815
|
+
}
|
|
1816
|
+
},
|
|
1817
|
+
"SessionStatusUpdate": {
|
|
1818
|
+
"type": "object",
|
|
1819
|
+
"description": "The session record after the change.",
|
|
1820
|
+
"properties": {
|
|
1821
|
+
"automation_session": {
|
|
1822
|
+
"type": "object",
|
|
1823
|
+
"properties": {
|
|
1824
|
+
"hashed_id": {
|
|
1825
|
+
"type": "string",
|
|
1826
|
+
"description": "The session id."
|
|
1827
|
+
},
|
|
1828
|
+
"name": {
|
|
1829
|
+
"type": "string"
|
|
1830
|
+
},
|
|
1831
|
+
"status": {
|
|
1832
|
+
"type": "string",
|
|
1833
|
+
"description": "passed, failed, or absent when never set."
|
|
1834
|
+
},
|
|
1835
|
+
"reason": {
|
|
1836
|
+
"type": "string"
|
|
1837
|
+
},
|
|
1838
|
+
"browser": {
|
|
1839
|
+
"type": "string"
|
|
1840
|
+
},
|
|
1841
|
+
"browser_version": {
|
|
1842
|
+
"type": "string"
|
|
1843
|
+
},
|
|
1844
|
+
"os": {
|
|
1845
|
+
"type": "string"
|
|
1846
|
+
},
|
|
1847
|
+
"os_version": {
|
|
1848
|
+
"type": "string"
|
|
1849
|
+
},
|
|
1850
|
+
"device": {
|
|
1851
|
+
"type": "string",
|
|
1852
|
+
"description": "Set for a mobile browser, null for a desktop one."
|
|
1853
|
+
},
|
|
1854
|
+
"build_name": {
|
|
1855
|
+
"type": "string"
|
|
1856
|
+
},
|
|
1857
|
+
"project_name": {
|
|
1858
|
+
"type": "string"
|
|
1859
|
+
}
|
|
1860
|
+
}
|
|
1861
|
+
}
|
|
1862
|
+
}
|
|
1863
|
+
},
|
|
1864
|
+
"SessionDetails": {
|
|
1865
|
+
"type": "object",
|
|
1866
|
+
"description": "The session record, wrapped in automation_session.",
|
|
1867
|
+
"properties": {
|
|
1868
|
+
"automation_session": {
|
|
1869
|
+
"type": "object",
|
|
1870
|
+
"properties": {
|
|
1871
|
+
"hashed_id": {
|
|
1872
|
+
"type": "string",
|
|
1873
|
+
"description": "The session id."
|
|
1874
|
+
},
|
|
1875
|
+
"name": {
|
|
1876
|
+
"type": "string"
|
|
1877
|
+
},
|
|
1878
|
+
"status": {
|
|
1879
|
+
"type": "string",
|
|
1880
|
+
"description": "passed, failed, or absent when never set."
|
|
1881
|
+
},
|
|
1882
|
+
"reason": {
|
|
1883
|
+
"type": "string"
|
|
1884
|
+
},
|
|
1885
|
+
"browser": {
|
|
1886
|
+
"type": "string"
|
|
1887
|
+
},
|
|
1888
|
+
"browser_version": {
|
|
1889
|
+
"type": "string"
|
|
1890
|
+
},
|
|
1891
|
+
"os": {
|
|
1892
|
+
"type": "string"
|
|
1893
|
+
},
|
|
1894
|
+
"os_version": {
|
|
1895
|
+
"type": "string"
|
|
1896
|
+
},
|
|
1897
|
+
"device": {
|
|
1898
|
+
"type": "string",
|
|
1899
|
+
"description": "Set for a mobile browser, null for a desktop one."
|
|
1900
|
+
},
|
|
1901
|
+
"build_name": {
|
|
1902
|
+
"type": "string"
|
|
1903
|
+
},
|
|
1904
|
+
"project_name": {
|
|
1905
|
+
"type": "string"
|
|
1906
|
+
},
|
|
1907
|
+
"duration": {
|
|
1908
|
+
"type": "integer",
|
|
1909
|
+
"description": "Seconds; null while the session is still running."
|
|
1910
|
+
},
|
|
1911
|
+
"created_at": {
|
|
1912
|
+
"type": "string"
|
|
1913
|
+
},
|
|
1914
|
+
"public_url": {
|
|
1915
|
+
"type": "string",
|
|
1916
|
+
"description": "Shareable link needing no login; carries an auth token, so treat it as a secret."
|
|
1917
|
+
},
|
|
1918
|
+
"browser_url": {
|
|
1919
|
+
"type": "string",
|
|
1920
|
+
"description": "The session on the dashboard; needs a login."
|
|
1921
|
+
},
|
|
1922
|
+
"video_url": {
|
|
1923
|
+
"type": "string",
|
|
1924
|
+
"description": "Complete only once the session has ended."
|
|
1925
|
+
},
|
|
1926
|
+
"har_logs_url": {
|
|
1927
|
+
"type": "string",
|
|
1928
|
+
"description": "Present only when the session was started with network logs."
|
|
1929
|
+
},
|
|
1930
|
+
"browser_console_logs_url": {
|
|
1931
|
+
"type": "string",
|
|
1932
|
+
"description": "Present only when console logs were asked for."
|
|
1933
|
+
},
|
|
1934
|
+
"browser_profiling_url": {
|
|
1935
|
+
"type": "string"
|
|
1936
|
+
},
|
|
1937
|
+
"browserstack_status": {
|
|
1938
|
+
"type": "string",
|
|
1939
|
+
"description": "What BrowserStack observed, which can differ from the status that was set."
|
|
1940
|
+
}
|
|
1941
|
+
}
|
|
1942
|
+
}
|
|
1943
|
+
}
|
|
1944
|
+
}
|
|
1945
|
+
},
|
|
1946
|
+
"responses": {
|
|
1947
|
+
"WebDriverError": {
|
|
1948
|
+
"description": "A WebDriver failure, naming the error code and the browser's own message.",
|
|
1949
|
+
"schema": {
|
|
1950
|
+
"$schema": "WebDriverErrorBody"
|
|
1951
|
+
}
|
|
1952
|
+
},
|
|
1953
|
+
"Unauthorized": {
|
|
1954
|
+
"description": "The credentials were rejected.",
|
|
1955
|
+
"schema": {
|
|
1956
|
+
"$schema": "WebDriverErrorBody"
|
|
1957
|
+
}
|
|
1958
|
+
}
|
|
1959
|
+
},
|
|
1960
|
+
"paging": {},
|
|
1961
|
+
"entities": {
|
|
1962
|
+
"browser_session": {
|
|
1963
|
+
"title": "Browser Session",
|
|
1964
|
+
"description": "A live browser on one operating system, driven page by page until it ends.",
|
|
1965
|
+
"aliases": [
|
|
1966
|
+
"browser session",
|
|
1967
|
+
"automate session",
|
|
1968
|
+
"web session",
|
|
1969
|
+
"selenium session",
|
|
1970
|
+
"webdriver session",
|
|
1971
|
+
"browser",
|
|
1972
|
+
"session",
|
|
1973
|
+
"test session"
|
|
1974
|
+
],
|
|
1975
|
+
"id_convention": "session_id is a 40-character hex string returned by create_session at value.sessionId; it cannot be listed or guessed. element_id is an opaque string from find_element and is valid only until the page navigates or that part of the page re-renders.",
|
|
1976
|
+
"key_facts": [
|
|
1977
|
+
"A session holds a browser and consumes Automate minutes from start until it ends; it ends itself after the idle timeout with no command, or after 2 hours.",
|
|
1978
|
+
"Element ids go stale the moment the page navigates, reloads or re-renders, and a stale one is refused rather than silently acting on the wrong thing.",
|
|
1979
|
+
"Console and network logs must be asked for when the session starts; they cannot be turned on later.",
|
|
1980
|
+
"Each session is recorded with video and its record outlives it, including the shareable link and the passed or failed status.",
|
|
1981
|
+
"Everything inside an iframe is invisible until the session is switched into it, and invisible again until it is switched back out."
|
|
1982
|
+
],
|
|
1983
|
+
"capabilities": [
|
|
1984
|
+
"get_session",
|
|
1985
|
+
"set_session_status",
|
|
1986
|
+
"create_session",
|
|
1987
|
+
"navigate_to",
|
|
1988
|
+
"get_current_url",
|
|
1989
|
+
"get_title",
|
|
1990
|
+
"go_back",
|
|
1991
|
+
"go_forward",
|
|
1992
|
+
"refresh_page",
|
|
1993
|
+
"get_page_source",
|
|
1994
|
+
"find_element",
|
|
1995
|
+
"find_elements",
|
|
1996
|
+
"click_element",
|
|
1997
|
+
"send_keys",
|
|
1998
|
+
"clear_element",
|
|
1999
|
+
"get_element_text",
|
|
2000
|
+
"get_element_property",
|
|
2001
|
+
"get_element_attribute",
|
|
2002
|
+
"is_element_displayed",
|
|
2003
|
+
"execute_script",
|
|
2004
|
+
"take_screenshot",
|
|
2005
|
+
"get_window_rect",
|
|
2006
|
+
"set_window_rect",
|
|
2007
|
+
"maximize_window",
|
|
2008
|
+
"list_window_handles",
|
|
2009
|
+
"switch_to_window",
|
|
2010
|
+
"open_new_window",
|
|
2011
|
+
"switch_to_frame",
|
|
2012
|
+
"get_cookies",
|
|
2013
|
+
"delete_session"
|
|
2014
|
+
]
|
|
2015
|
+
},
|
|
2016
|
+
"browser": {
|
|
2017
|
+
"title": "Browser",
|
|
2018
|
+
"description": "One operating system, browser and version combination a session can run on.",
|
|
2019
|
+
"aliases": [
|
|
2020
|
+
"browser",
|
|
2021
|
+
"browser version",
|
|
2022
|
+
"os",
|
|
2023
|
+
"platform",
|
|
2024
|
+
"combination",
|
|
2025
|
+
"browser list",
|
|
2026
|
+
"capability",
|
|
2027
|
+
"desktop browser",
|
|
2028
|
+
"mobile browser"
|
|
2029
|
+
],
|
|
2030
|
+
"id_convention": "A combination is addressed by its browser name with either os and os_version, or device and os_version for a mobile browser; there is no id, and the strings must match the list exactly.",
|
|
2031
|
+
"key_facts": [
|
|
2032
|
+
"Several thousand combinations exist, so the list is large and has to be narrowed by the caller.",
|
|
2033
|
+
"A mobile browser is named after its platform rather than its product, so the name that works on a phone is not the one a person would say.",
|
|
2034
|
+
"A mobile browser is the one that ships with the device's OS, so it has no separate version to choose.",
|
|
2035
|
+
"The set changes as browser versions are released and retired, so a combination held from an earlier run can stop being offered."
|
|
2036
|
+
],
|
|
2037
|
+
"capabilities": [
|
|
2038
|
+
"list_browsers"
|
|
2039
|
+
]
|
|
2040
|
+
},
|
|
2041
|
+
"plan": {
|
|
2042
|
+
"title": "Plan",
|
|
2043
|
+
"description": "The account's Automate subscription and how much of its parallel-session allowance is in use.",
|
|
2044
|
+
"aliases": [
|
|
2045
|
+
"plan",
|
|
2046
|
+
"subscription",
|
|
2047
|
+
"parallel sessions",
|
|
2048
|
+
"parallels",
|
|
2049
|
+
"concurrency",
|
|
2050
|
+
"quota",
|
|
2051
|
+
"capacity",
|
|
2052
|
+
"limits",
|
|
2053
|
+
"usage"
|
|
2054
|
+
],
|
|
2055
|
+
"id_convention": "There is one plan per account; it is not addressed by an id.",
|
|
2056
|
+
"key_facts": [
|
|
2057
|
+
"Parallel-session counts are account-wide and include sessions started by other people and by CI.",
|
|
2058
|
+
"A team can have a lower ceiling than the account as a whole.",
|
|
2059
|
+
"Starting past the limit queues the session rather than refusing it, which looks like a slow start.",
|
|
2060
|
+
"Web and mobile-app sessions are counted against separate plans."
|
|
2061
|
+
],
|
|
2062
|
+
"capabilities": [
|
|
2063
|
+
"get_plan"
|
|
2064
|
+
]
|
|
2065
|
+
}
|
|
2066
|
+
}
|
|
2067
|
+
}
|
|
2068
|
+
}
|