I have faced a critical issue while changing orientation of application.
I have used driver.rotate() method to change orientation from portrait to landscape mode which is working fine but once i performed any action in landscape mode it is observed that AutoRotate option of mobile device change to Portrait. Due to this issue i’m not able to change application orientation from Landscape to Portrait mode by driver.rotate().
Yeah its working absolutely fine when i’m doing it manually. This issue only occurs when appium executing automation test on android app. When rotate() function change the orientation of app from portrait to landscape with performing any action on the app & again try to rotate it from landscape to portrait it is observed that automatically mobile orientation option change to portrait mode.
Steps :
Open android application.
Change the orientation from portrait to landscape.
Perform some action on the app in landscape mode.
Now again try to change the orientation from landscape to portrait with the help of rotate() function.
After that i 'm not able to perform anything on my app & my test script is blocked. Then i checked the mobile option of changing orientation & it was changed to portrait.