Appium-Execute Mobile Command(执行移动命令)

目录

          • Execute Mobile Command
          • Example Usage
          • Description
          • Android
            • UiAutomator2
            • Espresso
          • IOS
            • XCUITest
          • Support
            • Appium Server
            • Appium Clients
          • HTTP API Specifications
            • Endpoint
            • URL Parameters
            • JSON Parameters
            • Response

Execute Mobile Command

Execute a native mobile command //执行本机移动命令

Example Usage
Java driver.executeScript("mobile: scroll", ImmutableMap.of("direction", "down"));
Python self.driver.execute_script("mobile: scroll", {'direction': 'down'})
Javascript // webdriver.io example
var result = browser.execute('mobile: scroll', {direction:'down'})
// wd example
await driver.execute('mobile: scroll', {direction: 'down'});
Ruby # ruby_lib examp
leexecute_script("mobile: scroll", { "direction" => "down"})
# ruby_lib_core example
@driver.execute_script("mobile: scroll", { "direction"=>"down"})
C# driver.ExecuteScript("mobile:scroll", new Dictionary { { "direction", "down" } });
PHP // TODO PHP sample
Description

执行与特定端点无关的各种本机移动命令
语法是execute(“mobile:”,(有关语法的详细信息,请参阅execute Script)

Android
UiAutomator2

请参阅UiAutomator2驱动程序存储库中的移动命令部分

Espresso

请参阅Espresso驱动程序存储库中的移动命令部分。

IOS
XCUITest

请参阅xguitest驱动程序存储库中的移动命令部分。

Support
Appium Server
Platform Driver Platform Versions Appium Version Driver Version
iOS XCUITest 9.3+ 1.6.0+ All
UIAutomation 8.0 to 9.3 All All
Android Espresso ?+ 1.9.0+ All
UiAutomator2 ?+ 1.6.0 All
UiAutomator 4.3+ All All
Mac Mac ?+ 1.6.4+ All
Windows Windows 10+ 1.6.0+ All
Appium Clients
Language Support Documentation
Java All javadoc.io
Python All selenium-python.readthedocs.io
Javascript(WebdriverIO) All
Javascript(WD) All github.com
Ruby All www.rubydoc.info
PHP All github.com
C# All github.com
HTTP API Specifications
Endpoint

POST /session/:session_id/execute

URL Parameters
name description
session_id ID of the session to route the command to
JSON Parameters
name type description
script string The mobile command to execute
args array The JSON serializable arguments
Response

The command result (any)

你可能感兴趣的:(Appium,驱动程序,ddk,cordova,cmd,ruby)