开发者

Switch the screen mode with MonkeyRunner?

开发者 https://www.devze.com 2023-03-21 00:34 出处:网络
How can I use MonkeyRunner t开发者_JAVA百科o switch the screen mode(Portrait mode and Landscape mode)?There is no such way.There is a indirect way,you can toggle between portrain & landscape, but

How can I use MonkeyRunner t开发者_JAVA百科o switch the screen mode(Portrait mode and Landscape mode)?


There is no such way.


There is a indirect way,you can toggle between portrain & landscape, but only the setting page.Steps:-

1.Disable auto-rotate screen option in settings page,keep the same page open.
2.Keep device in horizontally(It wont go to landscape mode as auto rotate is disabled
3.Get coordinates of disable/enable by enabling 'show pointer location'
4.touch the cordinates using monkeyrunner-it will goto landscape,touch again it will goback to portrait.


If its a physical device then I do not know of a way to change the screen mode without actually physically putting the device on its side.

0

精彩评论

暂无评论...
验证码 换一张
取 消