SeeTest Client - Landscape And Portrait
Please note that this tool is classified as a Legacy tool. We recommend transitioning to our updated solutions to maintain optimal performance and security in your workflows. For more information on this matter, please reach out to technical support .
Description
You can toggle the orientation of the device reflection by using the key events for Landscape/Portrait.
Android version must be 4.1 or above when using non-instrumented applications.
Usage
Scenario: In the following example We will toggle orientation on an android device to landscape mode by sending the text '{Landscape}'.
Afterwards we will toggle orientation back to portrait by using the key event of '{Portrait}'.
Step 1: deviceAction("Landscape")

Step 2: Orientation is now landscape on the real physical device:

Step 3: deviceAction("Portrait")

Step 4: Rotate the real physical device back to portrait mode:

Advanced configuration:
Some devices will require advanced configuration in order to toggle orientation properly. For those, you can use the following with the SendTest comamnd:
- For landscape orientation use:
{LANDSCAPE_0}, {LANDSCAPE_90}, {LANDSCAPE_180}, {LANDSCAPE_270}to control the orientation and its direction - For portrait orientation use:
{PORTRAIT_0}, {PORTRAIT_90}, {PORTRAIT_180}, {PORTRAIT_270}
For example:
{LANDSCAPE_90}is actually{PORTRAIT_0}{PORTRAIT_180}is actually the device upside down
Code Examples
Java Example
client.deviceAction("Landscape");
C# Example Expand source
client.deviceAction("Landscape");
VBScript Example Expand source
client.deviceAction "Landscape"
Report
Python Example Expand source
self.client.deviceAction("Landscape")
Perl Example Expand source
$client->deviceAction("Landscape");
On foldable devices, orientation and posture are separate. Rotating the device doesn't change its posture, and folding it doesn't change its orientation. Don't rotate and fold the device during the same gesture. For prerequisites, display behavior and known limitations, see Testing on Foldable Devices (iPhone Duo).