appium
Version:
Automation for Apps.
75 lines (67 loc) • 2.09 kB
YAML
name: Set Orientation
short_description: Set the current device/browser orientation
example_usage:
java:
|
driver.rotate(ScreenOrientation.LANDSCAPE);
python:
|
driver.orientation = "LANDSCAPE"
javascript_wd:
|
await driver.setOrientation();
javascript_wdio:
|
driver.orientation("LANDSCAPE");
ruby:
|
@driver.rotation = :landscape
php:
|
// TODO PHP sample
csharp:
|
// TODO C# sample
client_docs:
java: "https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/Rotatable.html#rotate-org.openqa.selenium.DeviceRotation-"
python: "http://selenium-python.readthedocs.io/api.html#selenium.webdriver.remote.webdriver.WebDriver.orientation"
javascript_wdio: "http://webdriver.io/api/mobile/orientation.html"
javascript_wd: "https://github.com/admc/wd/blob/master/lib/commands.js#L2035"
ruby: "http://www.rubydoc.info/gems/selenium-webdriver/Selenium/WebDriver/DriverExtensions/Rotatable:orientation"
php: "https://github.com/appium/php-client/" # TODO PHP documentation link
csharp: "https://github.com/appium/appium-dotnet-driver/" # TODO Dotnet documentation link
# Driver support by platform
driver_support:
ios:
xcuitest: true
uiautomation: true
android:
uiautomator2: true
uiautomator: true
mac:
mac: false # TODO Confirm this
windows:
windows: true # TODO Confirm this
client_support:
java: true
python: true
ruby: true
php: true
csharp: true
javascript_wd: true
javascript_wdio: true
# Information about the HTTP endpoints
endpoint:
url: /session/:session_id/orientation
method: POST
url_parameters:
- name: session_id
description: ID of the session to route the command to
json_parameters:
- name: orientation
type: string
description: The desired orientation - {LANDSCAPE|PORTRAIT}.
# Links to specifications. Should link to at least one specification
specifications:
jsonwp: https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#post-sessionsessionidorientation