Appium-Get Orientation(获取定位)
Get Orientation
- Example Usage
- Support
- Appium Server
- Appium Clients
- HTTP API Specifications
- Endpoint
- URL Parameters
- JSON Parameters
- Response
Get the current device/browser orientation //获取当前设备/浏览器方向
Example Usage
Java | ScreenOrientation orientation = driver.getOrientation(); |
Python | orientation = self.driver.orientation |
Javascript | // webdriver.io example let orientation = driver.getOrientation(); // wd example let orientation = await driver.getOrientation(); |
Ruby | # ruby_lib example orientation # ruby_lib_core example @driver.orientation |
C# | ScreenOrientation orientation = driver.Orientation; |
PHP | // TODO PHP sample |
Support
Appium Server
详见
Appium Clients
详见
HTTP API Specifications
Endpoint
GET /session/:session_id/orientation
URL Parameters
name | description |
---|---|
session_id | ID of the session to route the command to |
JSON Parameters
None
Response
The current browser orientation {LANDSCAPE|PORTRAIT} (string) //当前浏览器方向{横向|纵向}(字符串)
还没有评论,来说两句吧...