Appium-Set Orientation(设置定位)

爱被打了一巴掌 2022-11-17 10:20 254阅读 0赞

Set Orientation

          • Example Usage
          • Support
            • Appium Server
            • Appium Clients
          • HTTP API Specifications
            • Endpoint
            • URL Parameters
            • JSON Parameters
            • Response

Set the current device/browser orientation

Example Usage

































Java driver.rotate(ScreenOrientation.LANDSCAPE);
Python driver.orientation =“LANDSCAPE”
Javascript // webdriver.io example
driver.setOrientation(“LANDSCAPE”);
// wd example
await driver.setOrientation(‘LANDSCAPE’);
Ruby # ruby_lib example
rotation = :landscape
# ruby_lib_core example
@driver.rotation = :landscape
C# driver.Orientation = ScreenOrientation.Landscape;
PHP // TODO PHP sample
Support
Appium Server

详见

Appium Clients

详见

HTTP API Specifications
Endpoint

POST /session/:session_id/orientation

URL Parameters













name description
session_id ID of the session to route the command to
JSON Parameters















name type description
orientation string The desired orientation - {LANDSCAPE
Response

Null

发表评论

表情:
评论列表 (有 0 条评论,254人围观)

还没有评论,来说两句吧...

相关阅读

    相关 HTML5: Screen Orientation API

    媒体查询允许网站根据智能手机和平板的方向来调整布局。但有时候你希网站锁定到一个特定的方向,横屏或竖屏,此时,原生应用的格式是可以被指定的。APP只在预设格式下显示—独立于实际的