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