iOS UI Testing Rotate devices

30% OFF - 9th Anniversary discount on Entity Framework Extensions until December 15 with code: ZZZANNIVERSARY9

Example

Device can be rotate by changing orientation in XCUIDevice.shared().orientation:

XCUIDevice.shared().orientation = .landscapeLeft
XCUIDevice.shared().orientation = .portrait


Got any iOS Question?