@wdio/protocols 9.13.0 → 9.15.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js CHANGED
@@ -1628,7 +1628,7 @@ var protocol = {
1628
1628
  "returns": {
1629
1629
  "type": "Object",
1630
1630
  "name": "local.SessionNewResult",
1631
- "description": "Command return value with the following interface:\n ```ts\n {\n sessionId: string;\n capabilities: {\n acceptInsecureCerts: boolean;\n browserName: string;\n browserVersion: string;\n platformName: string;\n setWindowRect: boolean;\n userAgent: string;\n proxy?: SessionProxyConfiguration;\n webSocketUrl?: string;\n };\n }\n ```"
1631
+ "description": "Command return value with the following interface:\n ```ts\n {\n sessionId: string;\n capabilities: {\n acceptInsecureCerts: boolean;\n browserName: string;\n browserVersion: string;\n platformName: string;\n setWindowRect: boolean;\n userAgent: string;\n proxy?: SessionProxyConfiguration;\n unhandledPromptBehavior?: SessionUserPromptHandler;\n webSocketUrl?: string;\n };\n }\n ```"
1632
1632
  }
1633
1633
  }
1634
1634
  },
@@ -1656,10 +1656,15 @@ var protocol = {
1656
1656
  {
1657
1657
  "name": "params",
1658
1658
  "type": "`remote.SessionSubscriptionRequest`",
1659
- "description": "<pre>\\{<br /> events: string[];<br /> contexts?: BrowsingContextBrowsingContext[];<br />\\}</pre>",
1659
+ "description": "<pre>\\{<br /> events: string[];<br /> contexts?: BrowsingContextBrowsingContext[];<br /> userContexts?: BrowserUserContext[];<br />\\}</pre>",
1660
1660
  "required": true
1661
1661
  }
1662
- ]
1662
+ ],
1663
+ "returns": {
1664
+ "type": "Object",
1665
+ "name": "local.SessionSubscribeResult",
1666
+ "description": "Command return value with the following interface:\n ```ts\n {\n subscription: SessionSubscription;\n }\n ```"
1667
+ }
1663
1668
  }
1664
1669
  },
1665
1670
  "session.unsubscribe": {
@@ -1670,8 +1675,8 @@ var protocol = {
1670
1675
  "parameters": [
1671
1676
  {
1672
1677
  "name": "params",
1673
- "type": "`remote.SessionSubscriptionRequest`",
1674
- "description": "<pre>\\{<br /> events: string[];<br /> contexts?: BrowsingContextBrowsingContext[];<br />\\}</pre>",
1678
+ "type": "`remote.SessionUnsubscribeParameters`",
1679
+ "description": "<pre>\\\\}</pre>",
1675
1680
  "required": true
1676
1681
  }
1677
1682
  ]
@@ -1700,8 +1705,8 @@ var protocol = {
1700
1705
  "parameters": [
1701
1706
  {
1702
1707
  "name": "params",
1703
- "type": "`remote.EmptyParams`",
1704
- "description": "<pre>\\{\\}</pre>",
1708
+ "type": "`remote.BrowserCreateUserContextParameters`",
1709
+ "description": "<pre>\\{<br /> acceptInsecureCerts?: boolean;<br />\\}</pre>",
1705
1710
  "required": true
1706
1711
  }
1707
1712
  ],
@@ -1712,6 +1717,26 @@ var protocol = {
1712
1717
  }
1713
1718
  }
1714
1719
  },
1720
+ "browser.getClientWindows": {
1721
+ "socket": {
1722
+ "command": "browserGetClientWindows",
1723
+ "description": 'WebDriver Bidi command to send command method "browser.getClientWindows" with parameters.',
1724
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-browser-getClientWindows",
1725
+ "parameters": [
1726
+ {
1727
+ "name": "params",
1728
+ "type": "`remote.EmptyParams`",
1729
+ "description": "<pre>\\{\\}</pre>",
1730
+ "required": true
1731
+ }
1732
+ ],
1733
+ "returns": {
1734
+ "type": "Object",
1735
+ "name": "local.BrowserGetClientWindowsResult",
1736
+ "description": "Command return value with the following interface:\n ```ts\n {\n clientWindows: BrowserClientWindowInfo[];\n }\n ```"
1737
+ }
1738
+ }
1739
+ },
1715
1740
  "browser.getUserContexts": {
1716
1741
  "socket": {
1717
1742
  "command": "browserGetUserContexts",
@@ -1747,6 +1772,21 @@ var protocol = {
1747
1772
  ]
1748
1773
  }
1749
1774
  },
1775
+ "browser.setClientWindowState": {
1776
+ "socket": {
1777
+ "command": "browserSetClientWindowState",
1778
+ "description": 'WebDriver Bidi command to send command method "browser.setClientWindowState" with parameters.',
1779
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-browser-setClientWindowState",
1780
+ "parameters": [
1781
+ {
1782
+ "name": "params",
1783
+ "type": "`remote.BrowserSetClientWindowStateParameters`",
1784
+ "description": "<pre>\\{<br /> clientWindow: BrowserClientWindow;<br />\\}</pre>",
1785
+ "required": true
1786
+ }
1787
+ ]
1788
+ }
1789
+ },
1750
1790
  "browsingContext.activate": {
1751
1791
  "socket": {
1752
1792
  "command": "browsingContextActivate",
@@ -1936,7 +1976,7 @@ var protocol = {
1936
1976
  {
1937
1977
  "name": "params",
1938
1978
  "type": "`remote.BrowsingContextSetViewportParameters`",
1939
- "description": "<pre>\\{<br /> context: BrowsingContextBrowsingContext;<br /> viewport?: BrowsingContextViewport &#124; null;<br /> devicePixelRatio?: number &#124; null;<br />\\}</pre>",
1979
+ "description": "<pre>\\{<br /> context?: BrowsingContextBrowsingContext;<br /> viewport?: BrowsingContextViewport &#124; null;<br /> devicePixelRatio?: number &#124; null;<br /> userContexts?: BrowserUserContext[];<br />\\}</pre>",
1940
1980
  "required": true
1941
1981
  }
1942
1982
  ]
@@ -1957,6 +1997,21 @@ var protocol = {
1957
1997
  ]
1958
1998
  }
1959
1999
  },
2000
+ "emulation.setGeolocationOverride": {
2001
+ "socket": {
2002
+ "command": "emulationSetGeolocationOverride",
2003
+ "description": 'WebDriver Bidi command to send command method "emulation.setGeolocationOverride" with parameters.',
2004
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-emulation-setGeolocationOverride",
2005
+ "parameters": [
2006
+ {
2007
+ "name": "params",
2008
+ "type": "`remote.EmulationSetGeolocationOverrideParameters`",
2009
+ "description": "<pre>\\\\}</pre>",
2010
+ "required": true
2011
+ }
2012
+ ]
2013
+ }
2014
+ },
1960
2015
  "network.addIntercept": {
1961
2016
  "socket": {
1962
2017
  "command": "networkAddIntercept",
@@ -2067,6 +2122,21 @@ var protocol = {
2067
2122
  ]
2068
2123
  }
2069
2124
  },
2125
+ "network.setCacheBehavior": {
2126
+ "socket": {
2127
+ "command": "networkSetCacheBehavior",
2128
+ "description": 'WebDriver Bidi command to send command method "network.setCacheBehavior" with parameters.',
2129
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-network-setCacheBehavior",
2130
+ "parameters": [
2131
+ {
2132
+ "name": "params",
2133
+ "type": "`remote.NetworkSetCacheBehaviorParameters`",
2134
+ "description": '<pre>\\{<br /> cacheBehavior: "default" &#124; "bypass";<br /> contexts?: BrowsingContextBrowsingContext[];<br />\\}</pre>',
2135
+ "required": true
2136
+ }
2137
+ ]
2138
+ }
2139
+ },
2070
2140
  "script.addPreloadScript": {
2071
2141
  "socket": {
2072
2142
  "command": "scriptAddPreloadScript",
@@ -2076,7 +2146,7 @@ var protocol = {
2076
2146
  {
2077
2147
  "name": "params",
2078
2148
  "type": "`remote.ScriptAddPreloadScriptParameters`",
2079
- "description": "<pre>\\{<br /> functionDeclaration: string;<br /> arguments?: ScriptChannelValue[];<br /> contexts?: BrowsingContextBrowsingContext[];<br /> sandbox?: string;<br />\\}</pre>",
2149
+ "description": "<pre>\\{<br /> functionDeclaration: string;<br /> arguments?: ScriptChannelValue[];<br /> contexts?: BrowsingContextBrowsingContext[];<br /> userContexts?: BrowserUserContext[];<br /> sandbox?: string;<br />\\}</pre>",
2080
2150
  "required": true
2081
2151
  }
2082
2152
  ],
@@ -2276,6 +2346,41 @@ var protocol = {
2276
2346
  }
2277
2347
  ]
2278
2348
  }
2349
+ },
2350
+ "webExtension.install": {
2351
+ "socket": {
2352
+ "command": "webExtensionInstall",
2353
+ "description": 'WebDriver Bidi command to send command method "webExtension.install" with parameters.',
2354
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-webExtension-install",
2355
+ "parameters": [
2356
+ {
2357
+ "name": "params",
2358
+ "type": "`remote.WebExtensionInstallParameters`",
2359
+ "description": "<pre>\\{<br /> extensionData: WebExtensionExtensionData;<br />\\}</pre>",
2360
+ "required": true
2361
+ }
2362
+ ],
2363
+ "returns": {
2364
+ "type": "Object",
2365
+ "name": "local.WebExtensionInstallResult",
2366
+ "description": "Command return value with the following interface:\n ```ts\n {\n extension: WebExtensionExtension;\n }\n ```"
2367
+ }
2368
+ }
2369
+ },
2370
+ "webExtension.uninstall": {
2371
+ "socket": {
2372
+ "command": "webExtensionUninstall",
2373
+ "description": 'WebDriver Bidi command to send command method "webExtension.uninstall" with parameters.',
2374
+ "ref": "https://w3c.github.io/webdriver-bidi/#command-webExtension-uninstall",
2375
+ "parameters": [
2376
+ {
2377
+ "name": "params",
2378
+ "type": "`remote.WebExtensionUninstallParameters`",
2379
+ "description": "<pre>\\{<br /> extension: WebExtensionExtension;<br />\\}</pre>",
2380
+ "required": true
2381
+ }
2382
+ ]
2383
+ }
2279
2384
  }
2280
2385
  };
2281
2386
  var webdriverBidi_default = protocol;
@@ -2373,607 +2478,683 @@ var mjsonwp_default = {
2373
2478
  }
2374
2479
  };
2375
2480
 
2376
- // src/protocols/appium.ts
2377
- var appium_default = {
2378
- "/session/:sessionId/context": {
2481
+ // src/protocols/chromium.ts
2482
+ var chromium_default = {
2483
+ "/session/:sessionId/alert": {
2379
2484
  GET: {
2380
- command: "getAppiumContext",
2381
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
2485
+ command: "isAlertOpen",
2486
+ description: "Whether a simple dialog is currently open.",
2487
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/alert_commands.cc#L42-L49",
2488
+ examples: [
2489
+ [
2490
+ "console.log(browser.isAlertOpen()); // outputs: false",
2491
+ "browser.execute('window.alert()');",
2492
+ "console.log(browser.isAlertOpen()); // outputs: true"
2493
+ ]
2494
+ ],
2382
2495
  parameters: [],
2383
2496
  returns: {
2384
- type: "Context",
2385
- name: "context",
2386
- description: "a string representing the current context or null representing 'no context'"
2497
+ type: "Boolean",
2498
+ name: "isAlertOpen",
2499
+ description: "`true` or `false` based on whether simple dialog is present or not."
2500
+ }
2501
+ }
2502
+ },
2503
+ "/session/:sessionId/autoreport": {
2504
+ GET: {
2505
+ command: "isAutoReporting",
2506
+ description: "Whether it should automatically raises errors on browser logs.",
2507
+ ref: "https://codereview.chromium.org/101203012",
2508
+ parameters: [],
2509
+ returns: {
2510
+ type: "Boolean",
2511
+ name: "isAutoReporting",
2512
+ description: "`true` or `false` based on whether auto reporting is enabled."
2387
2513
  }
2388
2514
  },
2389
2515
  POST: {
2390
- command: "switchAppiumContext",
2391
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
2516
+ command: "setAutoReporting",
2517
+ description: "Toggle whether to return response with unknown error with first browser error (e.g. failed to load resource due to 403/404 response) for all subsequent commands (once enabled).",
2518
+ ref: "https://codereview.chromium.org/101203012",
2519
+ examples: [
2520
+ [
2521
+ "// Enable auto reporting first thing after session was initiated with empty browser logs",
2522
+ "console.log(browser.setAutoReporting(true)); // outputs: null",
2523
+ "// Upon requesting an non-existing resource it will abort execution due to thrown unknown error",
2524
+ "browser.url('https://webdriver.io/img/404-does-not-exist.png');"
2525
+ ],
2526
+ [
2527
+ "// During the session do some operations which populate the browser logs",
2528
+ "browser.url('https://webdriver.io/img/404-does-not-exist.png');",
2529
+ "browser.url('https://webdriver.io/403/no-access');",
2530
+ "// Enable auto reporting which throws an unknown error for first browser log (404 response)",
2531
+ "browser.setAutoReporting(true);"
2532
+ ]
2533
+ ],
2392
2534
  parameters: [
2393
2535
  {
2394
- name: "name",
2395
- type: "string",
2396
- description: "a string representing an available context",
2536
+ name: "enabled",
2537
+ type: "boolean",
2538
+ description: "`true` if auto reporting should be enabled, use `false` to disable previously enabled auto reporting.",
2397
2539
  required: true
2398
2540
  }
2399
- ]
2541
+ ],
2542
+ returns: {
2543
+ type: "Object|Null",
2544
+ name: "firstBrowserError",
2545
+ description: "In case first browser error already occured prior to executing this command it will throw unknown error as response, which is an object with 'message' key describing first browser error. Otherwise it returns `null` on success."
2546
+ }
2400
2547
  }
2401
2548
  },
2402
- "/session/:sessionId/contexts": {
2549
+ "/session/:sessionId/is_loading": {
2403
2550
  GET: {
2404
- command: "getAppiumContexts",
2405
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
2551
+ command: "isLoading",
2552
+ description: "Determines load status for active window handle.",
2553
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L783-L802",
2554
+ examples: [
2555
+ [
2556
+ "console.log(browser.isLoading()); // outputs: false",
2557
+ "browser.newWindow('https://webdriver.io');",
2558
+ "console.log(browser.isLoading()); // outputs: true"
2559
+ ]
2560
+ ],
2406
2561
  parameters: [],
2407
2562
  returns: {
2408
- type: "Context[]",
2409
- name: "contexts",
2410
- description: "an array of strings representing available contexts, e.g. 'WEBVIEW', or 'NATIVE'"
2563
+ type: "Boolean",
2564
+ name: "isLoading",
2565
+ description: "`true` or `false` based on whether active window handle is loading or not."
2411
2566
  }
2412
2567
  }
2413
2568
  },
2414
- "/session/:sessionId/appium/device/shake": {
2415
- POST: {
2416
- command: "shake",
2417
- description: "Perform a shake action on the device.",
2418
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/shake/",
2569
+ "/session/:sessionId/chromium/heap_snapshot": {
2570
+ GET: {
2571
+ command: "takeHeapSnapshot",
2572
+ description: "Takes a heap snapshot of the current execution context.",
2573
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/chrome/web_view.h#L198-L202",
2419
2574
  parameters: [],
2420
- support: {
2421
- ios: {
2422
- XCUITest: "9.3+",
2423
- UIAutomation: "8.0 to 9.3"
2424
- }
2575
+ returns: {
2576
+ type: "Object",
2577
+ name: "heapSnapshot",
2578
+ description: "A JSON representation of the heap snapshot. Which can be inspected by loading as file into Chrome DevTools."
2425
2579
  }
2426
2580
  }
2427
2581
  },
2428
- "/session/:sessionId/appium/device/lock": {
2582
+ "/session/:sessionId/network_connection": {
2583
+ GET: {
2584
+ command: "getNetworkConnection",
2585
+ description: "Get the connection type for network emulation. This command is only applicable when remote end replies with `networkConnectionEnabled` capability set to `true`.",
2586
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes",
2587
+ examples: [
2588
+ [
2589
+ "const browser = remote({",
2590
+ " capabilities: {",
2591
+ " browserName: 'chrome',",
2592
+ " 'goog:chromeOptions': {",
2593
+ " // Network emulation requires device mode, which is only enabled when mobile emulation is on",
2594
+ " mobileEmulation: { deviceName: 'iPad' },",
2595
+ " },",
2596
+ " }",
2597
+ "});",
2598
+ "console.log(browser.getNetworkConnection()); // outputs: 6 (Both Wi-Fi and data)"
2599
+ ]
2600
+ ],
2601
+ parameters: [],
2602
+ returns: {
2603
+ type: "Number",
2604
+ name: "connectionType",
2605
+ description: "A bitmask to represent the network connection type. Airplane Mode (`1`), Wi-Fi only (`2`), Wi-Fi and data (`6`), 4G (`8`), 3G (`10`), 2G (`20`). By default [Wi-Fi and data are enabled](https://github.com/bayandin/chromedriver/blob/v2.45/chrome/chrome_desktop_impl.cc#L36-L37)."
2606
+ }
2607
+ },
2429
2608
  POST: {
2430
- command: "lock",
2431
- description: "Lock the device.",
2432
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/lock/",
2609
+ command: "setNetworkConnection",
2610
+ description: "Change connection type for network connection. This command is only applicable when remote end replies with `networkConnectionEnabled` capability set to `true`.",
2611
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes",
2612
+ examples: [
2613
+ [
2614
+ "const browser = remote({",
2615
+ " capabilities: {",
2616
+ " browserName: 'chrome',",
2617
+ " 'goog:chromeOptions': {",
2618
+ " // Network emulation requires device mode, which is only enabled when mobile emulation is on",
2619
+ " mobileEmulation: { deviceName: 'iPad' },",
2620
+ " },",
2621
+ " }",
2622
+ "});",
2623
+ "console.log(browser.setNetworkConnection({ type: 1 })); // outputs: 1 (Airplane Mode)"
2624
+ ]
2625
+ ],
2433
2626
  parameters: [
2434
2627
  {
2435
- name: "seconds",
2436
- type: "number",
2437
- description: "how long to lock the screen (iOS only)",
2438
- required: false
2628
+ name: "parameters",
2629
+ type: "object",
2630
+ description: "Object containing ConnectionType, set bitmask as value for `type` key in object. Airplane Mode (`1`), Wi-Fi only (`2`), Wi-Fi and data (`6`), 4G (`8`), 3G (`10`), 2G (`20`).",
2631
+ required: true
2439
2632
  }
2440
2633
  ],
2441
- support: {
2442
- ios: {
2443
- UIAutomation: "8.0 to 9.3"
2444
- },
2445
- android: {
2446
- UiAutomator: "4.2+"
2447
- },
2448
- windows: {
2449
- Windows: "10+"
2450
- }
2634
+ returns: {
2635
+ type: "Number",
2636
+ name: "connectionType",
2637
+ description: "A bitmask to represent the network connection type. Value should match specified `type` in object, however device might not be capable of the network connection type requested."
2451
2638
  }
2452
2639
  }
2453
2640
  },
2454
- "/session/:sessionId/appium/device/unlock": {
2455
- POST: {
2456
- command: "unlock",
2457
- description: "Unlock the device.",
2458
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/unlock/",
2459
- parameters: [],
2460
- support: {
2461
- android: {
2462
- UiAutomator: "4.2+"
2463
- },
2464
- windows: {
2465
- Windows: "10+"
2466
- }
2467
- }
2468
- }
2469
- },
2470
- "/session/:sessionId/appium/device/is_locked": {
2471
- POST: {
2472
- command: "isLocked",
2473
- description: "Check whether the device is locked or not.",
2474
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/is-locked/",
2641
+ "/session/:sessionId/chromium/network_conditions": {
2642
+ GET: {
2643
+ command: "getNetworkConditions",
2644
+ description: "Get current network conditions used for emulation.",
2645
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L839-L859",
2475
2646
  parameters: [],
2476
2647
  returns: {
2477
- type: "boolean",
2478
- name: "isLocked",
2479
- description: "True if the device is locked, false if not"
2480
- },
2481
- support: {
2482
- android: {
2483
- UiAutomator: "4.2+"
2484
- },
2485
- windows: {
2486
- Windows: "10+"
2487
- }
2648
+ type: "Object",
2649
+ name: "networkConditions",
2650
+ description: "Object containing network conditions for `offline`, `latency`, `download_throughput` and `upload_throughput`. Network conditions must be set before it can be retrieved."
2488
2651
  }
2489
- }
2490
- },
2491
- "/session/:sessionId/appium/start_recording_screen": {
2652
+ },
2492
2653
  POST: {
2493
- command: "startRecordingScreen",
2494
- description: "Start recording the screen.",
2495
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/recording-screen/start-recording-screen/",
2654
+ command: "setNetworkConditions",
2655
+ description: "Set network conditions used for emulation by throttling connection.",
2656
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1663-L1722",
2657
+ examples: [
2658
+ [
2659
+ "// Use different download (25kb/s) and upload (50kb/s) throughput values for throttling with a latency of 1000ms",
2660
+ "browser.setNetworkConditions({ latency: 1000, download_throughput: 25600, upload_throughput: 51200 });"
2661
+ ],
2662
+ [
2663
+ "// Force disconnected from network by setting 'offline' to true",
2664
+ "browser.setNetworkConditions({ latency: 0, throughput: 0, offline: true });"
2665
+ ],
2666
+ [
2667
+ "// When preset name (e.g. 'DSL') is specified it does not respect values in object (e.g. 'offline')",
2668
+ "browser.setNetworkConditions({ latency: 0, throughput: 0, offline: true }, 'DSL');"
2669
+ ],
2670
+ [
2671
+ "// Best practice for specifying network throttling preset is to use an empty object",
2672
+ "browser.setNetworkConditions({}, 'Good 3G');"
2673
+ ]
2674
+ ],
2496
2675
  parameters: [
2497
2676
  {
2498
- name: "options",
2677
+ name: "network_conditions",
2499
2678
  type: "object",
2500
- description: "command parameters that can contain keys like: remotePath, username, password, method, forceRestart, timeLimit, videoType, videoQuality, videoFps, bitRate, videoSize, bugReport (see more description in Appium docs)",
2501
- required: false
2502
- }
2503
- ],
2504
- support: {
2505
- ios: {
2506
- XCUITest: "9.3+"
2507
- },
2508
- android: {
2509
- UiAutomator: "4.2+"
2679
+ description: "Object containing network conditions which are `latency`, `throughput` (or `download_throughput`/`upload_throughput`) and `offline` (optional).",
2680
+ required: true
2510
2681
  },
2511
- windows: {
2512
- Windows: "10+"
2682
+ {
2683
+ name: "network_name",
2684
+ type: "string",
2685
+ description: "Name of [network throttling preset](https://github.com/bayandin/chromedriver/blob/v2.45/chrome/network_list.cc#L12-L25). `GPRS`, `Regular 2G`, `Good 2G`, `Regular 3G`, `Good 3G`, `Regular 4G`, `DSL`, `WiFi` or `No throttling` to disable. When preset is specified values passed in first argument are not respected.",
2686
+ required: false
2513
2687
  }
2514
- }
2688
+ ]
2689
+ },
2690
+ DELETE: {
2691
+ command: "deleteNetworkConditions",
2692
+ description: "Disable any network throttling which might have been set. Equivalent of setting the `No throttling` preset.",
2693
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1724-L1745",
2694
+ parameters: []
2515
2695
  }
2516
2696
  },
2517
- "/session/:sessionId/appium/stop_recording_screen": {
2697
+ "/session/:sessionId/chromium/send_command": {
2518
2698
  POST: {
2519
- command: "stopRecordingScreen",
2520
- description: "Stop recording screen",
2521
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/recording-screen/stop-recording-screen/",
2699
+ command: "sendCommand",
2700
+ description: "Send a command to the DevTools debugger.<br />For a list of available commands and their parameters refer to the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).",
2701
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1290-L1304",
2522
2702
  parameters: [
2523
2703
  {
2524
- name: "remotePath",
2704
+ name: "cmd",
2525
2705
  type: "string",
2526
- description: "The path to the remote location, where the resulting video should be uploaded. The following protocols are supported http/https, ftp. This option only has an effect if there is screen recording process in progreess and forceRestart parameter is not set to true. Null or empty string value (the default setting) means the content of resulting file should be encoded as Base64.",
2527
- required: false
2706
+ description: "Name of the command (e.g. [`Browser.close`](https://chromedevtools.github.io/devtools-protocol/1-3/Browser#method-close)).",
2707
+ required: true
2528
2708
  },
2529
2709
  {
2530
- name: "username",
2531
- type: "string",
2532
- description: "The name of the user for the remote authentication.",
2533
- required: false
2534
- },
2710
+ name: "params",
2711
+ type: "object",
2712
+ description: "Parameters to the command. In case no parameters for command, specify an empty object.",
2713
+ required: true
2714
+ }
2715
+ ]
2716
+ }
2717
+ },
2718
+ "/session/:sessionId/chromium/send_command_and_get_result": {
2719
+ POST: {
2720
+ command: "sendCommandAndGetResult",
2721
+ description: "Send a command to the DevTools debugger and wait for the result.<br />For a list of available commands and their parameters refer to the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).",
2722
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1306-L1320",
2723
+ parameters: [
2535
2724
  {
2536
- name: "password",
2725
+ name: "cmd",
2537
2726
  type: "string",
2538
- description: "The password for the remote authentication.",
2539
- required: false
2727
+ description: "Name of the command which returns a result (e.g. [`Network.getAllCookies`](https://chromedevtools.github.io/devtools-protocol/1-3/Network#method-getAllCookies)).",
2728
+ required: true
2540
2729
  },
2541
2730
  {
2542
- name: "method",
2543
- type: "string",
2544
- description: "The http multipart upload method name. The 'PUT' one is used by default.",
2545
- required: false
2731
+ name: "params",
2732
+ type: "object",
2733
+ description: "Parameters to the command. In case no parameters for command, specify an empty object.",
2734
+ required: true
2546
2735
  }
2547
2736
  ],
2548
2737
  returns: {
2549
- type: "string",
2550
- name: "response",
2551
- description: "Base64 encoded string. If remote_path is set, the response is empty string"
2552
- },
2553
- support: {
2554
- ios: {
2555
- XCUITest: "9.3+"
2556
- },
2557
- android: {
2558
- UiAutomator: "4.2+"
2559
- },
2560
- windows: {
2561
- Windows: "10+"
2562
- }
2738
+ type: "*",
2739
+ name: "result",
2740
+ description: "Either the return value of your command, or the error which was the reason for your command's failure."
2563
2741
  }
2564
2742
  }
2565
2743
  },
2566
- "/session/:sessionId/appium/performanceData/types": {
2744
+ "/session/:sessionId/file": {
2567
2745
  POST: {
2568
- command: "getPerformanceDataTypes",
2569
- description: "Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery.",
2570
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/performance-data/performance-data-types/",
2571
- parameters: [],
2572
- returns: {
2573
- type: "string[]",
2574
- name: "performanceTypes",
2575
- description: "The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo)"
2576
- },
2577
- support: {
2578
- android: {
2579
- UiAutomator: "4.2+"
2746
+ command: "file",
2747
+ description: "Upload a file to remote machine on which the browser is running.",
2748
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L1037-L1065",
2749
+ parameters: [
2750
+ {
2751
+ name: "file",
2752
+ type: "string",
2753
+ 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.",
2754
+ required: true
2580
2755
  }
2756
+ ],
2757
+ returns: {
2758
+ type: "String",
2759
+ name: "path",
2760
+ description: "Absolute path of uploaded file on remote machine."
2581
2761
  }
2582
2762
  }
2583
2763
  },
2584
- "/session/:sessionId/appium/getPerformanceData": {
2764
+ "/session/:sessionId/chromium/launch_app": {
2585
2765
  POST: {
2586
- command: "getPerformanceData",
2587
- description: "Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery.",
2588
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/performance-data/get-performance-data/",
2766
+ command: "launchChromeApp",
2767
+ description: "Launches a Chrome app by specified id.",
2768
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L521-L539",
2769
+ examples: [
2770
+ [
2771
+ "import fs from 'fs'",
2772
+ "const browser = remote({",
2773
+ " capabilities: {",
2774
+ " browserName: 'chrome',",
2775
+ " 'goog:chromeOptions': {",
2776
+ " // Install upon starting browser in order to launch it",
2777
+ " extensions: [",
2778
+ " // Entry should be a base64-encoded packed Chrome app (.crx)",
2779
+ " fs.readFileSync('/absolute/path/app.crx').toString('base64')",
2780
+ " ]",
2781
+ " }",
2782
+ " }",
2783
+ "});",
2784
+ "browser.launchChromeApp('aohghmighlieiainnegkcijnfilokake')); // Google Docs (https://chrome.google.com/webstore/detail/docs/aohghmighlieiainnegkcijnfilokake)"
2785
+ ]
2786
+ ],
2589
2787
  parameters: [
2590
2788
  {
2591
- name: "packageName",
2592
- type: "string",
2593
- description: "the package name of the application",
2594
- required: true
2595
- },
2596
- {
2597
- name: "dataType",
2789
+ name: "id",
2598
2790
  type: "string",
2599
- description: "the type of system state which wants to read. It should be one of the supported performance data types",
2791
+ description: "Extension id of app to be launched, as defined in chrome://extensions.",
2600
2792
  required: true
2601
- },
2793
+ }
2794
+ ]
2795
+ }
2796
+ },
2797
+ "/session/:sessionId/element/:elementId/value": {
2798
+ GET: {
2799
+ command: "getElementValue",
2800
+ description: "Retrieves the value of a given form control element.",
2801
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/element_commands.cc#L431-L443",
2802
+ variables: [
2602
2803
  {
2603
- name: "dataReadTimeout",
2604
- type: "number",
2605
- description: "the number of attempts to read",
2606
- required: false
2804
+ name: "elementId",
2805
+ description: "id of element to get value from"
2607
2806
  }
2608
2807
  ],
2808
+ parameters: [],
2609
2809
  returns: {
2610
- type: "string[]",
2611
- name: "performanceData",
2612
- description: "The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery"
2613
- },
2614
- support: {
2615
- android: {
2616
- UiAutomator: "4.2+"
2617
- }
2810
+ type: "String|Null",
2811
+ name: "value",
2812
+ description: "Current value of the element. In case specified element is not a form control element, it will return `null`."
2618
2813
  }
2619
2814
  }
2620
2815
  },
2621
- "/session/:sessionId/appium/device/press_keycode": {
2816
+ "/session/:sessionId/element/:elementId/hover": {
2622
2817
  POST: {
2623
- command: "pressKeyCode",
2624
- description: "Press a particular key on the device.",
2625
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/press-keycode/",
2818
+ command: "elementHover",
2819
+ description: "Enable hover state for an element, which is reset upon next interaction.",
2820
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/element_commands.cc#L126-L146",
2821
+ variables: [
2822
+ {
2823
+ name: "elementId",
2824
+ description: "id of element to hover over to"
2825
+ }
2826
+ ],
2827
+ parameters: []
2828
+ }
2829
+ },
2830
+ "/session/:sessionId/touch/pinch": {
2831
+ POST: {
2832
+ command: "touchPinch",
2833
+ description: "Trigger a pinch zoom effect.",
2834
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L813-L827",
2626
2835
  parameters: [
2627
2836
  {
2628
- name: "keycode",
2837
+ name: "x",
2629
2838
  type: "number",
2630
- description: "keycode to press",
2839
+ description: "x position to pinch on",
2631
2840
  required: true
2632
2841
  },
2633
2842
  {
2634
- name: "metastate",
2843
+ name: "y",
2635
2844
  type: "number",
2636
- description: "meta state to press the keycode with",
2637
- required: false
2845
+ description: "y position to pinch on",
2846
+ required: true
2638
2847
  },
2639
2848
  {
2640
- name: "flags",
2849
+ name: "scale",
2641
2850
  type: "number",
2642
- description: "flags for the keypress",
2643
- required: false
2644
- }
2645
- ],
2646
- support: {
2647
- android: {
2648
- UiAutomator: "4.2+"
2851
+ description: "pinch zoom scale",
2852
+ required: true
2649
2853
  }
2854
+ ]
2855
+ }
2856
+ },
2857
+ "/session/:sessionId/goog/page/freeze": {
2858
+ POST: {
2859
+ command: "freeze",
2860
+ description: "Freeze the current page. Extension for [Page Lifecycle API](https://developers.google.com/web/updates/2018/07/page-lifecycle-api).",
2861
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L625-L633",
2862
+ parameters: []
2863
+ }
2864
+ },
2865
+ "/session/:sessionId/goog/page/resume": {
2866
+ POST: {
2867
+ command: "resume",
2868
+ description: "Resume the current page. Extension for [Page Lifecycle API](https://developers.google.com/web/updates/2018/07/page-lifecycle-api).",
2869
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L635-L645",
2870
+ parameters: []
2871
+ }
2872
+ },
2873
+ "/session/:sessionId/goog/cast/get_sinks": {
2874
+ GET: {
2875
+ command: "getCastSinks",
2876
+ description: "Returns the list of cast sinks (Cast devices) available to the Chrome media router.",
2877
+ ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#748",
2878
+ parameters: [],
2879
+ returns: {
2880
+ type: "string[]",
2881
+ name: "sinks",
2882
+ description: "List of available sinks."
2650
2883
  }
2651
2884
  }
2652
2885
  },
2653
- "/session/:sessionId/appium/device/long_press_keycode": {
2886
+ "/session/:sessionId/goog/cast/set_sink_to_use": {
2654
2887
  POST: {
2655
- command: "longPressKeyCode",
2656
- description: "Press and hold a particular key code on the device.",
2657
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/long-press-keycode/",
2888
+ command: "selectCastSink",
2889
+ description: "Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).",
2890
+ ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#737",
2658
2891
  parameters: [
2659
2892
  {
2660
- name: "keycode",
2661
- type: "number",
2662
- description: "keycode to press on the device",
2893
+ name: "sinkName",
2894
+ type: "string",
2895
+ description: "The name of the target device.",
2663
2896
  required: true
2664
- },
2665
- {
2666
- name: "metastate",
2667
- type: "number",
2668
- description: "metastate for the keypress",
2669
- required: false
2670
- },
2671
- {
2672
- name: "flags",
2673
- type: "number",
2674
- description: "flags for the keypress",
2675
- required: false
2676
2897
  }
2677
- ],
2678
- support: {
2679
- android: {
2680
- UiAutomator: "4.2+"
2898
+ ]
2899
+ }
2900
+ },
2901
+ "/session/:sessionId/goog/cast/start_tab_mirroring": {
2902
+ POST: {
2903
+ command: "startCastTabMirroring",
2904
+ description: "Initiates tab mirroring for the current browser tab on the specified device.",
2905
+ ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#741",
2906
+ parameters: [
2907
+ {
2908
+ name: "sinkName",
2909
+ type: "string",
2910
+ description: "The name of the target device.",
2911
+ required: true
2681
2912
  }
2913
+ ]
2914
+ }
2915
+ },
2916
+ "/session/:sessionId/goog/cast/get_issue_message": {
2917
+ GET: {
2918
+ command: "getCastIssueMessage",
2919
+ description: "Returns error message if there is any issue in a Cast session.",
2920
+ ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#751",
2921
+ parameters: [],
2922
+ returns: {
2923
+ type: "String",
2924
+ name: "message",
2925
+ description: "Error message, if any."
2682
2926
  }
2683
2927
  }
2684
2928
  },
2685
- "/session/:sessionId/appium/device/keyevent": {
2929
+ "/session/:sessionId/goog/cast/stop_casting": {
2686
2930
  POST: {
2687
- command: "sendKeyEvent",
2688
- description: "Send a key code to the device.",
2689
- ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
2931
+ command: "stopCasting",
2932
+ description: "Stops casting from media router to the specified device, if connected.",
2933
+ ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#744",
2690
2934
  parameters: [
2691
2935
  {
2692
- name: "keycode",
2936
+ name: "sinkName",
2693
2937
  type: "string",
2694
- description: "keycode to press",
2938
+ description: "The name of the target device.",
2695
2939
  required: true
2696
- },
2697
- {
2698
- name: "metastate",
2699
- type: "string",
2700
- description: "meta state to press the keycode with",
2701
- required: false
2702
2940
  }
2703
- ],
2704
- support: {
2705
- android: {
2706
- UiAutomator: "4.2+"
2707
- }
2708
- }
2941
+ ]
2709
2942
  }
2710
2943
  },
2711
- "/session/:sessionId/rotation": {
2944
+ "/shutdown": {
2712
2945
  POST: {
2713
- command: "rotateDevice",
2714
- description: "Rotate the device in three dimensions.",
2715
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation",
2716
- parameters: [
2717
- {
2718
- name: "x",
2719
- type: "number",
2720
- description: "x offset to use for the center of the rotate gesture",
2721
- required: true,
2722
- default: 0
2723
- },
2724
- {
2725
- name: "y",
2726
- type: "number",
2727
- description: "y offset to use for the center of the rotate gesture",
2728
- required: true,
2729
- default: 0
2730
- },
2946
+ command: "shutdown",
2947
+ description: "Shutdown ChromeDriver process and consequently terminating all active sessions.",
2948
+ ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L489-L498",
2949
+ parameters: []
2950
+ }
2951
+ },
2952
+ "/session/:sessionId/element/:elementId/screenshot": {
2953
+ GET: {
2954
+ command: "takeElementScreenshot",
2955
+ description: "The Take Element Screenshot command takes a screenshot of the visible region encompassed by the bounding rectangle of an element.",
2956
+ ref: "https://w3c.github.io/webdriver/#dfn-take-element-screenshot",
2957
+ variables: [
2731
2958
  {
2732
- name: "z",
2733
- type: "number",
2734
- description: "z offset to use for the center of the rotate gesture",
2735
- required: true,
2736
- default: 0
2959
+ name: "elementId",
2960
+ description: "the id of an element returned in a previous call to Find Element(s)"
2737
2961
  }
2738
2962
  ],
2739
- support: {
2740
- ios: {
2741
- UIAutomation: "8.0 to 9.3"
2742
- },
2743
- android: {
2744
- UiAutomator: "4.2+"
2963
+ parameters: [
2964
+ {
2965
+ name: "scroll",
2966
+ type: "boolean",
2967
+ description: "scroll into view the element. Default: true",
2968
+ required: false
2745
2969
  }
2746
- }
2747
- }
2748
- },
2749
- "/session/:sessionId/appium/device/current_activity": {
2750
- GET: {
2751
- command: "getCurrentActivity",
2752
- description: "Get the name of the current Android activity.",
2753
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/current-activity/",
2754
- parameters: [],
2970
+ ],
2755
2971
  returns: {
2756
- type: "string",
2757
- name: "activity",
2758
- description: "Name of the current activity"
2759
- },
2760
- support: {
2761
- android: {
2762
- UiAutomator: "4.2+"
2763
- }
2972
+ type: "String",
2973
+ name: "screenshot",
2974
+ description: "The base64-encoded PNG image data comprising the screenshot of the visible region of an element\u2019s bounding rectangle after it has been scrolled into view."
2764
2975
  }
2765
2976
  }
2766
2977
  },
2767
- "/session/:sessionId/appium/device/current_package": {
2978
+ "/session/:sessionId/se/log/types": {
2768
2979
  GET: {
2769
- command: "getCurrentPackage",
2770
- description: "Get the name of the current Android package.",
2771
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/current-package/",
2980
+ command: "getLogTypes",
2981
+ description: "Get available log types.",
2982
+ ref: "https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes",
2772
2983
  parameters: [],
2773
2984
  returns: {
2774
- type: "string",
2775
- name: "package",
2776
- description: "Name of the current package"
2777
- },
2778
- support: {
2779
- android: {
2780
- UiAutomator: "4.2+"
2781
- }
2985
+ type: "String[]",
2986
+ name: "logTypes",
2987
+ description: "The list of available log types, example: browser, driver."
2782
2988
  }
2783
2989
  }
2784
2990
  },
2785
- "/session/:sessionId/appium/device/install_app": {
2991
+ "/session/:sessionId/se/log": {
2786
2992
  POST: {
2787
- command: "installApp",
2788
- description: "Install the given app onto the device.",
2789
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/install-app/",
2993
+ command: "getLogs",
2994
+ description: "Get the log for a given log type. Log buffer is reset after each request.",
2995
+ ref: "https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlog",
2790
2996
  parameters: [
2791
2997
  {
2792
- name: "appPath",
2998
+ name: "type",
2793
2999
  type: "string",
2794
- description: "path to application .apk file",
3000
+ description: "the log type",
2795
3001
  required: true
2796
3002
  }
2797
3003
  ],
2798
- support: {
2799
- ios: {
2800
- XCUITest: "9.3+",
2801
- UIAutomation: "8.0 to 9.3"
2802
- },
2803
- android: {
2804
- UiAutomator: "4.2+"
2805
- }
3004
+ returns: {
3005
+ type: "Object[]",
3006
+ name: "logs",
3007
+ description: "The list of log entries."
3008
+ }
3009
+ }
3010
+ }
3011
+ };
3012
+
3013
+ // src/protocols/appium.ts
3014
+ var getLogTypes = "/session/:sessionId/se/log/types";
3015
+ var getLog = "/session/:sessionId/se/log";
3016
+ var chromiumLogCommands = {
3017
+ [getLogTypes]: chromium_default[getLogTypes],
3018
+ [getLog]: chromium_default[getLog]
3019
+ };
3020
+ var appium_default = {
3021
+ ...chromiumLogCommands,
3022
+ "/session/:sessionId": {
3023
+ GET: {
3024
+ command: "getSession",
3025
+ description: "Retrieve the capabilities of the current session.",
3026
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
3027
+ deprecated: "Use `getAppiumSessionCapabilities` instead",
3028
+ parameters: [],
3029
+ returns: {
3030
+ type: "Object",
3031
+ name: "capabilities",
3032
+ description: "An object describing the session's capabilities."
2806
3033
  }
2807
3034
  }
2808
3035
  },
2809
- "/session/:sessionId/appium/device/activate_app": {
3036
+ "/session/:sessionId/context": {
3037
+ GET: {
3038
+ command: "getAppiumContext",
3039
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
3040
+ parameters: [],
3041
+ returns: {
3042
+ type: "Context",
3043
+ name: "context",
3044
+ description: "a string representing the current context or null representing 'no context'"
3045
+ }
3046
+ },
2810
3047
  POST: {
2811
- command: "activateApp",
2812
- description: "Activate the given app onto the device",
2813
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/activate-app/",
3048
+ command: "switchAppiumContext",
3049
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
2814
3050
  parameters: [
2815
3051
  {
2816
- name: "appId",
3052
+ name: "name",
2817
3053
  type: "string",
2818
- description: "App ID (package ID for Android, bundle ID for iOS)",
3054
+ description: "a string representing an available context",
2819
3055
  required: true
2820
3056
  }
2821
- ],
2822
- support: {
2823
- ios: {
2824
- XCUITest: "9.3+"
2825
- },
2826
- android: {
2827
- UiAutomator: "4.2+"
2828
- }
3057
+ ]
3058
+ }
3059
+ },
3060
+ "/session/:sessionId/contexts": {
3061
+ GET: {
3062
+ command: "getAppiumContexts",
3063
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#webviews-and-other-contexts",
3064
+ parameters: [],
3065
+ returns: {
3066
+ type: "Context[]",
3067
+ name: "contexts",
3068
+ description: "an array of strings representing available contexts, e.g. 'WEBVIEW', or 'NATIVE'"
2829
3069
  }
2830
3070
  }
2831
3071
  },
2832
- "/session/:sessionId/appium/device/remove_app": {
2833
- POST: {
2834
- command: "removeApp",
2835
- description: "Remove an app from the device.",
2836
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/remove-app/",
2837
- parameters: [
2838
- {
2839
- name: "appId",
2840
- type: "string",
2841
- description: "App ID (package ID for Android, bundle ID for iOS)",
2842
- required: true
2843
- }
2844
- ],
2845
- support: {
2846
- ios: {
2847
- XCUITest: "9.3+",
2848
- UIAutomation: "8.0 to 9.3"
2849
- },
2850
- android: {
2851
- UiAutomator: "4.2+"
2852
- }
3072
+ "/session/:sessionId/appium/commands": {
3073
+ GET: {
3074
+ command: "getAppiumCommands",
3075
+ description: "Retrieve the endpoints and BiDi commands supported in the current session.",
3076
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js",
3077
+ parameters: [],
3078
+ returns: {
3079
+ type: "Object",
3080
+ name: "commands",
3081
+ description: "Supported endpoints and BiDi commands, each grouped into common, driver-specific, and plugin-specific endpoints/commands."
2853
3082
  }
2854
3083
  }
2855
3084
  },
2856
- "/session/:sessionId/appium/device/terminate_app": {
2857
- POST: {
2858
- command: "terminateApp",
2859
- description: "Terminate the given app on the device",
2860
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/terminate-app/",
2861
- parameters: [
2862
- {
2863
- name: "appId",
2864
- type: "string",
2865
- description: "App ID (package ID for Android, bundle ID for iOS)",
2866
- required: true
2867
- },
2868
- {
2869
- name: "options",
2870
- type: "object",
2871
- description: 'Command options. E.g. "timeout": (Only Android) Timeout to retry terminate the app (see more in Appium docs)'
2872
- }
2873
- ],
2874
- support: {
2875
- ios: {
2876
- XCUITest: "9.3+"
2877
- },
2878
- android: {
2879
- UiAutomator: "4.2+"
2880
- }
3085
+ "/session/:sessionId/appium/extensions": {
3086
+ GET: {
3087
+ command: "getAppiumExtensions",
3088
+ description: "Retrieve the extension commands supported in the current session.",
3089
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js",
3090
+ parameters: [],
3091
+ returns: {
3092
+ type: "Object",
3093
+ name: "commands",
3094
+ description: "Supported extension commands, grouped into driver-specific and plugin-specific commands."
3095
+ }
3096
+ }
3097
+ },
3098
+ "/session/:sessionId/appium/capabilities": {
3099
+ GET: {
3100
+ command: "getAppiumSessionCapabilities",
3101
+ description: "Retrieve the capabilities of the current session.",
3102
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/lib/protocol/routes.js",
3103
+ parameters: [],
3104
+ returns: {
3105
+ type: "Object",
3106
+ name: "capabilities",
3107
+ description: "An object describing the session's capabilities."
2881
3108
  }
2882
3109
  }
2883
3110
  },
2884
- "/session/:sessionId/appium/device/app_installed": {
3111
+ "/session/:sessionId/appium/device/shake": {
2885
3112
  POST: {
2886
- command: "isAppInstalled",
2887
- description: "Check whether the specified app is installed on the device.",
2888
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/is-app-installed/",
2889
- parameters: [
2890
- {
2891
- name: "appId",
2892
- type: "string",
2893
- description: "App ID (package ID for Android, bundle ID for iOS)",
2894
- required: true
2895
- }
2896
- ],
2897
- returns: {
2898
- type: "boolean",
2899
- name: "isAppInstalled",
2900
- description: "Return true if installed, false if not"
2901
- },
3113
+ command: "shake",
3114
+ description: "Perform a shake action on the device.",
3115
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/shake/",
3116
+ parameters: [],
2902
3117
  support: {
2903
3118
  ios: {
2904
3119
  XCUITest: "9.3+",
2905
3120
  UIAutomation: "8.0 to 9.3"
2906
- },
2907
- android: {
2908
- UiAutomator: "4.2+"
2909
3121
  }
2910
3122
  }
2911
3123
  }
2912
3124
  },
2913
- "/session/:sessionId/appium/device/app_state": {
3125
+ "/session/:sessionId/appium/device/lock": {
2914
3126
  POST: {
2915
- command: "queryAppState",
2916
- description: "Get the given app status on the device",
2917
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/app-state/",
3127
+ command: "lock",
3128
+ description: "Lock the device.",
3129
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/lock/",
2918
3130
  parameters: [
2919
3131
  {
2920
- name: "appId",
2921
- type: "string",
2922
- description: "App ID (package ID for Android, bundle ID for iOS)",
2923
- required: true
3132
+ name: "seconds",
3133
+ type: "number",
3134
+ description: "how long to lock the screen (iOS only)",
3135
+ required: false
2924
3136
  }
2925
3137
  ],
2926
- returns: {
2927
- type: "number",
2928
- name: "appStatus",
2929
- description: "0 is not installed. 1 is not running. 2 is running in background or suspended. 3 is running in background. 4 is running in foreground"
2930
- },
2931
3138
  support: {
2932
3139
  ios: {
2933
- XCUITest: "9.3+"
3140
+ UIAutomation: "8.0 to 9.3"
2934
3141
  },
2935
3142
  android: {
2936
3143
  UiAutomator: "4.2+"
3144
+ },
3145
+ windows: {
3146
+ Windows: "10+"
2937
3147
  }
2938
3148
  }
2939
3149
  }
2940
3150
  },
2941
- "/session/:sessionId/appium/device/hide_keyboard": {
3151
+ "/session/:sessionId/appium/device/unlock": {
2942
3152
  POST: {
2943
- command: "hideKeyboard",
2944
- description: "Hide soft keyboard.",
2945
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/hide-keyboard/",
2946
- parameters: [
2947
- {
2948
- name: "strategy",
2949
- type: "string",
2950
- description: "hide keyboard strategy (UIAutomation only), available strategies - 'press', 'pressKey', 'swipeDown', 'tapOut', 'tapOutside', 'default'",
2951
- required: false
2952
- },
2953
- {
2954
- name: "key",
2955
- type: "string",
2956
- description: "key value if strategy is 'pressKey'",
2957
- required: false
2958
- },
2959
- {
2960
- name: "keyCode",
2961
- type: "string",
2962
- description: "key code if strategy is 'pressKey'",
2963
- required: false
2964
- },
2965
- {
2966
- name: "keyName",
2967
- type: "string",
2968
- description: "key name if strategy is 'pressKey'",
2969
- required: false
2970
- }
2971
- ],
3153
+ command: "unlock",
3154
+ description: "Unlock the device.",
3155
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/unlock/",
3156
+ parameters: [],
2972
3157
  support: {
2973
- ios: {
2974
- XCUITest: "9.3+",
2975
- UIAutomation: "8.0 to 9.3"
2976
- },
2977
3158
  android: {
2978
3159
  UiAutomator: "4.2+"
2979
3160
  },
@@ -2983,22 +3164,18 @@ var appium_default = {
2983
3164
  }
2984
3165
  }
2985
3166
  },
2986
- "/session/:sessionId/appium/device/is_keyboard_shown": {
2987
- GET: {
2988
- command: "isKeyboardShown",
2989
- description: "Whether or not the soft keyboard is shown.",
2990
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/is-keyboard-shown/",
3167
+ "/session/:sessionId/appium/device/is_locked": {
3168
+ POST: {
3169
+ command: "isLocked",
3170
+ description: "Check whether the device is locked or not.",
3171
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/interactions/is-locked/",
2991
3172
  parameters: [],
2992
3173
  returns: {
2993
3174
  type: "boolean",
2994
- name: "isKeyboardShown",
2995
- description: "True if the keyboard is shown"
3175
+ name: "isLocked",
3176
+ description: "True if the device is locked, false if not"
2996
3177
  },
2997
3178
  support: {
2998
- ios: {
2999
- XCUITest: "9.3+",
3000
- UIAutomation: "8.0 to 9.3"
3001
- },
3002
3179
  android: {
3003
3180
  UiAutomator: "4.2+"
3004
3181
  },
@@ -3008,29 +3185,22 @@ var appium_default = {
3008
3185
  }
3009
3186
  }
3010
3187
  },
3011
- "/session/:sessionId/appium/device/push_file": {
3188
+ "/session/:sessionId/appium/start_recording_screen": {
3012
3189
  POST: {
3013
- command: "pushFile",
3014
- description: "Place a file onto the device in a particular place.",
3015
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/push-file/",
3190
+ command: "startRecordingScreen",
3191
+ description: "Start recording the screen.",
3192
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/recording-screen/start-recording-screen/",
3016
3193
  parameters: [
3017
3194
  {
3018
- name: "path",
3019
- type: "string",
3020
- description: "path to install the data to",
3021
- required: true
3022
- },
3023
- {
3024
- name: "data",
3025
- type: "string",
3026
- description: "contents of file in base64",
3027
- required: true
3195
+ name: "options",
3196
+ type: "object",
3197
+ description: "command parameters that can contain keys like: remotePath, username, password, method, forceRestart, timeLimit, videoType, videoQuality, videoFps, bitRate, videoSize, bugReport (see more description in Appium docs)",
3198
+ required: false
3028
3199
  }
3029
3200
  ],
3030
3201
  support: {
3031
3202
  ios: {
3032
- XCUITest: "9.3+",
3033
- UIAutomation: "8.0 to 9.3"
3203
+ XCUITest: "9.3+"
3034
3204
  },
3035
3205
  android: {
3036
3206
  UiAutomator: "4.2+"
@@ -3041,55 +3211,45 @@ var appium_default = {
3041
3211
  }
3042
3212
  }
3043
3213
  },
3044
- "/session/:sessionId/appium/device/pull_file": {
3214
+ "/session/:sessionId/appium/stop_recording_screen": {
3045
3215
  POST: {
3046
- command: "pullFile",
3047
- description: "Retrieve a file from the device's file system.",
3048
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/pull-file/",
3216
+ command: "stopRecordingScreen",
3217
+ description: "Stop recording screen",
3218
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/recording-screen/stop-recording-screen/",
3049
3219
  parameters: [
3050
3220
  {
3051
- name: "path",
3221
+ name: "remotePath",
3052
3222
  type: "string",
3053
- description: "path on the device to pull file from",
3054
- required: true
3055
- }
3056
- ],
3057
- support: {
3058
- ios: {
3059
- XCUITest: "9.3+",
3060
- UIAutomation: "8.0 to 9.3"
3223
+ description: "The path to the remote location, where the resulting video should be uploaded. The following protocols are supported http/https, ftp. This option only has an effect if there is screen recording process in progreess and forceRestart parameter is not set to true. Null or empty string value (the default setting) means the content of resulting file should be encoded as Base64.",
3224
+ required: false
3061
3225
  },
3062
- android: {
3063
- UiAutomator: "4.2+"
3226
+ {
3227
+ name: "username",
3228
+ type: "string",
3229
+ description: "The name of the user for the remote authentication.",
3230
+ required: false
3064
3231
  },
3065
- windows: {
3066
- Windows: "10+"
3067
- }
3068
- },
3069
- returns: {
3070
- type: "string",
3071
- name: "response",
3072
- description: "Contents of file in base64"
3073
- }
3074
- }
3075
- },
3076
- "/session/:sessionId/appium/device/pull_folder": {
3077
- POST: {
3078
- command: "pullFolder",
3079
- description: "Retrieve a folder from the device's file system.",
3080
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/pull-folder/",
3081
- parameters: [
3082
3232
  {
3083
- name: "path",
3233
+ name: "password",
3084
3234
  type: "string",
3085
- description: "path to an entire folder on the device",
3086
- required: true
3235
+ description: "The password for the remote authentication.",
3236
+ required: false
3237
+ },
3238
+ {
3239
+ name: "method",
3240
+ type: "string",
3241
+ description: "The http multipart upload method name. The 'PUT' one is used by default.",
3242
+ required: false
3087
3243
  }
3088
3244
  ],
3245
+ returns: {
3246
+ type: "string",
3247
+ name: "response",
3248
+ description: "Base64 encoded string. If remote_path is set, the response is empty string"
3249
+ },
3089
3250
  support: {
3090
3251
  ios: {
3091
- XCUITest: "9.3+",
3092
- UIAutomation: "8.0 to 9.3"
3252
+ XCUITest: "9.3+"
3093
3253
  },
3094
3254
  android: {
3095
3255
  UiAutomator: "4.2+"
@@ -3100,51 +3260,17 @@ var appium_default = {
3100
3260
  }
3101
3261
  }
3102
3262
  },
3103
- "/session/:sessionId/appium/device/toggle_airplane_mode": {
3104
- POST: {
3105
- command: "toggleAirplaneMode",
3106
- description: "Toggle airplane mode on device.",
3107
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-airplane-mode/",
3108
- parameters: [],
3109
- support: {
3110
- android: {
3111
- UiAutomator: "4.2+"
3112
- }
3113
- }
3114
- }
3115
- },
3116
- "/session/:sessionId/appium/device/toggle_data": {
3117
- POST: {
3118
- command: "toggleData",
3119
- description: "Switch the state of data service.",
3120
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-data/",
3121
- parameters: [],
3122
- support: {
3123
- android: {
3124
- UiAutomator: "4.2+"
3125
- }
3126
- }
3127
- }
3128
- },
3129
- "/session/:sessionId/appium/device/toggle_wifi": {
3130
- POST: {
3131
- command: "toggleWiFi",
3132
- description: "Switch the state of the wifi service.",
3133
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-wifi/",
3134
- parameters: [],
3135
- support: {
3136
- android: {
3137
- UiAutomator: "4.2+"
3138
- }
3139
- }
3140
- }
3141
- },
3142
- "/session/:sessionId/appium/device/toggle_location_services": {
3263
+ "/session/:sessionId/appium/performanceData/types": {
3143
3264
  POST: {
3144
- command: "toggleLocationServices",
3145
- description: "Switch the state of the location service.",
3146
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-location-services/",
3265
+ command: "getPerformanceDataTypes",
3266
+ description: "Returns the information types of the system state which is supported to read as like cpu, memory, network traffic, and battery.",
3267
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/performance-data/performance-data-types/",
3147
3268
  parameters: [],
3269
+ returns: {
3270
+ type: "string[]",
3271
+ name: "performanceTypes",
3272
+ description: "The available performance data types (cpuinfo|batteryinfo|networkinfo|memoryinfo)"
3273
+ },
3148
3274
  support: {
3149
3275
  android: {
3150
3276
  UiAutomator: "4.2+"
@@ -3152,19 +3278,36 @@ var appium_default = {
3152
3278
  }
3153
3279
  }
3154
3280
  },
3155
- "/session/:sessionId/appium/device/network_speed": {
3281
+ "/session/:sessionId/appium/getPerformanceData": {
3156
3282
  POST: {
3157
- command: "toggleNetworkSpeed",
3158
- description: "Set network speed (Emulator only)",
3159
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/network-speed/",
3283
+ command: "getPerformanceData",
3284
+ description: "Returns the information of the system state which is supported to read as like cpu, memory, network traffic, and battery.",
3285
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/performance-data/get-performance-data/",
3160
3286
  parameters: [
3161
3287
  {
3162
- name: "netspeed",
3288
+ name: "packageName",
3163
3289
  type: "string",
3164
- description: "Network type - 'full','gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo'",
3290
+ description: "the package name of the application",
3291
+ required: true
3292
+ },
3293
+ {
3294
+ name: "dataType",
3295
+ type: "string",
3296
+ description: "the type of system state which wants to read. It should be one of the supported performance data types",
3165
3297
  required: true
3298
+ },
3299
+ {
3300
+ name: "dataReadTimeout",
3301
+ type: "number",
3302
+ description: "the number of attempts to read",
3303
+ required: false
3166
3304
  }
3167
3305
  ],
3306
+ returns: {
3307
+ type: "string[]",
3308
+ name: "performanceData",
3309
+ description: "The information type of the system state which is supported to read as like cpu, memory, network traffic, and battery"
3310
+ },
3168
3311
  support: {
3169
3312
  android: {
3170
3313
  UiAutomator: "4.2+"
@@ -3172,12 +3315,31 @@ var appium_default = {
3172
3315
  }
3173
3316
  }
3174
3317
  },
3175
- "/session/:sessionId/appium/device/open_notifications": {
3318
+ "/session/:sessionId/appium/device/press_keycode": {
3176
3319
  POST: {
3177
- command: "openNotifications",
3178
- description: "Open Android notifications (Emulator only).",
3179
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/open-notifications/",
3180
- parameters: [],
3320
+ command: "pressKeyCode",
3321
+ description: "Press a particular key on the device.",
3322
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/press-keycode/",
3323
+ parameters: [
3324
+ {
3325
+ name: "keycode",
3326
+ type: "number",
3327
+ description: "keycode to press",
3328
+ required: true
3329
+ },
3330
+ {
3331
+ name: "metastate",
3332
+ type: "number",
3333
+ description: "meta state to press the keycode with",
3334
+ required: false
3335
+ },
3336
+ {
3337
+ name: "flags",
3338
+ type: "number",
3339
+ description: "flags for the keypress",
3340
+ required: false
3341
+ }
3342
+ ],
3181
3343
  support: {
3182
3344
  android: {
3183
3345
  UiAutomator: "4.2+"
@@ -3185,67 +3347,54 @@ var appium_default = {
3185
3347
  }
3186
3348
  }
3187
3349
  },
3188
- "/session/:sessionId/appium/device/start_activity": {
3350
+ "/session/:sessionId/appium/device/long_press_keycode": {
3189
3351
  POST: {
3190
- command: "startActivity",
3191
- description: "Start an Android activity by providing package name and activity name.",
3192
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/start-activity/",
3352
+ command: "longPressKeyCode",
3353
+ description: "Press and hold a particular key code on the device.",
3354
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/long-press-keycode/",
3193
3355
  parameters: [
3194
3356
  {
3195
- name: "appPackage",
3196
- type: "string",
3197
- description: "name of app",
3198
- required: true
3199
- },
3200
- {
3201
- name: "appActivity",
3202
- type: "string",
3203
- description: "name of activity",
3357
+ name: "keycode",
3358
+ type: "number",
3359
+ description: "keycode to press on the device",
3204
3360
  required: true
3205
3361
  },
3206
3362
  {
3207
- name: "appWaitPackage",
3208
- type: "string",
3209
- description: "name of app to wait for",
3363
+ name: "metastate",
3364
+ type: "number",
3365
+ description: "metastate for the keypress",
3210
3366
  required: false
3211
3367
  },
3212
3368
  {
3213
- name: "appWaitActivity",
3214
- type: "string",
3215
- description: "name of activity to wait for",
3369
+ name: "flags",
3370
+ type: "number",
3371
+ description: "flags for the keypress",
3216
3372
  required: false
3217
- },
3218
- {
3219
- name: "intentAction",
3220
- type: "string",
3221
- description: "intent action which will be used to start activity",
3222
- required: false,
3223
- default: "android.intent.action.MAIN"
3224
- },
3225
- {
3226
- name: "intentCategory",
3227
- type: "string",
3228
- description: "intent category which will be used to start activity",
3229
- required: false,
3230
- default: "android.intent.category.LAUNCHER"
3231
- },
3232
- {
3233
- name: "intentFlags",
3234
- type: "string",
3235
- description: "flags that will be used to start activity",
3236
- required: false,
3237
- default: "0x10200000"
3238
- },
3373
+ }
3374
+ ],
3375
+ support: {
3376
+ android: {
3377
+ UiAutomator: "4.2+"
3378
+ }
3379
+ }
3380
+ }
3381
+ },
3382
+ "/session/:sessionId/appium/device/keyevent": {
3383
+ POST: {
3384
+ command: "sendKeyEvent",
3385
+ description: "Send a key code to the device.",
3386
+ ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
3387
+ parameters: [
3239
3388
  {
3240
- name: "optionalIntentArguments",
3389
+ name: "keycode",
3241
3390
  type: "string",
3242
- description: "additional intent arguments that will be used to start activity",
3243
- required: false
3391
+ description: "keycode to press",
3392
+ required: true
3244
3393
  },
3245
3394
  {
3246
- name: "dontStopAppOnReset",
3395
+ name: "metastate",
3247
3396
  type: "string",
3248
- description: "doesn\u2019t stop the process of the app under test, before starting the app using adb",
3397
+ description: "meta state to press the keycode with",
3249
3398
  required: false
3250
3399
  }
3251
3400
  ],
@@ -3256,55 +3405,72 @@ var appium_default = {
3256
3405
  }
3257
3406
  }
3258
3407
  },
3259
- "/session/:sessionId/appium/device/system_bars": {
3260
- GET: {
3261
- command: "getSystemBars",
3262
- description: "Retrieve visibility and bounds information of the status and navigation bars.",
3263
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/system-bars/",
3264
- parameters: [],
3265
- returns: {
3266
- type: "object[]",
3267
- name: "systemBars",
3268
- description: "Information about visibility and bounds of status and navigation bar"
3269
- },
3408
+ "/session/:sessionId/rotation": {
3409
+ POST: {
3410
+ command: "rotateDevice",
3411
+ description: "Rotate the device in three dimensions.",
3412
+ ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-rotation",
3413
+ parameters: [
3414
+ {
3415
+ name: "x",
3416
+ type: "number",
3417
+ description: "x offset to use for the center of the rotate gesture",
3418
+ required: true,
3419
+ default: 0
3420
+ },
3421
+ {
3422
+ name: "y",
3423
+ type: "number",
3424
+ description: "y offset to use for the center of the rotate gesture",
3425
+ required: true,
3426
+ default: 0
3427
+ },
3428
+ {
3429
+ name: "z",
3430
+ type: "number",
3431
+ description: "z offset to use for the center of the rotate gesture",
3432
+ required: true,
3433
+ default: 0
3434
+ }
3435
+ ],
3270
3436
  support: {
3437
+ ios: {
3438
+ UIAutomation: "8.0 to 9.3"
3439
+ },
3271
3440
  android: {
3272
3441
  UiAutomator: "4.2+"
3273
3442
  }
3274
3443
  }
3275
3444
  }
3276
3445
  },
3277
- "/session/:sessionId/appium/device/system_time": {
3446
+ "/session/:sessionId/appium/device/current_activity": {
3278
3447
  GET: {
3279
- command: "getDeviceTime",
3280
- description: "Get the time on the device.",
3281
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/system-time/",
3448
+ command: "getCurrentActivity",
3449
+ description: "Get the name of the current Android activity.",
3450
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/current-activity/",
3282
3451
  parameters: [],
3283
3452
  returns: {
3284
3453
  type: "string",
3285
- name: "time",
3286
- description: "Time on the device"
3454
+ name: "activity",
3455
+ description: "Name of the current activity"
3287
3456
  },
3288
3457
  support: {
3289
- ios: {
3290
- XCUITest: "9.3+",
3291
- UIAutomation: "8.0 to 9.3"
3292
- },
3293
3458
  android: {
3294
3459
  UiAutomator: "4.2+"
3295
3460
  }
3296
3461
  }
3297
3462
  }
3298
3463
  },
3299
- "/session/:sessionId/appium/device/display_density": {
3464
+ "/session/:sessionId/appium/device/current_package": {
3300
3465
  GET: {
3301
- command: "getDisplayDensity",
3302
- description: "Get display density from device.",
3303
- ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
3466
+ command: "getCurrentPackage",
3467
+ description: "Get the name of the current Android package.",
3468
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/current-package/",
3304
3469
  parameters: [],
3305
3470
  returns: {
3306
- type: "*",
3307
- name: "displayDensity"
3471
+ type: "string",
3472
+ name: "package",
3473
+ description: "Name of the current package"
3308
3474
  },
3309
3475
  support: {
3310
3476
  android: {
@@ -3313,54 +3479,19 @@ var appium_default = {
3313
3479
  }
3314
3480
  }
3315
3481
  },
3316
- "/session/:sessionId/appium/simulator/touch_id": {
3482
+ "/session/:sessionId/appium/device/install_app": {
3317
3483
  POST: {
3318
- command: "touchId",
3319
- description: "Simulate a [touch id](https://support.apple.com/en-ca/ht201371) event (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true and the Simulator must be [enrolled](https://support.apple.com/en-ca/ht201371). When you set allowTouchIdEnroll to true, it will set the Simulator to be enrolled by default. The enrollment state can be [toggled](https://appium.github.io/appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/index.html). This call will only work if Appium process or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.",
3320
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/simulator/touch-id/",
3484
+ command: "installApp",
3485
+ description: "Install the given app onto the device.",
3486
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/install-app/",
3321
3487
  parameters: [
3322
3488
  {
3323
- name: "match",
3324
- type: "boolean",
3325
- description: "are we simulating a successful touch (true) or a failed touch (false)",
3489
+ name: "appPath",
3490
+ type: "string",
3491
+ description: "path to application .apk file",
3326
3492
  required: true
3327
3493
  }
3328
3494
  ],
3329
- support: {
3330
- ios: {
3331
- XCUITest: "9.3+"
3332
- }
3333
- }
3334
- }
3335
- },
3336
- "/session/:sessionId/appium/simulator/toggle_touch_id_enrollment": {
3337
- POST: {
3338
- command: "toggleEnrollTouchId",
3339
- description: "Toggle the simulator being [enrolled](https://support.apple.com/en-ca/ht201371) to accept touchId (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true. When `allowTouchIdEnroll` is set to true the Simulator will be enrolled by default, and the 'Toggle Touch ID Enrollment' changes the enrollment state. This call will only work if the Appium process or its parent application (e.g., Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.",
3340
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/",
3341
- parameters: [
3342
- {
3343
- name: "enabled",
3344
- type: "boolean",
3345
- description: "equals to true if TouchID enrollment should be enabled",
3346
- required: false,
3347
- default: true
3348
- }
3349
- ],
3350
- support: {
3351
- ios: {
3352
- XCUITest: "9.3+"
3353
- }
3354
- }
3355
- }
3356
- },
3357
- "/session/:sessionId/appium/app/launch": {
3358
- POST: {
3359
- command: "launchApp",
3360
- description: "Launch an app on device.",
3361
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/launch-app/",
3362
- deprecated: "For iOS, utilize `driver.execute('mobile: launchApp', { ... })`, and for Android, make use of `driver.execute('mobile: activateApp', { ... })`.",
3363
- parameters: [],
3364
3495
  support: {
3365
3496
  ios: {
3366
3497
  XCUITest: "9.3+",
@@ -3372,17 +3503,22 @@ var appium_default = {
3372
3503
  }
3373
3504
  }
3374
3505
  },
3375
- "/session/:sessionId/appium/app/close": {
3506
+ "/session/:sessionId/appium/device/activate_app": {
3376
3507
  POST: {
3377
- command: "closeApp",
3378
- description: "Close an app on device.",
3379
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/close-app/",
3380
- deprecated: "Use `driver.execute('mobile: terminateApp', { ... })` instead",
3381
- parameters: [],
3508
+ command: "activateApp",
3509
+ description: "Activate the given app onto the device",
3510
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/activate-app/",
3511
+ parameters: [
3512
+ {
3513
+ name: "appId",
3514
+ type: "string",
3515
+ description: "App ID (package ID for Android, bundle ID for iOS)",
3516
+ required: true
3517
+ }
3518
+ ],
3382
3519
  support: {
3383
3520
  ios: {
3384
- XCUITest: "9.3+",
3385
- UIAutomation: "8.0 to 9.3"
3521
+ XCUITest: "9.3+"
3386
3522
  },
3387
3523
  android: {
3388
3524
  UiAutomator: "4.2+"
@@ -3390,19 +3526,17 @@ var appium_default = {
3390
3526
  }
3391
3527
  }
3392
3528
  },
3393
- "/session/:sessionId/appium/app/background": {
3529
+ "/session/:sessionId/appium/device/remove_app": {
3394
3530
  POST: {
3395
- command: "background",
3396
- description: "Send the currently running app for this session to the background.",
3397
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/background-app/",
3398
- deprecated: "Use `driver.execute('mobile: backgroundApp', { ... })` instead",
3531
+ command: "removeApp",
3532
+ description: "Remove an app from the device.",
3533
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/remove-app/",
3399
3534
  parameters: [
3400
3535
  {
3401
- name: "seconds",
3402
- type: "(number|null)",
3403
- description: "timeout to restore app, if 'null' app won't be restored",
3404
- required: true,
3405
- default: "null"
3536
+ name: "appId",
3537
+ type: "string",
3538
+ description: "App ID (package ID for Android, bundle ID for iOS)",
3539
+ required: true
3406
3540
  }
3407
3541
  ],
3408
3542
  support: {
@@ -3416,55 +3550,51 @@ var appium_default = {
3416
3550
  }
3417
3551
  }
3418
3552
  },
3419
- "/session/:sessionId/appium/app/end_test_coverage": {
3553
+ "/session/:sessionId/appium/device/terminate_app": {
3420
3554
  POST: {
3421
- command: "endCoverage",
3422
- description: "Get test coverage data.",
3423
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/end-test-coverage/",
3555
+ command: "terminateApp",
3556
+ description: "Terminate the given app on the device",
3557
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/terminate-app/",
3424
3558
  parameters: [
3425
3559
  {
3426
- name: "intent",
3560
+ name: "appId",
3427
3561
  type: "string",
3428
- description: "intent to broadcast",
3562
+ description: "App ID (package ID for Android, bundle ID for iOS)",
3429
3563
  required: true
3430
3564
  },
3431
3565
  {
3432
- name: "path",
3433
- type: "string",
3434
- description: "path to .ec file",
3435
- required: true
3566
+ name: "options",
3567
+ type: "object",
3568
+ description: 'Command options. E.g. "timeout": (Only Android) Timeout to retry terminate the app (see more in Appium docs)'
3436
3569
  }
3437
3570
  ],
3438
3571
  support: {
3572
+ ios: {
3573
+ XCUITest: "9.3+"
3574
+ },
3439
3575
  android: {
3440
3576
  UiAutomator: "4.2+"
3441
3577
  }
3442
3578
  }
3443
3579
  }
3444
3580
  },
3445
- "/session/:sessionId/appium/app/strings": {
3581
+ "/session/:sessionId/appium/device/app_installed": {
3446
3582
  POST: {
3447
- command: "getStrings",
3448
- description: "Get app strings.",
3449
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/get-app-strings/",
3583
+ command: "isAppInstalled",
3584
+ description: "Check whether the specified app is installed on the device.",
3585
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/is-app-installed/",
3450
3586
  parameters: [
3451
3587
  {
3452
- name: "language",
3453
- type: "string",
3454
- description: "language code",
3455
- required: false
3456
- },
3457
- {
3458
- name: "stringFile",
3588
+ name: "appId",
3459
3589
  type: "string",
3460
- description: "path to the string file",
3461
- required: false
3590
+ description: "App ID (package ID for Android, bundle ID for iOS)",
3591
+ required: true
3462
3592
  }
3463
3593
  ],
3464
3594
  returns: {
3465
- type: "object",
3466
- name: "appStrings",
3467
- description: "all defined Strings from an app for the specified language and strings filename"
3595
+ type: "boolean",
3596
+ name: "isAppInstalled",
3597
+ description: "Return true if installed, false if not"
3468
3598
  },
3469
3599
  support: {
3470
3600
  ios: {
@@ -3477,24 +3607,24 @@ var appium_default = {
3477
3607
  }
3478
3608
  }
3479
3609
  },
3480
- "/session/:sessionId/appium/element/:elementId/value": {
3610
+ "/session/:sessionId/appium/device/app_state": {
3481
3611
  POST: {
3482
- command: "setValueImmediate",
3483
- ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
3484
- variables: [
3485
- {
3486
- name: "elementId",
3487
- description: "the id of an element returned in a previous call to Find Element(s)"
3488
- }
3489
- ],
3612
+ command: "queryAppState",
3613
+ description: "Get the given app status on the device",
3614
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/app-state/",
3490
3615
  parameters: [
3491
3616
  {
3492
- name: "text",
3617
+ name: "appId",
3493
3618
  type: "string",
3494
- description: "text to set to an element",
3619
+ description: "App ID (package ID for Android, bundle ID for iOS)",
3495
3620
  required: true
3496
3621
  }
3497
3622
  ],
3623
+ returns: {
3624
+ type: "number",
3625
+ name: "appStatus",
3626
+ description: "0 is not installed. 1 is not running. 2 is running in background or suspended. 3 is running in background. 4 is running in foreground"
3627
+ },
3498
3628
  support: {
3499
3629
  ios: {
3500
3630
  XCUITest: "9.3+"
@@ -3505,23 +3635,35 @@ var appium_default = {
3505
3635
  }
3506
3636
  }
3507
3637
  },
3508
- "/session/:sessionId/appium/element/:elementId/replace_value": {
3638
+ "/session/:sessionId/appium/device/hide_keyboard": {
3509
3639
  POST: {
3510
- command: "replaceValue",
3511
- description: "Replace the value to element directly.",
3512
- ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
3513
- variables: [
3514
- {
3515
- name: "elementId",
3516
- description: "the id of an element returned in a previous call to Find Element(s)"
3517
- }
3518
- ],
3640
+ command: "hideKeyboard",
3641
+ description: "Hide soft keyboard.",
3642
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/hide-keyboard/",
3519
3643
  parameters: [
3520
3644
  {
3521
- name: "value",
3645
+ name: "strategy",
3522
3646
  type: "string",
3523
- description: "value to replace on element",
3524
- required: true
3647
+ description: "hide keyboard strategy (UIAutomation only), available strategies - 'press', 'pressKey', 'swipeDown', 'tapOut', 'tapOutside', 'default'",
3648
+ required: false
3649
+ },
3650
+ {
3651
+ name: "key",
3652
+ type: "string",
3653
+ description: "key value if strategy is 'pressKey'",
3654
+ required: false
3655
+ },
3656
+ {
3657
+ name: "keyCode",
3658
+ type: "string",
3659
+ description: "key code if strategy is 'pressKey'",
3660
+ required: false
3661
+ },
3662
+ {
3663
+ name: "keyName",
3664
+ type: "string",
3665
+ description: "key name if strategy is 'pressKey'",
3666
+ required: false
3525
3667
  }
3526
3668
  ],
3527
3669
  support: {
@@ -3531,20 +3673,23 @@ var appium_default = {
3531
3673
  },
3532
3674
  android: {
3533
3675
  UiAutomator: "4.2+"
3676
+ },
3677
+ windows: {
3678
+ Windows: "10+"
3534
3679
  }
3535
3680
  }
3536
3681
  }
3537
3682
  },
3538
- "/session/:sessionId/appium/settings": {
3683
+ "/session/:sessionId/appium/device/is_keyboard_shown": {
3539
3684
  GET: {
3540
- command: "getSettings",
3541
- description: "Retrieve the current settings on the device.",
3542
- ref: "https://appium.github.io/appium.io/docs/en/commands/session/settings/get-settings/",
3685
+ command: "isKeyboardShown",
3686
+ description: "Whether or not the soft keyboard is shown.",
3687
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/keys/is-keyboard-shown/",
3543
3688
  parameters: [],
3544
3689
  returns: {
3545
- type: "object",
3546
- name: "settings",
3547
- description: "JSON hash of all the currently specified settings, see Settings API"
3690
+ type: "boolean",
3691
+ name: "isKeyboardShown",
3692
+ description: "True if the keyboard is shown"
3548
3693
  },
3549
3694
  support: {
3550
3695
  ios: {
@@ -3558,16 +3703,24 @@ var appium_default = {
3558
3703
  Windows: "10+"
3559
3704
  }
3560
3705
  }
3561
- },
3706
+ }
3707
+ },
3708
+ "/session/:sessionId/appium/device/push_file": {
3562
3709
  POST: {
3563
- command: "updateSettings",
3564
- description: "Update the current setting on the device.",
3565
- ref: "https://appium.github.io/appium.io/docs/en/commands/session/settings/update-settings/",
3710
+ command: "pushFile",
3711
+ description: "Place a file onto the device in a particular place.",
3712
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/push-file/",
3566
3713
  parameters: [
3567
3714
  {
3568
- name: "settings",
3569
- type: "object",
3570
- description: "key/value object with settings to update",
3715
+ name: "path",
3716
+ type: "string",
3717
+ description: "path to install the data to",
3718
+ required: true
3719
+ },
3720
+ {
3721
+ name: "data",
3722
+ type: "string",
3723
+ description: "contents of file in base64",
3571
3724
  required: true
3572
3725
  }
3573
3726
  ],
@@ -3585,16 +3738,16 @@ var appium_default = {
3585
3738
  }
3586
3739
  }
3587
3740
  },
3588
- "/session/:sessionId/appium/receive_async_response": {
3741
+ "/session/:sessionId/appium/device/pull_file": {
3589
3742
  POST: {
3590
- command: "receiveAsyncResponse",
3591
- description: "Callback url for asynchronous execution of JavaScript.",
3592
- ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
3743
+ command: "pullFile",
3744
+ description: "Retrieve a file from the device's file system.",
3745
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/pull-file/",
3593
3746
  parameters: [
3594
3747
  {
3595
- name: "response",
3596
- type: "object",
3597
- description: "response to receive on device",
3748
+ name: "path",
3749
+ type: "string",
3750
+ description: "path on the device to pull file from",
3598
3751
  required: true
3599
3752
  }
3600
3753
  ],
@@ -3602,55 +3755,54 @@ var appium_default = {
3602
3755
  ios: {
3603
3756
  XCUITest: "9.3+",
3604
3757
  UIAutomation: "8.0 to 9.3"
3758
+ },
3759
+ android: {
3760
+ UiAutomator: "4.2+"
3761
+ },
3762
+ windows: {
3763
+ Windows: "10+"
3605
3764
  }
3765
+ },
3766
+ returns: {
3767
+ type: "string",
3768
+ name: "response",
3769
+ description: "Contents of file in base64"
3606
3770
  }
3607
3771
  }
3608
3772
  },
3609
- "/session/:sessionId/appium/device/gsm_call": {
3773
+ "/session/:sessionId/appium/device/pull_folder": {
3610
3774
  POST: {
3611
- command: "gsmCall",
3612
- description: "Make GSM call (Emulator only).",
3613
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-call/",
3775
+ command: "pullFolder",
3776
+ description: "Retrieve a folder from the device's file system.",
3777
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/files/pull-folder/",
3614
3778
  parameters: [
3615
3779
  {
3616
- name: "phoneNumber",
3617
- type: "string",
3618
- description: "the phone number to call to",
3619
- required: true
3620
- },
3621
- {
3622
- name: "action",
3780
+ name: "path",
3623
3781
  type: "string",
3624
- description: "The action - 'call', 'accept', 'cancel', 'hold'",
3782
+ description: "path to an entire folder on the device",
3625
3783
  required: true
3626
3784
  }
3627
3785
  ],
3628
3786
  support: {
3787
+ ios: {
3788
+ XCUITest: "9.3+",
3789
+ UIAutomation: "8.0 to 9.3"
3790
+ },
3629
3791
  android: {
3630
3792
  UiAutomator: "4.2+"
3631
- }
3632
- }
3633
- }
3634
- },
3635
- "/session/:sessionId/appium/device/gsm_signal": {
3636
- POST: {
3637
- command: "gsmSignal",
3638
- description: "Set GSM signal strength (Emulator only).",
3639
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-signal/",
3640
- parameters: [
3641
- {
3642
- name: "signalStrength",
3643
- type: "string",
3644
- description: "signal strength in the range [0, 4]",
3645
- required: true
3646
3793
  },
3647
- {
3648
- name: "signalStrengh",
3649
- type: "string",
3650
- description: "signal strength in the range [0, 4]. Please also set this parameter with the same value if you use Appium v1.11.0 or lower (see https://github.com/appium/appium/issues/12234).",
3651
- required: false
3794
+ windows: {
3795
+ Windows: "10+"
3652
3796
  }
3653
- ],
3797
+ }
3798
+ }
3799
+ },
3800
+ "/session/:sessionId/appium/device/toggle_airplane_mode": {
3801
+ POST: {
3802
+ command: "toggleAirplaneMode",
3803
+ description: "Toggle airplane mode on device.",
3804
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-airplane-mode/",
3805
+ parameters: [],
3654
3806
  support: {
3655
3807
  android: {
3656
3808
  UiAutomator: "4.2+"
@@ -3658,19 +3810,12 @@ var appium_default = {
3658
3810
  }
3659
3811
  }
3660
3812
  },
3661
- "/session/:sessionId/appium/device/power_capacity": {
3813
+ "/session/:sessionId/appium/device/toggle_data": {
3662
3814
  POST: {
3663
- command: "powerCapacity",
3664
- description: "Set the battery percentage (Emulator only).",
3665
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/emulator/power_capacity/",
3666
- parameters: [
3667
- {
3668
- name: "percent",
3669
- type: "number",
3670
- description: "percentage value in range [0, 100]",
3671
- required: true
3672
- }
3673
- ],
3815
+ command: "toggleData",
3816
+ description: "Switch the state of data service.",
3817
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-data/",
3818
+ parameters: [],
3674
3819
  support: {
3675
3820
  android: {
3676
3821
  UiAutomator: "4.2+"
@@ -3678,19 +3823,12 @@ var appium_default = {
3678
3823
  }
3679
3824
  }
3680
3825
  },
3681
- "/session/:sessionId/appium/device/power_ac": {
3826
+ "/session/:sessionId/appium/device/toggle_wifi": {
3682
3827
  POST: {
3683
- command: "powerAC",
3684
- description: "Set the state of the battery charger to connected or not (Emulator only).",
3685
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/emulator/power_ac/",
3686
- parameters: [
3687
- {
3688
- name: "state",
3689
- type: "string",
3690
- description: "set the state. on or off",
3691
- required: true
3692
- }
3693
- ],
3828
+ command: "toggleWiFi",
3829
+ description: "Switch the state of the wifi service.",
3830
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-wifi/",
3831
+ parameters: [],
3694
3832
  support: {
3695
3833
  android: {
3696
3834
  UiAutomator: "4.2+"
@@ -3698,19 +3836,12 @@ var appium_default = {
3698
3836
  }
3699
3837
  }
3700
3838
  },
3701
- "/session/:sessionId/appium/device/gsm_voice": {
3839
+ "/session/:sessionId/appium/device/toggle_location_services": {
3702
3840
  POST: {
3703
- command: "gsmVoice",
3704
- description: "Set GSM voice state (Emulator only).",
3705
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-voice/",
3706
- parameters: [
3707
- {
3708
- name: "state",
3709
- type: "string",
3710
- description: "state of GSM voice - 'unregistered', 'home', 'roaming', 'searching', 'denied', 'off', 'on'",
3711
- required: true
3712
- }
3713
- ],
3841
+ command: "toggleLocationServices",
3842
+ description: "Switch the state of the location service.",
3843
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/toggle-location-services/",
3844
+ parameters: [],
3714
3845
  support: {
3715
3846
  android: {
3716
3847
  UiAutomator: "4.2+"
@@ -3718,22 +3849,16 @@ var appium_default = {
3718
3849
  }
3719
3850
  }
3720
3851
  },
3721
- "/session/:sessionId/appium/device/send_sms": {
3852
+ "/session/:sessionId/appium/device/network_speed": {
3722
3853
  POST: {
3723
- command: "sendSms",
3724
- description: "Simulate an SMS message (Emulator only).",
3725
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/send-sms/",
3854
+ command: "toggleNetworkSpeed",
3855
+ description: "Set network speed (Emulator only)",
3856
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/network-speed/",
3726
3857
  parameters: [
3727
3858
  {
3728
- name: "phoneNumber",
3729
- type: "string",
3730
- description: "the phone number to send the SMS too",
3731
- required: true
3732
- },
3733
- {
3734
- name: "message",
3859
+ name: "netspeed",
3735
3860
  type: "string",
3736
- description: "the SMS message",
3861
+ description: "Network type - 'full','gsm', 'edge', 'hscsd', 'gprs', 'umts', 'hsdpa', 'lte', 'evdo'",
3737
3862
  required: true
3738
3863
  }
3739
3864
  ],
@@ -3744,19 +3869,12 @@ var appium_default = {
3744
3869
  }
3745
3870
  }
3746
3871
  },
3747
- "/session/:sessionId/appium/device/finger_print": {
3872
+ "/session/:sessionId/appium/device/open_notifications": {
3748
3873
  POST: {
3749
- command: "fingerPrint",
3750
- description: "Authenticate users by using their finger print scans on supported emulators.",
3751
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/authentication/finger-print/",
3752
- parameters: [
3753
- {
3754
- name: "fingerprintId",
3755
- type: "number",
3756
- description: "finger prints stored in Android Keystore system (from 1 to 10)",
3757
- required: true
3758
- }
3759
- ],
3874
+ command: "openNotifications",
3875
+ description: "Open Android notifications (Emulator only).",
3876
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/open-notifications/",
3877
+ parameters: [],
3760
3878
  support: {
3761
3879
  android: {
3762
3880
  UiAutomator: "4.2+"
@@ -3764,429 +3882,446 @@ var appium_default = {
3764
3882
  }
3765
3883
  }
3766
3884
  },
3767
- "/session/:sessionId/appium/device/set_clipboard": {
3885
+ "/session/:sessionId/appium/device/start_activity": {
3768
3886
  POST: {
3769
- command: "setClipboard",
3770
- description: "Set the content of the system clipboard",
3771
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/clipboard/set-clipboard/",
3887
+ command: "startActivity",
3888
+ description: "Start an Android activity by providing package name and activity name.",
3889
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/activity/start-activity/",
3772
3890
  parameters: [
3773
3891
  {
3774
- name: "content",
3892
+ name: "appPackage",
3775
3893
  type: "string",
3776
- description: "The actual base64 encoded clipboard content",
3894
+ description: "name of app",
3777
3895
  required: true
3778
3896
  },
3779
3897
  {
3780
- name: "contentType",
3898
+ name: "appActivity",
3781
3899
  type: "string",
3782
- description: "The type of the content to get. Plaintext, Image, URL. Android supports only plaintext",
3900
+ description: "name of activity",
3901
+ required: true
3902
+ },
3903
+ {
3904
+ name: "appWaitPackage",
3905
+ type: "string",
3906
+ description: "name of app to wait for",
3783
3907
  required: false
3784
3908
  },
3785
3909
  {
3786
- name: "label",
3910
+ name: "appWaitActivity",
3787
3911
  type: "string",
3788
- description: "Clipboard data label for Android",
3912
+ description: "name of activity to wait for",
3913
+ required: false
3914
+ },
3915
+ {
3916
+ name: "intentAction",
3917
+ type: "string",
3918
+ description: "intent action which will be used to start activity",
3919
+ required: false,
3920
+ default: "android.intent.action.MAIN"
3921
+ },
3922
+ {
3923
+ name: "intentCategory",
3924
+ type: "string",
3925
+ description: "intent category which will be used to start activity",
3926
+ required: false,
3927
+ default: "android.intent.category.LAUNCHER"
3928
+ },
3929
+ {
3930
+ name: "intentFlags",
3931
+ type: "string",
3932
+ description: "flags that will be used to start activity",
3933
+ required: false,
3934
+ default: "0x10200000"
3935
+ },
3936
+ {
3937
+ name: "optionalIntentArguments",
3938
+ type: "string",
3939
+ description: "additional intent arguments that will be used to start activity",
3940
+ required: false
3941
+ },
3942
+ {
3943
+ name: "dontStopAppOnReset",
3944
+ type: "string",
3945
+ description: "doesn\u2019t stop the process of the app under test, before starting the app using adb",
3789
3946
  required: false
3790
3947
  }
3791
3948
  ],
3949
+ support: {
3950
+ android: {
3951
+ UiAutomator: "4.2+"
3952
+ }
3953
+ }
3954
+ }
3955
+ },
3956
+ "/session/:sessionId/appium/device/system_bars": {
3957
+ GET: {
3958
+ command: "getSystemBars",
3959
+ description: "Retrieve visibility and bounds information of the status and navigation bars.",
3960
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/system-bars/",
3961
+ parameters: [],
3792
3962
  returns: {
3793
- type: "string",
3794
- name: "response",
3795
- description: "Response from Appium server"
3963
+ type: "object[]",
3964
+ name: "systemBars",
3965
+ description: "Information about visibility and bounds of status and navigation bar"
3796
3966
  },
3797
3967
  support: {
3798
- ios: {
3799
- XCUITest: "9.3+"
3800
- },
3801
3968
  android: {
3802
3969
  UiAutomator: "4.2+"
3803
3970
  }
3804
3971
  }
3805
3972
  }
3806
3973
  },
3807
- "/session/:sessionId/appium/device/get_clipboard": {
3808
- POST: {
3809
- command: "getClipboard",
3810
- description: "Get the content of the system clipboard",
3811
- ref: "https://appium.github.io/appium.io/docs/en/commands/device/clipboard/get-clipboard/",
3812
- parameters: [
3813
- {
3814
- name: "contentType",
3815
- type: "string",
3816
- description: "The type of the content to get. Plaintext, Image, URL. Android supports only plaintext",
3817
- required: false
3818
- }
3819
- ],
3974
+ "/session/:sessionId/appium/device/system_time": {
3975
+ GET: {
3976
+ command: "getDeviceTime",
3977
+ description: "Get the time on the device.",
3978
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/system/system-time/",
3979
+ parameters: [],
3820
3980
  returns: {
3821
3981
  type: "string",
3822
- name: "response",
3823
- description: "Clipboard content as base64-encoded string or an empty string if the clipboard is empty"
3982
+ name: "time",
3983
+ description: "Time on the device"
3824
3984
  },
3825
3985
  support: {
3826
3986
  ios: {
3827
- XCUITest: "9.3+"
3987
+ XCUITest: "9.3+",
3988
+ UIAutomation: "8.0 to 9.3"
3828
3989
  },
3829
3990
  android: {
3830
3991
  UiAutomator: "4.2+"
3831
3992
  }
3832
3993
  }
3833
- }
3834
- },
3835
- "/session/:sessionId/touch/perform": {
3836
- POST: {
3837
- command: "touchPerform",
3838
- description: "This functionality is only available from within a native context. 'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch interactions impossible because some interactions need to be performed in one sequence. Vertical, for example, requires pressing down, moving to a different y coordinate, and then releasing. For it to work, there can't be a delay between the interactions.",
3839
- ref: "https://appium.github.io/appium.io/docs/en/commands/interactions/touch/touch-perform/",
3840
- parameters: [
3841
- {
3842
- name: "actions",
3843
- type: "object[]",
3844
- description: "The type of action to perform (e.g. moveTo, release, press, tap, wait)",
3845
- required: true
3846
- }
3847
- ],
3848
- examples: [
3849
- [
3850
- "// do a horizontal swipe by percentage",
3851
- "const startPercentage = 10;",
3852
- "const endPercentage = 90;",
3853
- "const anchorPercentage = 50;",
3854
- "",
3855
- "const { width, height } = driver.getWindowSize();",
3856
- "const anchor = height * anchorPercentage / 100;",
3857
- "const startPoint = width * startPercentage / 100;",
3858
- "const endPoint = width * endPercentage / 100;",
3859
- "driver.touchPerform([",
3860
- " {",
3861
- " action: 'press',",
3862
- " options: {",
3863
- " x: startPoint,",
3864
- " y: anchor,",
3865
- " },",
3866
- " },",
3867
- " {",
3868
- " action: 'wait',",
3869
- " options: {",
3870
- " ms: 100,",
3871
- " },",
3872
- " },",
3873
- " {",
3874
- " action: 'moveTo',",
3875
- " options: {",
3876
- " x: endPoint,",
3877
- " y: anchor,",
3878
- " },",
3879
- " },",
3880
- " {",
3881
- " action: 'release',",
3882
- " options: {},",
3883
- " },",
3884
- "]);"
3885
- ]
3886
- ],
3994
+ }
3995
+ },
3996
+ "/session/:sessionId/appium/device/display_density": {
3997
+ GET: {
3998
+ command: "getDisplayDensity",
3999
+ description: "Get display density from device.",
4000
+ ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
4001
+ parameters: [],
4002
+ returns: {
4003
+ type: "*",
4004
+ name: "displayDensity"
4005
+ },
3887
4006
  support: {
3888
4007
  android: {
3889
4008
  UiAutomator: "4.2+"
3890
- },
3891
- ios: {
3892
- XCUITest: "9.3+",
3893
- UIAutomation: "8.0 to 9.3"
3894
- },
3895
- windows: {
3896
- Windows: "10+"
3897
4009
  }
3898
4010
  }
3899
4011
  }
3900
4012
  },
3901
- "/session/:sessionId/touch/multi/perform": {
4013
+ "/session/:sessionId/appium/simulator/touch_id": {
3902
4014
  POST: {
3903
- command: "multiTouchPerform",
3904
- description: "This functionality is only available from within a native context. Perform a multi touch action sequence.",
3905
- ref: "https://appium.github.io/appium.io/docs/en/commands/interactions/touch/multi-touch-perform/",
4015
+ command: "touchId",
4016
+ description: "Simulate a [touch id](https://support.apple.com/en-ca/ht201371) event (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true and the Simulator must be [enrolled](https://support.apple.com/en-ca/ht201371). When you set allowTouchIdEnroll to true, it will set the Simulator to be enrolled by default. The enrollment state can be [toggled](https://appium.github.io/appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/index.html). This call will only work if Appium process or its parent application (e.g. Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.",
4017
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/simulator/touch-id/",
3906
4018
  parameters: [
3907
4019
  {
3908
- name: "actions",
3909
- type: "object[]",
3910
- description: "The type of action to perform (e.g. moveTo, release, press, tap, wait)",
4020
+ name: "match",
4021
+ type: "boolean",
4022
+ description: "are we simulating a successful touch (true) or a failed touch (false)",
3911
4023
  required: true
3912
4024
  }
3913
4025
  ],
3914
4026
  support: {
3915
- android: {
3916
- UiAutomator: "4.2+"
3917
- },
3918
4027
  ios: {
3919
- XCUITest: "9.3+",
3920
- UIAutomation: "8.0 to 9.3"
3921
- },
3922
- windows: {
3923
- Windows: "10+"
4028
+ XCUITest: "9.3+"
3924
4029
  }
3925
4030
  }
3926
4031
  }
3927
4032
  },
3928
- "/session/:sessionId/appium/execute_driver": {
4033
+ "/session/:sessionId/appium/simulator/toggle_touch_id_enrollment": {
3929
4034
  POST: {
3930
- command: "executeDriverScript",
3931
- description: "This command enables you to specify a WebdriverIO script as a string and transmit it to the Appium server for local execution on the server itself. This approach helps minimize potential latency associated with each command. ***To utilize this command with Appium 2.0, you must have the [`execute-driver-plugin`](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin) plugin installed.***",
3932
- ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/execute-driver.md",
4035
+ command: "toggleEnrollTouchId",
4036
+ description: "Toggle the simulator being [enrolled](https://support.apple.com/en-ca/ht201371) to accept touchId (iOS Simulator only). To enable this feature, the `allowTouchIdEnroll` desired capability must be set to true. When `allowTouchIdEnroll` is set to true the Simulator will be enrolled by default, and the 'Toggle Touch ID Enrollment' changes the enrollment state. This call will only work if the Appium process or its parent application (e.g., Terminal.app or Appium.app) has access to Mac OS accessibility in System Preferences > Security & Privacy > Privacy > Accessibility list.",
4037
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/simulator/toggle-touch-id-enrollment/",
3933
4038
  parameters: [
3934
4039
  {
3935
- name: "script",
3936
- type: "string",
3937
- description: "The script to execute. It has access to a 'driver' object which represents a WebdriverIO session attached to the current server.",
3938
- required: true
4040
+ name: "enabled",
4041
+ type: "boolean",
4042
+ description: "equals to true if TouchID enrollment should be enabled",
4043
+ required: false,
4044
+ default: true
4045
+ }
4046
+ ],
4047
+ support: {
4048
+ ios: {
4049
+ XCUITest: "9.3+"
4050
+ }
4051
+ }
4052
+ }
4053
+ },
4054
+ "/session/:sessionId/appium/app/launch": {
4055
+ POST: {
4056
+ command: "launchApp",
4057
+ description: "Launch an app on device.",
4058
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/launch-app/",
4059
+ deprecated: "For iOS, utilize `driver.execute('mobile: launchApp', { ... })`, and for Android, make use of `driver.execute('mobile: activateApp', { ... })`.",
4060
+ parameters: [],
4061
+ support: {
4062
+ ios: {
4063
+ XCUITest: "9.3+",
4064
+ UIAutomation: "8.0 to 9.3"
3939
4065
  },
3940
- {
3941
- name: "type",
3942
- type: "string",
3943
- description: "The language/framework used in the script. Currently, only 'webdriverio' is supported and is the default.",
3944
- required: false
4066
+ android: {
4067
+ UiAutomator: "4.2+"
4068
+ }
4069
+ }
4070
+ }
4071
+ },
4072
+ "/session/:sessionId/appium/app/close": {
4073
+ POST: {
4074
+ command: "closeApp",
4075
+ description: "Close an app on device.",
4076
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/close-app/",
4077
+ deprecated: "Use `driver.execute('mobile: terminateApp', { ... })` instead",
4078
+ parameters: [],
4079
+ support: {
4080
+ ios: {
4081
+ XCUITest: "9.3+",
4082
+ UIAutomation: "8.0 to 9.3"
3945
4083
  },
3946
- {
3947
- name: "timeout",
3948
- type: "number",
3949
- description: "The number of milliseconds the script should be allowed to run before being killed by the Appium server. Defaults to the equivalent of 1 hour.",
3950
- required: false
4084
+ android: {
4085
+ UiAutomator: "4.2+"
3951
4086
  }
3952
- ],
3953
- returns: {
3954
- type: "object",
3955
- name: "result",
3956
- 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."
3957
4087
  }
3958
4088
  }
3959
4089
  },
3960
- "/session/:sessionId/appium/events": {
4090
+ "/session/:sessionId/appium/app/background": {
3961
4091
  POST: {
3962
- command: "getEvents",
3963
- description: "Get events stored in appium server.",
3964
- ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/get-events.md",
4092
+ command: "background",
4093
+ description: "Send the currently running app for this session to the background.",
4094
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/background-app/",
4095
+ deprecated: "Use `driver.execute('mobile: backgroundApp', { ... })` instead",
3965
4096
  parameters: [
3966
4097
  {
3967
- name: "type",
3968
- type: "string[]",
3969
- description: "Get events which are filtered with the type if the type is provided.",
3970
- required: true
4098
+ name: "seconds",
4099
+ type: "(number|null)",
4100
+ description: "timeout to restore app, if 'null' app won't be restored",
4101
+ required: true,
4102
+ default: "null"
3971
4103
  }
3972
4104
  ],
3973
- returns: {
3974
- type: "object",
3975
- name: "result",
3976
- description: "A JSON hash of events like `{'commands' => [{'cmd' => 123455, ....}], 'startTime' => 1572954894127, }`."
3977
- },
3978
4105
  support: {
4106
+ ios: {
4107
+ XCUITest: "9.3+",
4108
+ UIAutomation: "8.0 to 9.3"
4109
+ },
3979
4110
  android: {
3980
4111
  UiAutomator: "4.2+"
3981
- },
3982
- ios: {
3983
- XCUITest: "9.3+"
3984
4112
  }
3985
4113
  }
3986
4114
  }
3987
4115
  },
3988
- "/session/:sessionId/appium/log_event": {
4116
+ "/session/:sessionId/appium/app/end_test_coverage": {
3989
4117
  POST: {
3990
- command: "logEvent",
3991
- description: "Store a custom event.",
3992
- ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/log-event.md",
4118
+ command: "endCoverage",
4119
+ description: "Get test coverage data.",
4120
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/end-test-coverage/",
3993
4121
  parameters: [
3994
4122
  {
3995
- name: "vendor",
4123
+ name: "intent",
3996
4124
  type: "string",
3997
- description: "The name of vendor. It will be `vendor` in `vendor:event`.",
4125
+ description: "intent to broadcast",
3998
4126
  required: true
3999
4127
  },
4000
4128
  {
4001
- name: "event",
4129
+ name: "path",
4002
4130
  type: "string",
4003
- description: "The name of event. It will be `event` in `vendor:event`.",
4131
+ description: "path to .ec file",
4004
4132
  required: true
4005
4133
  }
4006
4134
  ],
4007
4135
  support: {
4008
4136
  android: {
4009
4137
  UiAutomator: "4.2+"
4010
- },
4011
- ios: {
4012
- XCUITest: "9.3+"
4013
4138
  }
4014
4139
  }
4015
4140
  }
4016
4141
  },
4017
- "/session/:sessionId/appium/compare_images": {
4142
+ "/session/:sessionId/appium/app/strings": {
4018
4143
  POST: {
4019
- command: "compareImages",
4020
- description: "This feature conducts image comparisons utilizing the capabilities of the OpenCV framework. Please note that for this functionality to work, both the OpenCV framework and the opencv4nodejs module must be installed on the machine where the Appium server is operational. ***Furthermore, you'll need to have the [`images-plugin`](https://github.com/appium/appium/tree/master/packages/images-plugin) plugin installed to use this feature with Appium 2.0.***",
4021
- ref: "https://appium.github.io/appium.io/docs/en/writing-running-appium/image-comparison/",
4144
+ command: "getStrings",
4145
+ description: "Get app strings.",
4146
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/app/get-app-strings/",
4022
4147
  parameters: [
4023
4148
  {
4024
- name: "mode",
4025
- type: "string",
4026
- description: "One of possible comparison modes: 'matchFeatures', 'getSimilarity', 'matchTemplate'. 'matchFeatures' is by default.",
4027
- required: true,
4028
- default: "matchFeatures"
4029
- },
4030
- {
4031
- name: "firstImage",
4149
+ name: "language",
4032
4150
  type: "string",
4033
- description: "An image data. All image formats, that OpenCV library itself accepts, are supported.",
4034
- required: true
4151
+ description: "language code",
4152
+ required: false
4035
4153
  },
4036
4154
  {
4037
- name: "secondImage",
4155
+ name: "stringFile",
4038
4156
  type: "string",
4039
- description: "An image data. All image formats, that OpenCV library itself accepts, are supported.",
4040
- required: true
4041
- },
4042
- {
4043
- name: "options",
4044
- type: "object",
4045
- description: "The content of this dictionary depends on the actual `mode` value. See the documentation on `appium-support` module for more details. ",
4046
- required: true,
4047
- default: {}
4157
+ description: "path to the string file",
4158
+ required: false
4048
4159
  }
4049
4160
  ],
4050
4161
  returns: {
4051
4162
  type: "object",
4052
- name: "result",
4053
- description: "The content of the resulting dictionary depends on the actual `mode` and `options` values. See the documentation on `appium-support` module for more details."
4054
- }
4055
- }
4056
- },
4057
- "/session/:sessionId/timeouts/implicit_wait": {
4058
- POST: {
4059
- command: "implicitWait",
4060
- description: "Set the amount of time the driver should wait when searching for elements. When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever occurs first. When searching for multiple elements, the driver should poll the page until at least one element is found or the timeout expires, at which point it should return an empty list. If this command is never sent, the driver should default to an implicit wait of 0ms.",
4061
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4062
- parameters: [
4063
- {
4064
- name: "ms",
4065
- type: "number",
4066
- description: "The amount of time, in milliseconds, to wait on an element.",
4067
- required: true
4068
- }
4069
- ],
4163
+ name: "appStrings",
4164
+ description: "all defined Strings from an app for the specified language and strings filename"
4165
+ },
4070
4166
  support: {
4167
+ ios: {
4168
+ XCUITest: "9.3+",
4169
+ UIAutomation: "8.0 to 9.3"
4170
+ },
4071
4171
  android: {
4072
4172
  UiAutomator: "4.2+"
4073
- },
4074
- ios: {
4075
- XCUITest: "9.3+"
4076
4173
  }
4077
4174
  }
4078
4175
  }
4079
4176
  },
4080
- "/session/:sessionId/element/:elementId/location_in_view": {
4081
- GET: {
4082
- command: "getLocationInView",
4083
- description: "Determine an element's location on the screen once it has been scrolled into view.<br /><br />__Note:__ This is considered an internal command and should only be used to determine an element's location for correctly generating native events.",
4084
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4177
+ "/session/:sessionId/appium/element/:elementId/value": {
4178
+ POST: {
4179
+ command: "setValueImmediate",
4180
+ ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
4085
4181
  variables: [
4086
4182
  {
4087
4183
  name: "elementId",
4088
- description: "ID of the element to route the command to"
4184
+ description: "the id of an element returned in a previous call to Find Element(s)"
4185
+ }
4186
+ ],
4187
+ parameters: [
4188
+ {
4189
+ name: "text",
4190
+ type: "string",
4191
+ description: "text to set to an element",
4192
+ required: true
4089
4193
  }
4090
4194
  ],
4091
- parameters: [],
4092
- returns: {
4093
- type: "Object",
4094
- name: "location",
4095
- description: "The X and Y coordinates for the element on the page."
4096
- },
4097
4195
  support: {
4098
- android: {
4099
- UiAutomator: "4.2+"
4100
- },
4101
4196
  ios: {
4102
4197
  XCUITest: "9.3+"
4198
+ },
4199
+ android: {
4200
+ UiAutomator: "4.2+"
4103
4201
  }
4104
4202
  }
4105
4203
  }
4106
4204
  },
4107
- "/session/:sessionId/keys": {
4205
+ "/session/:sessionId/appium/element/:elementId/replace_value": {
4108
4206
  POST: {
4109
- command: "sendKeys",
4110
- description: "Send a sequence of key strokes to the active element",
4111
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4207
+ command: "replaceValue",
4208
+ description: "Replace the value to element directly.",
4209
+ ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
4210
+ variables: [
4211
+ {
4212
+ name: "elementId",
4213
+ description: "the id of an element returned in a previous call to Find Element(s)"
4214
+ }
4215
+ ],
4112
4216
  parameters: [
4113
4217
  {
4114
4218
  name: "value",
4115
- type: "string[]",
4116
- description: "The sequence of keys to type. An array must be provided.",
4219
+ type: "string",
4220
+ description: "value to replace on element",
4117
4221
  required: true
4118
4222
  }
4119
4223
  ],
4120
4224
  support: {
4225
+ ios: {
4226
+ XCUITest: "9.3+",
4227
+ UIAutomation: "8.0 to 9.3"
4228
+ },
4121
4229
  android: {
4122
4230
  UiAutomator: "4.2+"
4123
- },
4124
- ios: {
4125
- XCUITest: "9.3+"
4126
4231
  }
4127
4232
  }
4128
4233
  }
4129
4234
  },
4130
- "/session/:sessionId/ime/available_engines": {
4235
+ "/session/:sessionId/appium/settings": {
4131
4236
  GET: {
4132
- command: "availableIMEEngines",
4133
- description: "List all available engines on the machine. To use an engine, it has to be present in this list.",
4134
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4237
+ command: "getSettings",
4238
+ description: "Retrieve the current settings on the device.",
4239
+ ref: "https://appium.github.io/appium.io/docs/en/commands/session/settings/get-settings/",
4135
4240
  parameters: [],
4136
4241
  returns: {
4137
- type: "String[]",
4138
- name: "engines",
4139
- description: "A list of available engines"
4242
+ type: "object",
4243
+ name: "settings",
4244
+ description: "JSON hash of all the currently specified settings, see Settings API"
4140
4245
  },
4141
4246
  support: {
4247
+ ios: {
4248
+ XCUITest: "9.3+",
4249
+ UIAutomation: "8.0 to 9.3"
4250
+ },
4142
4251
  android: {
4143
4252
  UiAutomator: "4.2+"
4253
+ },
4254
+ windows: {
4255
+ Windows: "10+"
4144
4256
  }
4145
4257
  }
4146
- }
4147
- },
4148
- "/session/:sessionId/ime/active_engine": {
4149
- GET: {
4150
- command: "getActiveIMEEngine",
4151
- description: "Get the name of the active IME engine. The name string is platform specific.",
4152
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4153
- parameters: [],
4154
- returns: {
4155
- type: "String",
4156
- name: "engine",
4157
- description: "The name of the active IME engine"
4158
- },
4258
+ },
4259
+ POST: {
4260
+ command: "updateSettings",
4261
+ description: "Update the current setting on the device.",
4262
+ ref: "https://appium.github.io/appium.io/docs/en/commands/session/settings/update-settings/",
4263
+ parameters: [
4264
+ {
4265
+ name: "settings",
4266
+ type: "object",
4267
+ description: "key/value object with settings to update",
4268
+ required: true
4269
+ }
4270
+ ],
4159
4271
  support: {
4272
+ ios: {
4273
+ XCUITest: "9.3+",
4274
+ UIAutomation: "8.0 to 9.3"
4275
+ },
4160
4276
  android: {
4161
4277
  UiAutomator: "4.2+"
4278
+ },
4279
+ windows: {
4280
+ Windows: "10+"
4162
4281
  }
4163
4282
  }
4164
4283
  }
4165
4284
  },
4166
- "/session/:sessionId/ime/activated": {
4167
- GET: {
4168
- command: "isIMEActivated",
4169
- description: "Indicates whether IME input is active at the moment",
4170
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4171
- parameters: [],
4172
- returns: {
4173
- type: "Boolean",
4174
- name: "isActive",
4175
- description: "true if IME input is available and currently active, false otherwise"
4176
- },
4285
+ "/session/:sessionId/appium/receive_async_response": {
4286
+ POST: {
4287
+ command: "receiveAsyncResponse",
4288
+ description: "Callback url for asynchronous execution of JavaScript.",
4289
+ ref: "https://github.com/appium/appium-base-driver/blob/master/docs/mjsonwp/protocol-methods.md#appium-extension-endpoints",
4290
+ parameters: [
4291
+ {
4292
+ name: "response",
4293
+ type: "object",
4294
+ description: "response to receive on device",
4295
+ required: true
4296
+ }
4297
+ ],
4177
4298
  support: {
4178
- android: {
4179
- UiAutomator: "4.2+"
4299
+ ios: {
4300
+ XCUITest: "9.3+",
4301
+ UIAutomation: "8.0 to 9.3"
4180
4302
  }
4181
4303
  }
4182
4304
  }
4183
4305
  },
4184
- "/session/:sessionId/ime/deactivate": {
4306
+ "/session/:sessionId/appium/device/gsm_call": {
4185
4307
  POST: {
4186
- command: "deactivateIMEEngine",
4187
- description: "De-activates the currently-active IME engine.",
4188
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4189
- parameters: [],
4308
+ command: "gsmCall",
4309
+ description: "Make GSM call (Emulator only).",
4310
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-call/",
4311
+ parameters: [
4312
+ {
4313
+ name: "phoneNumber",
4314
+ type: "string",
4315
+ description: "the phone number to call to",
4316
+ required: true
4317
+ },
4318
+ {
4319
+ name: "action",
4320
+ type: "string",
4321
+ description: "The action - 'call', 'accept', 'cancel', 'hold'",
4322
+ required: true
4323
+ }
4324
+ ],
4190
4325
  support: {
4191
4326
  android: {
4192
4327
  UiAutomator: "4.2+"
@@ -4194,17 +4329,23 @@ var appium_default = {
4194
4329
  }
4195
4330
  }
4196
4331
  },
4197
- "/session/:sessionId/ime/activate": {
4332
+ "/session/:sessionId/appium/device/gsm_signal": {
4198
4333
  POST: {
4199
- command: "activateIMEEngine",
4200
- description: "Make an engines that is available",
4201
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4334
+ command: "gsmSignal",
4335
+ description: "Set GSM signal strength (Emulator only).",
4336
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-signal/",
4202
4337
  parameters: [
4203
4338
  {
4204
- name: "engine",
4339
+ name: "signalStrength",
4205
4340
  type: "string",
4206
- description: "name of the engine to activate",
4341
+ description: "signal strength in the range [0, 4]",
4207
4342
  required: true
4343
+ },
4344
+ {
4345
+ name: "signalStrengh",
4346
+ type: "string",
4347
+ description: "signal strength in the range [0, 4]. Please also set this parameter with the same value if you use Appium v1.11.0 or lower (see https://github.com/appium/appium/issues/12234).",
4348
+ required: false
4208
4349
  }
4209
4350
  ],
4210
4351
  support: {
@@ -4214,281 +4355,352 @@ var appium_default = {
4214
4355
  }
4215
4356
  }
4216
4357
  },
4217
- "/session/:sessionId/timeouts/async_script": {
4358
+ "/session/:sessionId/appium/device/power_capacity": {
4218
4359
  POST: {
4219
- command: "asyncScriptTimeout",
4220
- description: "Set the amount of time, in milliseconds, that asynchronous scripts executed by `/session/:sessionId/execute_async` are permitted to run before they are aborted and a `Timeout` error is returned to the client.",
4221
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4360
+ command: "powerCapacity",
4361
+ description: "Set the battery percentage (Emulator only).",
4362
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/emulator/power_capacity/",
4222
4363
  parameters: [
4223
4364
  {
4224
- name: "ms",
4365
+ name: "percent",
4225
4366
  type: "number",
4226
- description: "The amount of time, in milliseconds, that time-limited commands are permitted to run",
4367
+ description: "percentage value in range [0, 100]",
4227
4368
  required: true
4228
4369
  }
4229
4370
  ],
4230
4371
  support: {
4231
- ios: {
4232
- XCUITest: "9.3+"
4372
+ android: {
4373
+ UiAutomator: "4.2+"
4233
4374
  }
4234
4375
  }
4235
4376
  }
4236
4377
  },
4237
- "/session/:sessionId/element/:elementId/submit": {
4378
+ "/session/:sessionId/appium/device/power_ac": {
4238
4379
  POST: {
4239
- command: "submit",
4240
- description: "Submit a form element.",
4241
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4242
- variables: [
4380
+ command: "powerAC",
4381
+ description: "Set the state of the battery charger to connected or not (Emulator only).",
4382
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/emulator/power_ac/",
4383
+ parameters: [
4243
4384
  {
4244
- name: "elementId",
4245
- description: "ID of the form element to be submitted"
4385
+ name: "state",
4386
+ type: "string",
4387
+ description: "set the state. on or off",
4388
+ required: true
4246
4389
  }
4247
4390
  ],
4248
- parameters: [],
4249
4391
  support: {
4250
- ios: {
4251
- XCUITest: "9.3+"
4392
+ android: {
4393
+ UiAutomator: "4.2+"
4252
4394
  }
4253
4395
  }
4254
4396
  }
4255
4397
  },
4256
- "/session/:sessionId/element/:elementId/size": {
4257
- GET: {
4258
- command: "getElementSize",
4259
- description: "Determine an element's size in pixels. The size will be returned as a JSON object with `width` and `height` properties.",
4260
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4261
- variables: [
4398
+ "/session/:sessionId/appium/device/gsm_voice": {
4399
+ POST: {
4400
+ command: "gsmVoice",
4401
+ description: "Set GSM voice state (Emulator only).",
4402
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/gsm-voice/",
4403
+ parameters: [
4262
4404
  {
4263
- name: "elementId",
4264
- description: "ID of the element to route the command to"
4405
+ name: "state",
4406
+ type: "string",
4407
+ description: "state of GSM voice - 'unregistered', 'home', 'roaming', 'searching', 'denied', 'off', 'on'",
4408
+ required: true
4265
4409
  }
4266
4410
  ],
4267
- parameters: [],
4268
- returns: {
4269
- type: "Object",
4270
- name: "size",
4271
- description: "The width and height of the element, in pixels."
4272
- },
4273
4411
  support: {
4274
4412
  android: {
4275
4413
  UiAutomator: "4.2+"
4276
- },
4277
- ios: {
4278
- XCUITest: "9.3+"
4279
4414
  }
4280
4415
  }
4281
4416
  }
4282
4417
  },
4283
- "/session/:sessionId/element/:elementId/location": {
4284
- GET: {
4285
- command: "getElementLocation",
4286
- description: "Determine an element's location on the page. The point `(0, 0)` refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with `x` and `y` properties.",
4287
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4288
- variables: [
4418
+ "/session/:sessionId/appium/device/send_sms": {
4419
+ POST: {
4420
+ command: "sendSms",
4421
+ description: "Simulate an SMS message (Emulator only).",
4422
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/network/send-sms/",
4423
+ parameters: [
4289
4424
  {
4290
- name: "elementId",
4291
- description: "ID of the element to route the command to"
4425
+ name: "phoneNumber",
4426
+ type: "string",
4427
+ description: "the phone number to send the SMS too",
4428
+ required: true
4429
+ },
4430
+ {
4431
+ name: "message",
4432
+ type: "string",
4433
+ description: "the SMS message",
4434
+ required: true
4292
4435
  }
4293
4436
  ],
4294
- parameters: [],
4295
- returns: {
4296
- type: "Object",
4297
- name: "location",
4298
- description: "The X and Y coordinates for the element on the page."
4299
- },
4300
4437
  support: {
4301
4438
  android: {
4302
4439
  UiAutomator: "4.2+"
4303
- },
4304
- ios: {
4305
- XCUITest: "9.3+"
4306
4440
  }
4307
4441
  }
4308
4442
  }
4309
4443
  },
4310
- "/session/:sessionId/touch/click": {
4444
+ "/session/:sessionId/appium/device/finger_print": {
4311
4445
  POST: {
4312
- command: "touchClick",
4313
- description: "Single tap on the touch enabled device.",
4314
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4446
+ command: "fingerPrint",
4447
+ description: "Authenticate users by using their finger print scans on supported emulators.",
4448
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/authentication/finger-print/",
4315
4449
  parameters: [
4316
4450
  {
4317
- name: "element",
4318
- type: "string",
4319
- description: "ID of the element to single tap on.",
4451
+ name: "fingerprintId",
4452
+ type: "number",
4453
+ description: "finger prints stored in Android Keystore system (from 1 to 10)",
4320
4454
  required: true
4321
4455
  }
4322
4456
  ],
4323
4457
  support: {
4324
4458
  android: {
4325
4459
  UiAutomator: "4.2+"
4326
- },
4327
- ios: {
4328
- XCUITest: "9.3+"
4329
4460
  }
4330
4461
  }
4331
4462
  }
4332
4463
  },
4333
- "/session/:sessionId/touch/down": {
4464
+ "/session/:sessionId/appium/device/set_clipboard": {
4334
4465
  POST: {
4335
- command: "touchDown",
4336
- description: "Finger down on the screen.",
4337
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4466
+ command: "setClipboard",
4467
+ description: "Set the content of the system clipboard",
4468
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/clipboard/set-clipboard/",
4338
4469
  parameters: [
4339
4470
  {
4340
- name: "x",
4341
- type: "number",
4342
- description: "x coordinate on the screen",
4471
+ name: "content",
4472
+ type: "string",
4473
+ description: "The actual base64 encoded clipboard content",
4343
4474
  required: true
4344
4475
  },
4345
4476
  {
4346
- name: "y",
4347
- type: "number",
4348
- description: "y coordinate on the screen",
4349
- required: true
4477
+ name: "contentType",
4478
+ type: "string",
4479
+ description: "The type of the content to get. Plaintext, Image, URL. Android supports only plaintext",
4480
+ required: false
4481
+ },
4482
+ {
4483
+ name: "label",
4484
+ type: "string",
4485
+ description: "Clipboard data label for Android",
4486
+ required: false
4350
4487
  }
4351
4488
  ],
4489
+ returns: {
4490
+ type: "string",
4491
+ name: "response",
4492
+ description: "Response from Appium server"
4493
+ },
4352
4494
  support: {
4495
+ ios: {
4496
+ XCUITest: "9.3+"
4497
+ },
4353
4498
  android: {
4354
4499
  UiAutomator: "4.2+"
4355
4500
  }
4356
4501
  }
4357
4502
  }
4358
4503
  },
4359
- "/session/:sessionId/touch/up": {
4504
+ "/session/:sessionId/appium/device/get_clipboard": {
4360
4505
  POST: {
4361
- command: "touchUp",
4362
- description: "Finger up on the screen.",
4363
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4506
+ command: "getClipboard",
4507
+ description: "Get the content of the system clipboard",
4508
+ ref: "https://appium.github.io/appium.io/docs/en/commands/device/clipboard/get-clipboard/",
4364
4509
  parameters: [
4365
4510
  {
4366
- name: "x",
4367
- type: "number",
4368
- description: "x coordinate on the screen",
4369
- required: true
4370
- },
4371
- {
4372
- name: "y",
4373
- type: "number",
4374
- description: "y coordinate on the screen",
4375
- required: true
4511
+ name: "contentType",
4512
+ type: "string",
4513
+ description: "The type of the content to get. Plaintext, Image, URL. Android supports only plaintext",
4514
+ required: false
4376
4515
  }
4377
4516
  ],
4517
+ returns: {
4518
+ type: "string",
4519
+ name: "response",
4520
+ description: "Clipboard content as base64-encoded string or an empty string if the clipboard is empty"
4521
+ },
4378
4522
  support: {
4523
+ ios: {
4524
+ XCUITest: "9.3+"
4525
+ },
4379
4526
  android: {
4380
4527
  UiAutomator: "4.2+"
4381
4528
  }
4382
4529
  }
4383
4530
  }
4384
4531
  },
4385
- "/session/:sessionId/touch/move": {
4532
+ "/session/:sessionId/touch/perform": {
4386
4533
  POST: {
4387
- command: "touchMove",
4388
- description: "Finger move on the screen.",
4389
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4534
+ command: "touchPerform",
4535
+ description: "This functionality is only available from within a native context. 'Touch Perform' works similarly to the other singular touch interactions, except that this allows you to chain together more than one touch action as one command. This is useful because Appium commands are sent over the network and there's latency between commands. This latency can make certain touch interactions impossible because some interactions need to be performed in one sequence. Vertical, for example, requires pressing down, moving to a different y coordinate, and then releasing. For it to work, there can't be a delay between the interactions.",
4536
+ ref: "https://appium.github.io/appium.io/docs/en/commands/interactions/touch/touch-perform/",
4390
4537
  parameters: [
4391
4538
  {
4392
- name: "x",
4393
- type: "number",
4394
- description: "x coordinate on the screen",
4395
- required: true
4396
- },
4397
- {
4398
- name: "y",
4399
- type: "number",
4400
- description: "y coordinate on the screen",
4539
+ name: "actions",
4540
+ type: "object[]",
4541
+ description: "The type of action to perform (e.g. moveTo, release, press, tap, wait)",
4401
4542
  required: true
4402
4543
  }
4403
4544
  ],
4545
+ examples: [
4546
+ [
4547
+ "// do a horizontal swipe by percentage",
4548
+ "const startPercentage = 10;",
4549
+ "const endPercentage = 90;",
4550
+ "const anchorPercentage = 50;",
4551
+ "",
4552
+ "const { width, height } = driver.getWindowSize();",
4553
+ "const anchor = height * anchorPercentage / 100;",
4554
+ "const startPoint = width * startPercentage / 100;",
4555
+ "const endPoint = width * endPercentage / 100;",
4556
+ "driver.touchPerform([",
4557
+ " {",
4558
+ " action: 'press',",
4559
+ " options: {",
4560
+ " x: startPoint,",
4561
+ " y: anchor,",
4562
+ " },",
4563
+ " },",
4564
+ " {",
4565
+ " action: 'wait',",
4566
+ " options: {",
4567
+ " ms: 100,",
4568
+ " },",
4569
+ " },",
4570
+ " {",
4571
+ " action: 'moveTo',",
4572
+ " options: {",
4573
+ " x: endPoint,",
4574
+ " y: anchor,",
4575
+ " },",
4576
+ " },",
4577
+ " {",
4578
+ " action: 'release',",
4579
+ " options: {},",
4580
+ " },",
4581
+ "]);"
4582
+ ]
4583
+ ],
4404
4584
  support: {
4405
4585
  android: {
4406
4586
  UiAutomator: "4.2+"
4587
+ },
4588
+ ios: {
4589
+ XCUITest: "9.3+",
4590
+ UIAutomation: "8.0 to 9.3"
4591
+ },
4592
+ windows: {
4593
+ Windows: "10+"
4407
4594
  }
4408
4595
  }
4409
4596
  }
4410
4597
  },
4411
- "/session/:sessionId/touch/longclick": {
4598
+ "/session/:sessionId/touch/multi/perform": {
4412
4599
  POST: {
4413
- command: "touchLongClick",
4414
- description: "Long press on the touch screen using finger motion events.",
4415
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4600
+ command: "multiTouchPerform",
4601
+ description: "This functionality is only available from within a native context. Perform a multi touch action sequence.",
4602
+ ref: "https://appium.github.io/appium.io/docs/en/commands/interactions/touch/multi-touch-perform/",
4416
4603
  parameters: [
4417
4604
  {
4418
- name: "element",
4419
- type: "string",
4420
- description: "ID of the element to long press on",
4605
+ name: "actions",
4606
+ type: "object[]",
4607
+ description: "The type of action to perform (e.g. moveTo, release, press, tap, wait)",
4421
4608
  required: true
4422
4609
  }
4423
4610
  ],
4424
4611
  support: {
4425
4612
  android: {
4426
4613
  UiAutomator: "4.2+"
4614
+ },
4615
+ ios: {
4616
+ XCUITest: "9.3+",
4617
+ UIAutomation: "8.0 to 9.3"
4618
+ },
4619
+ windows: {
4620
+ Windows: "10+"
4427
4621
  }
4428
4622
  }
4429
4623
  }
4430
4624
  },
4431
- "/session/:sessionId/touch/flick": {
4625
+ "/session/:sessionId/appium/execute_driver": {
4432
4626
  POST: {
4433
- command: "touchFlick",
4434
- description: "Flick on the touch screen using finger motion events. This flick command starts at a particular screen location.",
4435
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4627
+ command: "executeDriverScript",
4628
+ description: "This command enables you to specify a WebdriverIO script as a string and transmit it to the Appium server for local execution on the server itself. This approach helps minimize potential latency associated with each command. ***To utilize this command with Appium 2.0, you must have the [`execute-driver-plugin`](https://github.com/appium/appium/tree/master/packages/execute-driver-plugin) plugin installed.***",
4629
+ ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/execute-driver.md",
4436
4630
  parameters: [
4437
4631
  {
4438
- name: "xoffset",
4439
- type: "number",
4440
- description: "the x offset in pixels to flick by",
4441
- required: false
4442
- },
4443
- {
4444
- name: "yoffset",
4445
- type: "number",
4446
- description: "the y offset in pixels to flick by",
4447
- required: false
4448
- },
4449
- {
4450
- name: "element",
4632
+ name: "script",
4451
4633
  type: "string",
4452
- description: "ID of the element where the flick starts",
4453
- required: false
4634
+ description: "The script to execute. It has access to a 'driver' object which represents a WebdriverIO session attached to the current server.",
4635
+ required: true
4454
4636
  },
4455
4637
  {
4456
- name: "speed",
4457
- type: "number",
4458
- description: "the speed in pixels per seconds",
4638
+ name: "type",
4639
+ type: "string",
4640
+ description: "The language/framework used in the script. Currently, only 'webdriverio' is supported and is the default.",
4459
4641
  required: false
4460
4642
  },
4461
4643
  {
4462
- name: "xspeed",
4644
+ name: "timeout",
4463
4645
  type: "number",
4464
- description: "the x speed in pixels per second",
4646
+ description: "The number of milliseconds the script should be allowed to run before being killed by the Appium server. Defaults to the equivalent of 1 hour.",
4465
4647
  required: false
4466
- },
4648
+ }
4649
+ ],
4650
+ returns: {
4651
+ type: "object",
4652
+ name: "result",
4653
+ 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."
4654
+ }
4655
+ }
4656
+ },
4657
+ "/session/:sessionId/appium/events": {
4658
+ POST: {
4659
+ command: "getEvents",
4660
+ description: "Get events stored in appium server.",
4661
+ ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/get-events.md",
4662
+ parameters: [
4467
4663
  {
4468
- name: "yspeed",
4469
- type: "number",
4470
- description: "the y speed in pixels per second",
4471
- required: false
4664
+ name: "type",
4665
+ type: "string[]",
4666
+ description: "Get events which are filtered with the type if the type is provided.",
4667
+ required: true
4472
4668
  }
4473
4669
  ],
4670
+ returns: {
4671
+ type: "object",
4672
+ name: "result",
4673
+ description: "A JSON hash of events like `{'commands' => [{'cmd' => 123455, ....}], 'startTime' => 1572954894127, }`."
4674
+ },
4474
4675
  support: {
4475
4676
  android: {
4476
4677
  UiAutomator: "4.2+"
4678
+ },
4679
+ ios: {
4680
+ XCUITest: "9.3+"
4477
4681
  }
4478
4682
  }
4479
4683
  }
4480
4684
  },
4481
- "/session/:sessionId/orientation": {
4482
- GET: {
4483
- command: "getOrientation",
4484
- description: "Get the current device orientation.",
4485
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4486
- parameters: [],
4487
- returns: {
4488
- type: "String",
4489
- name: "orientation",
4490
- description: "The current orientation corresponding to a value defined in ScreenOrientation: `LANDSCAPE|PORTRAIT`."
4491
- },
4685
+ "/session/:sessionId/appium/log_event": {
4686
+ POST: {
4687
+ command: "logEvent",
4688
+ description: "Store a custom event.",
4689
+ ref: "https://github.com/appium/appium/blob/master/docs/en/commands/session/events/log-event.md",
4690
+ parameters: [
4691
+ {
4692
+ name: "vendor",
4693
+ type: "string",
4694
+ description: "The name of vendor. It will be `vendor` in `vendor:event`.",
4695
+ required: true
4696
+ },
4697
+ {
4698
+ name: "event",
4699
+ type: "string",
4700
+ description: "The name of event. It will be `event` in `vendor:event`.",
4701
+ required: true
4702
+ }
4703
+ ],
4492
4704
  support: {
4493
4705
  android: {
4494
4706
  UiAutomator: "4.2+"
@@ -4497,47 +4709,61 @@ var appium_default = {
4497
4709
  XCUITest: "9.3+"
4498
4710
  }
4499
4711
  }
4500
- },
4712
+ }
4713
+ },
4714
+ "/session/:sessionId/appium/compare_images": {
4501
4715
  POST: {
4502
- command: "setOrientation",
4503
- description: "Set the device orientation",
4504
- ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4716
+ command: "compareImages",
4717
+ description: "This feature conducts image comparisons utilizing the capabilities of the OpenCV framework. Please note that for this functionality to work, both the OpenCV framework and the opencv4nodejs module must be installed on the machine where the Appium server is operational. ***Furthermore, you'll need to have the [`images-plugin`](https://github.com/appium/appium/tree/master/packages/images-plugin) plugin installed to use this feature with Appium 2.0.***",
4718
+ ref: "https://appium.github.io/appium.io/docs/en/writing-running-appium/image-comparison/",
4505
4719
  parameters: [
4506
4720
  {
4507
- name: "orientation",
4721
+ name: "mode",
4508
4722
  type: "string",
4509
- description: "the new browser orientation as defined in ScreenOrientation: `LANDSCAPE|PORTRAIT`",
4723
+ description: "One of possible comparison modes: 'matchFeatures', 'getSimilarity', 'matchTemplate'. 'matchFeatures' is by default.",
4724
+ required: true,
4725
+ default: "matchFeatures"
4726
+ },
4727
+ {
4728
+ name: "firstImage",
4729
+ type: "string",
4730
+ description: "An image data. All image formats, that OpenCV library itself accepts, are supported.",
4510
4731
  required: true
4511
- }
4512
- ],
4513
- support: {
4514
- android: {
4515
- UiAutomator: "4.2+"
4516
4732
  },
4517
- ios: {
4518
- XCUITest: "9.3+"
4733
+ {
4734
+ name: "secondImage",
4735
+ type: "string",
4736
+ description: "An image data. All image formats, that OpenCV library itself accepts, are supported.",
4737
+ required: true
4738
+ },
4739
+ {
4740
+ name: "options",
4741
+ type: "object",
4742
+ description: "The content of this dictionary depends on the actual `mode` value. See the documentation on `appium-support` module for more details. ",
4743
+ required: true,
4744
+ default: {}
4519
4745
  }
4746
+ ],
4747
+ returns: {
4748
+ type: "object",
4749
+ name: "result",
4750
+ description: "The content of the resulting dictionary depends on the actual `mode` and `options` values. See the documentation on `appium-support` module for more details."
4520
4751
  }
4521
4752
  }
4522
4753
  },
4523
- "/session/:sessionId/log": {
4754
+ "/session/:sessionId/timeouts/implicit_wait": {
4524
4755
  POST: {
4525
- command: "getLogs",
4526
- description: "Get the log for a given log type. Log buffer is reset after each request.",
4756
+ command: "implicitWait",
4757
+ description: "Set the amount of time the driver should wait when searching for elements. When searching for a single element, the driver should poll the page until an element is found or the timeout expires, whichever occurs first. When searching for multiple elements, the driver should poll the page until at least one element is found or the timeout expires, at which point it should return an empty list. If this command is never sent, the driver should default to an implicit wait of 0ms.",
4527
4758
  ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4528
4759
  parameters: [
4529
4760
  {
4530
- name: "type",
4531
- type: "string",
4532
- description: "the log type",
4761
+ name: "ms",
4762
+ type: "number",
4763
+ description: "The amount of time, in milliseconds, to wait on an element.",
4533
4764
  required: true
4534
4765
  }
4535
4766
  ],
4536
- returns: {
4537
- type: "Object[]",
4538
- name: "logs",
4539
- description: "The list of log entries."
4540
- },
4541
4767
  support: {
4542
4768
  android: {
4543
4769
  UiAutomator: "4.2+"
@@ -4548,16 +4774,22 @@ var appium_default = {
4548
4774
  }
4549
4775
  }
4550
4776
  },
4551
- "/session/:sessionId/log/types": {
4777
+ "/session/:sessionId/element/:elementId/location_in_view": {
4552
4778
  GET: {
4553
- command: "getLogTypes",
4554
- description: "Get available log types.",
4779
+ command: "getLocationInView",
4780
+ description: "Determine an element's location on the screen once it has been scrolled into view.<br /><br />__Note:__ This is considered an internal command and should only be used to determine an element's location for correctly generating native events.",
4555
4781
  ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4782
+ variables: [
4783
+ {
4784
+ name: "elementId",
4785
+ description: "ID of the element to route the command to"
4786
+ }
4787
+ ],
4556
4788
  parameters: [],
4557
4789
  returns: {
4558
- type: "String[]",
4559
- name: "logTypes",
4560
- description: "The list of available log types."
4790
+ type: "Object",
4791
+ name: "location",
4792
+ description: "The X and Y coordinates for the element on the page."
4561
4793
  },
4562
4794
  support: {
4563
4795
  android: {
@@ -4568,537 +4800,447 @@ var appium_default = {
4568
4800
  }
4569
4801
  }
4570
4802
  }
4571
- }
4572
- };
4573
-
4574
- // src/protocols/chromium.ts
4575
- var chromium_default = {
4576
- "/session/:sessionId/alert": {
4577
- GET: {
4578
- command: "isAlertOpen",
4579
- description: "Whether a simple dialog is currently open.",
4580
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/alert_commands.cc#L42-L49",
4581
- examples: [
4582
- [
4583
- "console.log(browser.isAlertOpen()); // outputs: false",
4584
- "browser.execute('window.alert()');",
4585
- "console.log(browser.isAlertOpen()); // outputs: true"
4586
- ]
4587
- ],
4588
- parameters: [],
4589
- returns: {
4590
- type: "Boolean",
4591
- name: "isAlertOpen",
4592
- description: "`true` or `false` based on whether simple dialog is present or not."
4593
- }
4594
- }
4595
4803
  },
4596
- "/session/:sessionId/autoreport": {
4597
- GET: {
4598
- command: "isAutoReporting",
4599
- description: "Whether it should automatically raises errors on browser logs.",
4600
- ref: "https://codereview.chromium.org/101203012",
4601
- parameters: [],
4602
- returns: {
4603
- type: "Boolean",
4604
- name: "isAutoReporting",
4605
- description: "`true` or `false` based on whether auto reporting is enabled."
4606
- }
4607
- },
4804
+ "/session/:sessionId/keys": {
4608
4805
  POST: {
4609
- command: "setAutoReporting",
4610
- description: "Toggle whether to return response with unknown error with first browser error (e.g. failed to load resource due to 403/404 response) for all subsequent commands (once enabled).",
4611
- ref: "https://codereview.chromium.org/101203012",
4612
- examples: [
4613
- [
4614
- "// Enable auto reporting first thing after session was initiated with empty browser logs",
4615
- "console.log(browser.setAutoReporting(true)); // outputs: null",
4616
- "// Upon requesting an non-existing resource it will abort execution due to thrown unknown error",
4617
- "browser.url('https://webdriver.io/img/404-does-not-exist.png');"
4618
- ],
4619
- [
4620
- "// During the session do some operations which populate the browser logs",
4621
- "browser.url('https://webdriver.io/img/404-does-not-exist.png');",
4622
- "browser.url('https://webdriver.io/403/no-access');",
4623
- "// Enable auto reporting which throws an unknown error for first browser log (404 response)",
4624
- "browser.setAutoReporting(true);"
4625
- ]
4626
- ],
4806
+ command: "sendKeys",
4807
+ description: "Send a sequence of key strokes to the active element",
4808
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4627
4809
  parameters: [
4628
4810
  {
4629
- name: "enabled",
4630
- type: "boolean",
4631
- description: "`true` if auto reporting should be enabled, use `false` to disable previously enabled auto reporting.",
4811
+ name: "value",
4812
+ type: "string[]",
4813
+ description: "The sequence of keys to type. An array must be provided.",
4632
4814
  required: true
4633
4815
  }
4634
4816
  ],
4635
- returns: {
4636
- type: "Object|Null",
4637
- name: "firstBrowserError",
4638
- description: "In case first browser error already occured prior to executing this command it will throw unknown error as response, which is an object with 'message' key describing first browser error. Otherwise it returns `null` on success."
4817
+ support: {
4818
+ android: {
4819
+ UiAutomator: "4.2+"
4820
+ },
4821
+ ios: {
4822
+ XCUITest: "9.3+"
4823
+ }
4639
4824
  }
4640
4825
  }
4641
4826
  },
4642
- "/session/:sessionId/is_loading": {
4827
+ "/session/:sessionId/ime/available_engines": {
4643
4828
  GET: {
4644
- command: "isLoading",
4645
- description: "Determines load status for active window handle.",
4646
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L783-L802",
4647
- examples: [
4648
- [
4649
- "console.log(browser.isLoading()); // outputs: false",
4650
- "browser.newWindow('https://webdriver.io');",
4651
- "console.log(browser.isLoading()); // outputs: true"
4652
- ]
4653
- ],
4829
+ command: "availableIMEEngines",
4830
+ description: "List all available engines on the machine. To use an engine, it has to be present in this list.",
4831
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4654
4832
  parameters: [],
4655
4833
  returns: {
4656
- type: "Boolean",
4657
- name: "isLoading",
4658
- description: "`true` or `false` based on whether active window handle is loading or not."
4834
+ type: "String[]",
4835
+ name: "engines",
4836
+ description: "A list of available engines"
4837
+ },
4838
+ support: {
4839
+ android: {
4840
+ UiAutomator: "4.2+"
4841
+ }
4659
4842
  }
4660
4843
  }
4661
4844
  },
4662
- "/session/:sessionId/chromium/heap_snapshot": {
4845
+ "/session/:sessionId/ime/active_engine": {
4663
4846
  GET: {
4664
- command: "takeHeapSnapshot",
4665
- description: "Takes a heap snapshot of the current execution context.",
4666
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/chrome/web_view.h#L198-L202",
4847
+ command: "getActiveIMEEngine",
4848
+ description: "Get the name of the active IME engine. The name string is platform specific.",
4849
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4667
4850
  parameters: [],
4668
4851
  returns: {
4669
- type: "Object",
4670
- name: "heapSnapshot",
4671
- description: "A JSON representation of the heap snapshot. Which can be inspected by loading as file into Chrome DevTools."
4852
+ type: "String",
4853
+ name: "engine",
4854
+ description: "The name of the active IME engine"
4855
+ },
4856
+ support: {
4857
+ android: {
4858
+ UiAutomator: "4.2+"
4859
+ }
4672
4860
  }
4673
4861
  }
4674
4862
  },
4675
- "/session/:sessionId/network_connection": {
4863
+ "/session/:sessionId/ime/activated": {
4676
4864
  GET: {
4677
- command: "getNetworkConnection",
4678
- description: "Get the connection type for network emulation. This command is only applicable when remote end replies with `networkConnectionEnabled` capability set to `true`.",
4679
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes",
4680
- examples: [
4681
- [
4682
- "const browser = remote({",
4683
- " capabilities: {",
4684
- " browserName: 'chrome',",
4685
- " 'goog:chromeOptions': {",
4686
- " // Network emulation requires device mode, which is only enabled when mobile emulation is on",
4687
- " mobileEmulation: { deviceName: 'iPad' },",
4688
- " },",
4689
- " }",
4690
- "});",
4691
- "console.log(browser.getNetworkConnection()); // outputs: 6 (Both Wi-Fi and data)"
4692
- ]
4693
- ],
4865
+ command: "isIMEActivated",
4866
+ description: "Indicates whether IME input is active at the moment",
4867
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4694
4868
  parameters: [],
4695
4869
  returns: {
4696
- type: "Number",
4697
- name: "connectionType",
4698
- description: "A bitmask to represent the network connection type. Airplane Mode (`1`), Wi-Fi only (`2`), Wi-Fi and data (`6`), 4G (`8`), 3G (`10`), 2G (`20`). By default [Wi-Fi and data are enabled](https://github.com/bayandin/chromedriver/blob/v2.45/chrome/chrome_desktop_impl.cc#L36-L37)."
4699
- }
4700
- },
4701
- POST: {
4702
- command: "setNetworkConnection",
4703
- description: "Change connection type for network connection. This command is only applicable when remote end replies with `networkConnectionEnabled` capability set to `true`.",
4704
- ref: "https://github.com/SeleniumHQ/mobile-spec/blob/master/spec-draft.md#device-modes",
4705
- examples: [
4706
- [
4707
- "const browser = remote({",
4708
- " capabilities: {",
4709
- " browserName: 'chrome',",
4710
- " 'goog:chromeOptions': {",
4711
- " // Network emulation requires device mode, which is only enabled when mobile emulation is on",
4712
- " mobileEmulation: { deviceName: 'iPad' },",
4713
- " },",
4714
- " }",
4715
- "});",
4716
- "console.log(browser.setNetworkConnection({ type: 1 })); // outputs: 1 (Airplane Mode)"
4717
- ]
4718
- ],
4719
- parameters: [
4720
- {
4721
- name: "parameters",
4722
- type: "object",
4723
- description: "Object containing ConnectionType, set bitmask as value for `type` key in object. Airplane Mode (`1`), Wi-Fi only (`2`), Wi-Fi and data (`6`), 4G (`8`), 3G (`10`), 2G (`20`).",
4724
- required: true
4870
+ type: "Boolean",
4871
+ name: "isActive",
4872
+ description: "true if IME input is available and currently active, false otherwise"
4873
+ },
4874
+ support: {
4875
+ android: {
4876
+ UiAutomator: "4.2+"
4725
4877
  }
4726
- ],
4727
- returns: {
4728
- type: "Number",
4729
- name: "connectionType",
4730
- description: "A bitmask to represent the network connection type. Value should match specified `type` in object, however device might not be capable of the network connection type requested."
4731
4878
  }
4732
4879
  }
4733
4880
  },
4734
- "/session/:sessionId/chromium/network_conditions": {
4735
- GET: {
4736
- command: "getNetworkConditions",
4737
- description: "Get current network conditions used for emulation.",
4738
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L839-L859",
4739
- parameters: [],
4740
- returns: {
4741
- type: "Object",
4742
- name: "networkConditions",
4743
- description: "Object containing network conditions for `offline`, `latency`, `download_throughput` and `upload_throughput`. Network conditions must be set before it can be retrieved."
4744
- }
4745
- },
4881
+ "/session/:sessionId/ime/deactivate": {
4746
4882
  POST: {
4747
- command: "setNetworkConditions",
4748
- description: "Set network conditions used for emulation by throttling connection.",
4749
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1663-L1722",
4750
- examples: [
4751
- [
4752
- "// Use different download (25kb/s) and upload (50kb/s) throughput values for throttling with a latency of 1000ms",
4753
- "browser.setNetworkConditions({ latency: 1000, download_throughput: 25600, upload_throughput: 51200 });"
4754
- ],
4755
- [
4756
- "// Force disconnected from network by setting 'offline' to true",
4757
- "browser.setNetworkConditions({ latency: 0, throughput: 0, offline: true });"
4758
- ],
4759
- [
4760
- "// When preset name (e.g. 'DSL') is specified it does not respect values in object (e.g. 'offline')",
4761
- "browser.setNetworkConditions({ latency: 0, throughput: 0, offline: true }, 'DSL');"
4762
- ],
4763
- [
4764
- "// Best practice for specifying network throttling preset is to use an empty object",
4765
- "browser.setNetworkConditions({}, 'Good 3G');"
4766
- ]
4767
- ],
4768
- parameters: [
4769
- {
4770
- name: "network_conditions",
4771
- type: "object",
4772
- description: "Object containing network conditions which are `latency`, `throughput` (or `download_throughput`/`upload_throughput`) and `offline` (optional).",
4773
- required: true
4774
- },
4775
- {
4776
- name: "network_name",
4777
- type: "string",
4778
- description: "Name of [network throttling preset](https://github.com/bayandin/chromedriver/blob/v2.45/chrome/network_list.cc#L12-L25). `GPRS`, `Regular 2G`, `Good 2G`, `Regular 3G`, `Good 3G`, `Regular 4G`, `DSL`, `WiFi` or `No throttling` to disable. When preset is specified values passed in first argument are not respected.",
4779
- required: false
4883
+ command: "deactivateIMEEngine",
4884
+ description: "De-activates the currently-active IME engine.",
4885
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4886
+ parameters: [],
4887
+ support: {
4888
+ android: {
4889
+ UiAutomator: "4.2+"
4780
4890
  }
4781
- ]
4782
- },
4783
- DELETE: {
4784
- command: "deleteNetworkConditions",
4785
- description: "Disable any network throttling which might have been set. Equivalent of setting the `No throttling` preset.",
4786
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1724-L1745",
4787
- parameters: []
4891
+ }
4788
4892
  }
4789
4893
  },
4790
- "/session/:sessionId/chromium/send_command": {
4894
+ "/session/:sessionId/ime/activate": {
4791
4895
  POST: {
4792
- command: "sendCommand",
4793
- description: "Send a command to the DevTools debugger.<br />For a list of available commands and their parameters refer to the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).",
4794
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1290-L1304",
4896
+ command: "activateIMEEngine",
4897
+ description: "Make an engines that is available",
4898
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4795
4899
  parameters: [
4796
4900
  {
4797
- name: "cmd",
4901
+ name: "engine",
4798
4902
  type: "string",
4799
- description: "Name of the command (e.g. [`Browser.close`](https://chromedevtools.github.io/devtools-protocol/1-3/Browser#method-close)).",
4800
- required: true
4801
- },
4802
- {
4803
- name: "params",
4804
- type: "object",
4805
- description: "Parameters to the command. In case no parameters for command, specify an empty object.",
4903
+ description: "name of the engine to activate",
4806
4904
  required: true
4807
4905
  }
4808
- ]
4906
+ ],
4907
+ support: {
4908
+ android: {
4909
+ UiAutomator: "4.2+"
4910
+ }
4911
+ }
4809
4912
  }
4810
4913
  },
4811
- "/session/:sessionId/chromium/send_command_and_get_result": {
4914
+ "/session/:sessionId/timeouts/async_script": {
4812
4915
  POST: {
4813
- command: "sendCommandAndGetResult",
4814
- description: "Send a command to the DevTools debugger and wait for the result.<br />For a list of available commands and their parameters refer to the [Chrome DevTools Protocol Viewer](https://chromedevtools.github.io/devtools-protocol/).",
4815
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L1306-L1320",
4916
+ command: "asyncScriptTimeout",
4917
+ description: "Set the amount of time, in milliseconds, that asynchronous scripts executed by `/session/:sessionId/execute_async` are permitted to run before they are aborted and a `Timeout` error is returned to the client.",
4918
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4816
4919
  parameters: [
4817
4920
  {
4818
- name: "cmd",
4819
- type: "string",
4820
- description: "Name of the command which returns a result (e.g. [`Network.getAllCookies`](https://chromedevtools.github.io/devtools-protocol/1-3/Network#method-getAllCookies)).",
4821
- required: true
4822
- },
4823
- {
4824
- name: "params",
4825
- type: "object",
4826
- description: "Parameters to the command. In case no parameters for command, specify an empty object.",
4921
+ name: "ms",
4922
+ type: "number",
4923
+ description: "The amount of time, in milliseconds, that time-limited commands are permitted to run",
4827
4924
  required: true
4828
4925
  }
4829
4926
  ],
4830
- returns: {
4831
- type: "*",
4832
- name: "result",
4833
- description: "Either the return value of your command, or the error which was the reason for your command's failure."
4927
+ support: {
4928
+ ios: {
4929
+ XCUITest: "9.3+"
4930
+ }
4834
4931
  }
4835
4932
  }
4836
4933
  },
4837
- "/session/:sessionId/file": {
4934
+ "/session/:sessionId/element/:elementId/submit": {
4838
4935
  POST: {
4839
- command: "file",
4840
- description: "Upload a file to remote machine on which the browser is running.",
4841
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L1037-L1065",
4842
- parameters: [
4936
+ command: "submit",
4937
+ description: "Submit a form element.",
4938
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4939
+ variables: [
4843
4940
  {
4844
- name: "file",
4845
- type: "string",
4846
- 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.",
4847
- required: true
4941
+ name: "elementId",
4942
+ description: "ID of the form element to be submitted"
4848
4943
  }
4849
4944
  ],
4850
- returns: {
4851
- type: "String",
4852
- name: "path",
4853
- description: "Absolute path of uploaded file on remote machine."
4945
+ parameters: [],
4946
+ support: {
4947
+ ios: {
4948
+ XCUITest: "9.3+"
4949
+ }
4854
4950
  }
4855
4951
  }
4856
4952
  },
4857
- "/session/:sessionId/chromium/launch_app": {
4858
- POST: {
4859
- command: "launchChromeApp",
4860
- description: "Launches a Chrome app by specified id.",
4861
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L521-L539",
4862
- examples: [
4863
- [
4864
- "import fs from 'fs'",
4865
- "const browser = remote({",
4866
- " capabilities: {",
4867
- " browserName: 'chrome',",
4868
- " 'goog:chromeOptions': {",
4869
- " // Install upon starting browser in order to launch it",
4870
- " extensions: [",
4871
- " // Entry should be a base64-encoded packed Chrome app (.crx)",
4872
- " fs.readFileSync('/absolute/path/app.crx').toString('base64')",
4873
- " ]",
4874
- " }",
4875
- " }",
4876
- "});",
4877
- "browser.launchChromeApp('aohghmighlieiainnegkcijnfilokake')); // Google Docs (https://chrome.google.com/webstore/detail/docs/aohghmighlieiainnegkcijnfilokake)"
4878
- ]
4879
- ],
4880
- parameters: [
4953
+ "/session/:sessionId/element/:elementId/size": {
4954
+ GET: {
4955
+ command: "getElementSize",
4956
+ description: "Determine an element's size in pixels. The size will be returned as a JSON object with `width` and `height` properties.",
4957
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4958
+ variables: [
4881
4959
  {
4882
- name: "id",
4883
- type: "string",
4884
- description: "Extension id of app to be launched, as defined in chrome://extensions.",
4885
- required: true
4960
+ name: "elementId",
4961
+ description: "ID of the element to route the command to"
4886
4962
  }
4887
- ]
4963
+ ],
4964
+ parameters: [],
4965
+ returns: {
4966
+ type: "Object",
4967
+ name: "size",
4968
+ description: "The width and height of the element, in pixels."
4969
+ },
4970
+ support: {
4971
+ android: {
4972
+ UiAutomator: "4.2+"
4973
+ },
4974
+ ios: {
4975
+ XCUITest: "9.3+"
4976
+ }
4977
+ }
4888
4978
  }
4889
4979
  },
4890
- "/session/:sessionId/element/:elementId/value": {
4980
+ "/session/:sessionId/element/:elementId/location": {
4891
4981
  GET: {
4892
- command: "getElementValue",
4893
- description: "Retrieves the value of a given form control element.",
4894
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/element_commands.cc#L431-L443",
4982
+ command: "getElementLocation",
4983
+ description: "Determine an element's location on the page. The point `(0, 0)` refers to the upper-left corner of the page. The element's coordinates are returned as a JSON object with `x` and `y` properties.",
4984
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4895
4985
  variables: [
4896
4986
  {
4897
4987
  name: "elementId",
4898
- description: "id of element to get value from"
4988
+ description: "ID of the element to route the command to"
4899
4989
  }
4900
4990
  ],
4901
4991
  parameters: [],
4902
4992
  returns: {
4903
- type: "String|Null",
4904
- name: "value",
4905
- description: "Current value of the element. In case specified element is not a form control element, it will return `null`."
4993
+ type: "Object",
4994
+ name: "location",
4995
+ description: "The X and Y coordinates for the element on the page."
4996
+ },
4997
+ support: {
4998
+ android: {
4999
+ UiAutomator: "4.2+"
5000
+ },
5001
+ ios: {
5002
+ XCUITest: "9.3+"
5003
+ }
4906
5004
  }
4907
5005
  }
4908
5006
  },
4909
- "/session/:sessionId/element/:elementId/hover": {
5007
+ "/session/:sessionId/touch/click": {
4910
5008
  POST: {
4911
- command: "elementHover",
4912
- description: "Enable hover state for an element, which is reset upon next interaction.",
4913
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/element_commands.cc#L126-L146",
4914
- variables: [
5009
+ command: "touchClick",
5010
+ description: "Single tap on the touch enabled device.",
5011
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5012
+ parameters: [
5013
+ {
5014
+ name: "element",
5015
+ type: "string",
5016
+ description: "ID of the element to single tap on.",
5017
+ required: true
5018
+ }
5019
+ ],
5020
+ support: {
5021
+ android: {
5022
+ UiAutomator: "4.2+"
5023
+ },
5024
+ ios: {
5025
+ XCUITest: "9.3+"
5026
+ }
5027
+ }
5028
+ }
5029
+ },
5030
+ "/session/:sessionId/touch/down": {
5031
+ POST: {
5032
+ command: "touchDown",
5033
+ description: "Finger down on the screen.",
5034
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5035
+ parameters: [
5036
+ {
5037
+ name: "x",
5038
+ type: "number",
5039
+ description: "x coordinate on the screen",
5040
+ required: true
5041
+ },
4915
5042
  {
4916
- name: "elementId",
4917
- description: "id of element to hover over to"
5043
+ name: "y",
5044
+ type: "number",
5045
+ description: "y coordinate on the screen",
5046
+ required: true
4918
5047
  }
4919
5048
  ],
4920
- parameters: []
5049
+ support: {
5050
+ android: {
5051
+ UiAutomator: "4.2+"
5052
+ }
5053
+ }
4921
5054
  }
4922
5055
  },
4923
- "/session/:sessionId/touch/pinch": {
5056
+ "/session/:sessionId/touch/up": {
4924
5057
  POST: {
4925
- command: "touchPinch",
4926
- description: "Trigger a pinch zoom effect.",
4927
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L813-L827",
5058
+ command: "touchUp",
5059
+ description: "Finger up on the screen.",
5060
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4928
5061
  parameters: [
4929
5062
  {
4930
5063
  name: "x",
4931
5064
  type: "number",
4932
- description: "x position to pinch on",
5065
+ description: "x coordinate on the screen",
4933
5066
  required: true
4934
5067
  },
4935
5068
  {
4936
5069
  name: "y",
4937
5070
  type: "number",
4938
- description: "y position to pinch on",
5071
+ description: "y coordinate on the screen",
5072
+ required: true
5073
+ }
5074
+ ],
5075
+ support: {
5076
+ android: {
5077
+ UiAutomator: "4.2+"
5078
+ }
5079
+ }
5080
+ }
5081
+ },
5082
+ "/session/:sessionId/touch/move": {
5083
+ POST: {
5084
+ command: "touchMove",
5085
+ description: "Finger move on the screen.",
5086
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5087
+ parameters: [
5088
+ {
5089
+ name: "x",
5090
+ type: "number",
5091
+ description: "x coordinate on the screen",
4939
5092
  required: true
4940
5093
  },
4941
5094
  {
4942
- name: "scale",
5095
+ name: "y",
4943
5096
  type: "number",
4944
- description: "pinch zoom scale",
5097
+ description: "y coordinate on the screen",
4945
5098
  required: true
4946
5099
  }
4947
- ]
4948
- }
4949
- },
4950
- "/session/:sessionId/goog/page/freeze": {
4951
- POST: {
4952
- command: "freeze",
4953
- description: "Freeze the current page. Extension for [Page Lifecycle API](https://developers.google.com/web/updates/2018/07/page-lifecycle-api).",
4954
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L625-L633",
4955
- parameters: []
4956
- }
4957
- },
4958
- "/session/:sessionId/goog/page/resume": {
4959
- POST: {
4960
- command: "resume",
4961
- description: "Resume the current page. Extension for [Page Lifecycle API](https://developers.google.com/web/updates/2018/07/page-lifecycle-api).",
4962
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/window_commands.cc#L635-L645",
4963
- parameters: []
4964
- }
4965
- },
4966
- "/session/:sessionId/goog/cast/get_sinks": {
4967
- GET: {
4968
- command: "getCastSinks",
4969
- description: "Returns the list of cast sinks (Cast devices) available to the Chrome media router.",
4970
- ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#748",
4971
- parameters: [],
4972
- returns: {
4973
- type: "string[]",
4974
- name: "sinks",
4975
- description: "List of available sinks."
5100
+ ],
5101
+ support: {
5102
+ android: {
5103
+ UiAutomator: "4.2+"
5104
+ }
4976
5105
  }
4977
5106
  }
4978
5107
  },
4979
- "/session/:sessionId/goog/cast/set_sink_to_use": {
5108
+ "/session/:sessionId/touch/longclick": {
4980
5109
  POST: {
4981
- command: "selectCastSink",
4982
- description: "Selects a cast sink (Cast device) as the recipient of media router intents (connect or play).",
4983
- ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#737",
5110
+ command: "touchLongClick",
5111
+ description: "Long press on the touch screen using finger motion events.",
5112
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4984
5113
  parameters: [
4985
5114
  {
4986
- name: "sinkName",
5115
+ name: "element",
4987
5116
  type: "string",
4988
- description: "The name of the target device.",
5117
+ description: "ID of the element to long press on",
4989
5118
  required: true
4990
5119
  }
4991
- ]
5120
+ ],
5121
+ support: {
5122
+ android: {
5123
+ UiAutomator: "4.2+"
5124
+ }
5125
+ }
4992
5126
  }
4993
5127
  },
4994
- "/session/:sessionId/goog/cast/start_tab_mirroring": {
5128
+ "/session/:sessionId/touch/flick": {
4995
5129
  POST: {
4996
- command: "startCastTabMirroring",
4997
- description: "Initiates tab mirroring for the current browser tab on the specified device.",
4998
- ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#741",
5130
+ command: "touchFlick",
5131
+ description: "Flick on the touch screen using finger motion events. This flick command starts at a particular screen location.",
5132
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
4999
5133
  parameters: [
5000
5134
  {
5001
- name: "sinkName",
5135
+ name: "xoffset",
5136
+ type: "number",
5137
+ description: "the x offset in pixels to flick by",
5138
+ required: false
5139
+ },
5140
+ {
5141
+ name: "yoffset",
5142
+ type: "number",
5143
+ description: "the y offset in pixels to flick by",
5144
+ required: false
5145
+ },
5146
+ {
5147
+ name: "element",
5002
5148
  type: "string",
5003
- description: "The name of the target device.",
5004
- required: true
5149
+ description: "ID of the element where the flick starts",
5150
+ required: false
5151
+ },
5152
+ {
5153
+ name: "speed",
5154
+ type: "number",
5155
+ description: "the speed in pixels per seconds",
5156
+ required: false
5157
+ },
5158
+ {
5159
+ name: "xspeed",
5160
+ type: "number",
5161
+ description: "the x speed in pixels per second",
5162
+ required: false
5163
+ },
5164
+ {
5165
+ name: "yspeed",
5166
+ type: "number",
5167
+ description: "the y speed in pixels per second",
5168
+ required: false
5005
5169
  }
5006
- ]
5170
+ ],
5171
+ support: {
5172
+ android: {
5173
+ UiAutomator: "4.2+"
5174
+ }
5175
+ }
5007
5176
  }
5008
5177
  },
5009
- "/session/:sessionId/goog/cast/get_issue_message": {
5178
+ "/session/:sessionId/orientation": {
5010
5179
  GET: {
5011
- command: "getCastIssueMessage",
5012
- description: "Returns error message if there is any issue in a Cast session.",
5013
- ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#751",
5180
+ command: "getOrientation",
5181
+ description: "Get the current device orientation.",
5182
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5014
5183
  parameters: [],
5015
5184
  returns: {
5016
5185
  type: "String",
5017
- name: "message",
5018
- description: "Error message, if any."
5186
+ name: "orientation",
5187
+ description: "The current orientation corresponding to a value defined in ScreenOrientation: `LANDSCAPE|PORTRAIT`."
5188
+ },
5189
+ support: {
5190
+ android: {
5191
+ UiAutomator: "4.2+"
5192
+ },
5193
+ ios: {
5194
+ XCUITest: "9.3+"
5195
+ }
5019
5196
  }
5020
- }
5021
- },
5022
- "/session/:sessionId/goog/cast/stop_casting": {
5197
+ },
5023
5198
  POST: {
5024
- command: "stopCasting",
5025
- description: "Stops casting from media router to the specified device, if connected.",
5026
- ref: "https://chromium.googlesource.com/chromium/src/+/refs/tags/73.0.3683.121/chrome/test/chromedriver/server/http_handler.cc#744",
5199
+ command: "setOrientation",
5200
+ description: "Set the device orientation",
5201
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5027
5202
  parameters: [
5028
5203
  {
5029
- name: "sinkName",
5204
+ name: "orientation",
5030
5205
  type: "string",
5031
- description: "The name of the target device.",
5206
+ description: "the new browser orientation as defined in ScreenOrientation: `LANDSCAPE|PORTRAIT`",
5032
5207
  required: true
5033
5208
  }
5034
- ]
5035
- }
5036
- },
5037
- "/shutdown": {
5038
- POST: {
5039
- command: "shutdown",
5040
- description: "Shutdown ChromeDriver process and consequently terminating all active sessions.",
5041
- ref: "https://github.com/bayandin/chromedriver/blob/v2.45/session_commands.cc#L489-L498",
5042
- parameters: []
5043
- }
5044
- },
5045
- "/session/:sessionId/element/:elementId/screenshot": {
5046
- GET: {
5047
- command: "takeElementScreenshot",
5048
- description: "The Take Element Screenshot command takes a screenshot of the visible region encompassed by the bounding rectangle of an element.",
5049
- ref: "https://w3c.github.io/webdriver/#dfn-take-element-screenshot",
5050
- variables: [
5051
- {
5052
- name: "elementId",
5053
- description: "the id of an element returned in a previous call to Find Element(s)"
5054
- }
5055
5209
  ],
5056
- parameters: [
5057
- {
5058
- name: "scroll",
5059
- type: "boolean",
5060
- description: "scroll into view the element. Default: true",
5061
- required: false
5210
+ support: {
5211
+ android: {
5212
+ UiAutomator: "4.2+"
5213
+ },
5214
+ ios: {
5215
+ XCUITest: "9.3+"
5062
5216
  }
5063
- ],
5064
- returns: {
5065
- type: "String",
5066
- name: "screenshot",
5067
- description: "The base64-encoded PNG image data comprising the screenshot of the visible region of an element\u2019s bounding rectangle after it has been scrolled into view."
5068
5217
  }
5069
5218
  }
5070
5219
  },
5071
- "/session/:sessionId/se/log/types": {
5220
+ "/session/:sessionId/location": {
5072
5221
  GET: {
5073
- command: "getLogTypes",
5074
- description: "Get available log types.",
5075
- ref: "https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlogtypes",
5222
+ command: "getGeoLocation",
5223
+ description: "Get the current geo location.",
5224
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5076
5225
  parameters: [],
5077
5226
  returns: {
5078
- type: "String[]",
5079
- name: "logTypes",
5080
- description: "The list of available log types, example: browser, driver."
5227
+ type: "Object",
5228
+ name: "location",
5229
+ description: "The current geo location."
5081
5230
  }
5082
- }
5083
- },
5084
- "/session/:sessionId/se/log": {
5231
+ },
5085
5232
  POST: {
5086
- command: "getLogs",
5087
- description: "Get the log for a given log type. Log buffer is reset after each request.",
5088
- ref: "https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#sessionsessionidlog",
5233
+ command: "setGeoLocation",
5234
+ description: "Set the current geo location.",
5235
+ ref: "https://github.com/appium/appium/blob/master/packages/base-driver/docs/mjsonwp/protocol-methods.md#webdriver-endpoints",
5089
5236
  parameters: [
5090
5237
  {
5091
- name: "type",
5092
- type: "string",
5093
- description: "the log type",
5238
+ name: "location",
5239
+ type: "object",
5240
+ description: "the new location (`{latitude: number, longitude: number, altitude: number}`)",
5094
5241
  required: true
5095
5242
  }
5096
- ],
5097
- returns: {
5098
- type: "Object[]",
5099
- name: "logs",
5100
- description: "The list of log entries."
5101
- }
5243
+ ]
5102
5244
  }
5103
5245
  }
5104
5246
  };