Appium Recipes by Shankar Garg

Appium Recipes by Shankar Garg

Author:Shankar Garg
Language: eng
Format: epub
Publisher: Apress, Berkeley, CA


3.Call the function created in the previous step in the main function using the following code:

new AppiumAndroidMobility().changeOrientation();

4.Run the Appium server on a terminal, run an Android emulator, and execute the program as explained in the previous chapters.

The Appium server should receive the request, and the program should be executed appropriately (Figure 4-5).

Figure 4-5.Android app in landscape mode

How It Works

The Rotate() function is used to change the existing orientation of a device, be it Android or iOS. The syntax for Rotate() is as follows:

driver.rotate(ScreenOrientation.'ORIENTATION')



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.