Forum Discussion
Thanks for the reply.
Test case say "Oriention should not be changed if orientation setting is disabled."
How do we check for this scenario.
Thanks
Suvidh
Hi Suvidh,
If Not desktop.GetOrientation = soPortrait Then ...
(See Example section of the https://support.smartbear.com/viewarticle/75375/ or https://support.smartbear.com/viewarticle/70224/ help topics)
Does this help?
- suvidhshetty9 years agoContributor
Hi Alex,
If I disable oriention then my verification will be I need to change the orientation and check that orientation has not changed.
can this be achived.
Thanks
Suvidh
- AlexKaras9 years agoChampion Level 3
Suvidh,
I hope that I got what you are looking for...
You need to disable device orientation, do something in your tested application and check that the orientation is the same. Right?
If my guess is correct, then you may try ShellExecute method provided by TestComplete and execute adb command that will disable automatic device orientation. E.g. http://stackoverflow.com/questions/25864385/changing-android-device-orientation-with-adb
Is this what you are looking for?
- suvidhshetty9 years agoContributor
Hi Alex,
I went through the link and executed the shell commands
1. You may first need to turn off the automatic rotation
[adb shell content insert --uri content://settings/system --bind name:s:accelerometer_rotation --bind value:i:0]
Rotation was off as expected
2. Rotate to landscape
[adb shell content insert --uri content://settings/system --bind name:s:user_rotation --bind value:i:1]
Rotation happened even when the rotation was off after executing then above shell command.
It didn't work any other way we can get this working.
Thanks
Suvidh
Related Content
- 5 years ago