@wdio/protocols 5.16.4 → 5.22.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/package.json +2 -2
- package/protocols/appium.json +88 -0
- package/protocols/saucelabs.json +2 -28
- package/protocols/webdriver.json +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wdio/protocols",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.22.1",
|
|
4
4
|
"description": "Utility package providing information about automation protocols",
|
|
5
5
|
"author": "Christian Bromann <christian@saucelabs.com>",
|
|
6
6
|
"homepage": "https://github.com/webdriverio/webdriverio/tree/master/packages/wdio-protocols",
|
|
@@ -27,5 +27,5 @@
|
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
29
29
|
},
|
|
30
|
-
"gitHead": "
|
|
30
|
+
"gitHead": "35907149e4faa3f84e3cb4803b54606ab31b11fa"
|
|
31
31
|
}
|
package/protocols/appium.json
CHANGED
|
@@ -704,6 +704,19 @@
|
|
|
704
704
|
}
|
|
705
705
|
}
|
|
706
706
|
},
|
|
707
|
+
"/session/:sessionId/appium/device/network_speed": {
|
|
708
|
+
"POST": {
|
|
709
|
+
"command": "toggleNetworkSpeed",
|
|
710
|
+
"description": "Set network speed (Emulator only)",
|
|
711
|
+
"ref": "http://appium.io/docs/en/commands/device/network/network-speed/",
|
|
712
|
+
"parameters": [],
|
|
713
|
+
"support": {
|
|
714
|
+
"android": {
|
|
715
|
+
"UiAutomator": "4.2+"
|
|
716
|
+
}
|
|
717
|
+
}
|
|
718
|
+
}
|
|
719
|
+
},
|
|
707
720
|
"/session/:sessionId/appium/device/open_notifications": {
|
|
708
721
|
"POST": {
|
|
709
722
|
"command": "openNotifications",
|
|
@@ -1308,6 +1321,45 @@
|
|
|
1308
1321
|
"description": "The type of action to perform (e.g. moveTo, release, press, tap, wait)",
|
|
1309
1322
|
"required": true
|
|
1310
1323
|
}],
|
|
1324
|
+
"examples": [
|
|
1325
|
+
[
|
|
1326
|
+
"// do a horizontal swipe by percentage",
|
|
1327
|
+
"const startPercentage = 10;",
|
|
1328
|
+
"const endPercentage = 90;",
|
|
1329
|
+
"const anchorPercentage = 50;",
|
|
1330
|
+
"",
|
|
1331
|
+
"const { width, height } = driver.getWindowSize();",
|
|
1332
|
+
"const anchor = height * anchorPercentage / 100;",
|
|
1333
|
+
"const startPoint = width * startPercentage / 100;",
|
|
1334
|
+
"const endPoint = width * endPercentage / 100;",
|
|
1335
|
+
"driver.touchPerform([",
|
|
1336
|
+
" {",
|
|
1337
|
+
" action: 'press',",
|
|
1338
|
+
" options: {",
|
|
1339
|
+
" x: startPoint,",
|
|
1340
|
+
" y: anchor,",
|
|
1341
|
+
" },",
|
|
1342
|
+
" },",
|
|
1343
|
+
" {",
|
|
1344
|
+
" action: 'wait',",
|
|
1345
|
+
" options: {",
|
|
1346
|
+
" ms: 100,",
|
|
1347
|
+
" },",
|
|
1348
|
+
" },",
|
|
1349
|
+
" {",
|
|
1350
|
+
" action: 'moveTo',",
|
|
1351
|
+
" options: {",
|
|
1352
|
+
" x: endPoint,",
|
|
1353
|
+
" y: anchor,",
|
|
1354
|
+
" },",
|
|
1355
|
+
" },",
|
|
1356
|
+
" {",
|
|
1357
|
+
" action: 'release',",
|
|
1358
|
+
" options: {},",
|
|
1359
|
+
" },",
|
|
1360
|
+
"]);"
|
|
1361
|
+
]
|
|
1362
|
+
],
|
|
1311
1363
|
"support": {
|
|
1312
1364
|
"android": {
|
|
1313
1365
|
"UiAutomator": "4.2+"
|
|
@@ -1374,5 +1426,41 @@
|
|
|
1374
1426
|
"description": "An object containing two fields: 'result', which is the return value of the script itself, and 'logs', which contains 3 inner fields, 'log', 'warn', and 'error', which hold an array of strings logged by console.log, console.warn, and console.error in the script's execution."
|
|
1375
1427
|
}
|
|
1376
1428
|
}
|
|
1429
|
+
},
|
|
1430
|
+
"/session/:sessionId/appium/events": {
|
|
1431
|
+
"POST": {
|
|
1432
|
+
"command": "getEvents",
|
|
1433
|
+
"description": "Get events stored in appium server.",
|
|
1434
|
+
"ref": "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/get-events.md",
|
|
1435
|
+
"parameters": [{
|
|
1436
|
+
"name": "type",
|
|
1437
|
+
"type": "string[]",
|
|
1438
|
+
"description": "Get events which are filtered with the type if the type is provided.",
|
|
1439
|
+
"required": true
|
|
1440
|
+
}],
|
|
1441
|
+
"returns": {
|
|
1442
|
+
"type": "object",
|
|
1443
|
+
"name": "result",
|
|
1444
|
+
"description": "A JSON hash of events like `{'commands' => [{'cmd' => 123455, ....}], 'startTime' => 1572954894127, }`."
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
},
|
|
1448
|
+
"/session/:sessionId/appium/log_event": {
|
|
1449
|
+
"POST": {
|
|
1450
|
+
"command": "logEvent",
|
|
1451
|
+
"description": "Store a custom event.",
|
|
1452
|
+
"ref": "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/log-event.md",
|
|
1453
|
+
"parameters": [{
|
|
1454
|
+
"name": "vendor",
|
|
1455
|
+
"type": "string",
|
|
1456
|
+
"description": "The name of vendor. It will be `vendor` in `vendor:event`.",
|
|
1457
|
+
"required": true
|
|
1458
|
+
}, {
|
|
1459
|
+
"name": "event",
|
|
1460
|
+
"type": "string",
|
|
1461
|
+
"description": "The name of event. It will be `event` in `vendor:event`.",
|
|
1462
|
+
"required": true
|
|
1463
|
+
}]
|
|
1464
|
+
}
|
|
1377
1465
|
}
|
|
1378
1466
|
}
|
package/protocols/saucelabs.json
CHANGED
|
@@ -5,32 +5,6 @@
|
|
|
5
5
|
"description": "Get webpage specific log information based on the last page load.",
|
|
6
6
|
"ref": "https://wiki.saucelabs.com/display/DOCS/Custom+Sauce+Labs+WebDriver+Extensions+for+Network+and+Log+Commands#CustomSauceLabsWebDriverExtensionsforNetworkandLogCommands-ExtendedDebuggingTools",
|
|
7
7
|
"examples": [
|
|
8
|
-
[
|
|
9
|
-
"// Get Application Metrics Logs",
|
|
10
|
-
"console.log(browser.getPageLogs('sauce:metrics'));",
|
|
11
|
-
"/**",
|
|
12
|
-
" * outputs:",
|
|
13
|
-
" * {",
|
|
14
|
-
" * \"firstMeaningfulPaint\": 35036.03356,",
|
|
15
|
-
" * \"domContentLoaded\": 35036.122972,",
|
|
16
|
-
" * \"navigationStart\": 35035.833805,",
|
|
17
|
-
" * ...",
|
|
18
|
-
" * }",
|
|
19
|
-
" */"
|
|
20
|
-
],
|
|
21
|
-
[
|
|
22
|
-
"// Get Network Timing Logs",
|
|
23
|
-
"console.log(browser.getPageLogs('sauce:timing'));",
|
|
24
|
-
"/**",
|
|
25
|
-
" * outputs:",
|
|
26
|
-
" * {",
|
|
27
|
-
" * \"loadEventStart\": 622,",
|
|
28
|
-
" * \"loadEventEnd\": 622,",
|
|
29
|
-
" * \"domInteractive\": 359,",
|
|
30
|
-
" * ...",
|
|
31
|
-
" * }",
|
|
32
|
-
" */"
|
|
33
|
-
],
|
|
34
8
|
[
|
|
35
9
|
"// Get Network Logs",
|
|
36
10
|
"console.log(browser.getPageLogs('sauce:network'));",
|
|
@@ -55,7 +29,7 @@
|
|
|
55
29
|
" */"
|
|
56
30
|
],
|
|
57
31
|
[
|
|
58
|
-
"// Get Performance Logs (
|
|
32
|
+
"// Get Performance Logs (needs capturePerformance capability see: https://wiki.saucelabs.com/display/DOCS/Measure+Page+Load+Performance+Using+Test+Automation#MeasurePageLoadPerformanceUsingTestAutomation-EnableYourScript)",
|
|
59
33
|
"console.log(browser.getPageLogs('sauce:performance'));",
|
|
60
34
|
"/**",
|
|
61
35
|
" * outputs:",
|
|
@@ -71,7 +45,7 @@
|
|
|
71
45
|
"parameters": [{
|
|
72
46
|
"name": "type",
|
|
73
47
|
"type": "string",
|
|
74
|
-
"description": "log type (e.g.
|
|
48
|
+
"description": "log type (e.g. sauce:network', 'sauce:performance')",
|
|
75
49
|
"required": true
|
|
76
50
|
}],
|
|
77
51
|
"returns": {
|
package/protocols/webdriver.json
CHANGED
|
@@ -206,8 +206,8 @@
|
|
|
206
206
|
"ref": "https://w3c.github.io/webdriver/#dfn-switch-to-frame",
|
|
207
207
|
"parameters": [{
|
|
208
208
|
"name": "id",
|
|
209
|
-
"type": "(number|
|
|
210
|
-
"description": "one of three possible types: null: this represents the top-level browsing context (i.e., not an iframe), a Number, representing the index of the window object corresponding to a frame,
|
|
209
|
+
"type": "(number|object|null)",
|
|
210
|
+
"description": "one of three possible types: null: this represents the top-level browsing context (i.e., not an iframe), a Number, representing the index of the window object corresponding to a frame, an Element object received using `findElement`.",
|
|
211
211
|
"required": true
|
|
212
212
|
}]
|
|
213
213
|
}
|