Page tree
Skip to end of metadata
Go to start of metadata

Last updated: Jan 09, 2019 17:17

When Facing iOS orientation issue - where the test  indicated  orientation change successfully, but it's not actually changed on the device.


An example code that causes the issue when using Perfecto Automation is as follows:

Rotate Device (Landscape)

Start application (ABC)

.

.

Close application(ABC)

Wait(1)

Start Application(ABC)

Wait(2)

Rotate devices (Portrait)   -→  will cause the script to be successful, but nothing will change on the device 


This is because the 'close application' command ends while sometimes still working on the background until finish , and when an immediate 'start application' after it followed by rotate command , it might result with commands that aren't being performed.

To resolve that issue simply add a wait between the close application and the start application commands , and to be on the safe side add a wait between the Start Application and the  Rotate command as well. (marked in red)