如何使用 appium(selenium 驱动程序)将屏幕方向(以编程方式)更改为“反向横向”

dan*_*laM 5 selenium android rotation

我正在使用Appium自动化移动应用程序,我需要更改屏幕方向。

这对我有用:

((Rotatable)driver).rotate(ScreenOrientation.LANDSCAPE);
((Rotatable)driver).rotate(ScreenOrientation.PORTRAIT);
Run Code Online (Sandbox Code Playgroud)

但是,当我使用:

((Rotatable)driver).rotate(ScreenOrientation.LANDSCAPE);
Run Code Online (Sandbox Code Playgroud)

我的屏幕只向右旋转,但我需要向左旋转Reverse Landscape