Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android UIAutomator how to tilt device

is there anyway to perform tilt action using uiautomator android? I looked at the uiautomatorAPI but i am unable to find any direct method.

like image 573
shahzad Avatar asked Nov 29 '25 17:11

shahzad


1 Answers

There are methods that change the device orientation. I assume this is what you want. You could try:

getUiDevice().setOrientationRight();
getUiDevice().setOrientationLeft();
getUiDevice().setOrientationNatural();

For more details on how to use them you can access the link: auiautomator UiDevice

like image 128
Gabriel Porumb Avatar answered Dec 01 '25 06:12

Gabriel Porumb