I have a scenario where I have to rotate my simulator while xcode ui test is going.
To rotate the simulator, I use the below code
UIDevice.currentDevice().orientation
let value = UIInterfaceOrientation.LandscapeLeft.rawValue
UIDevice.currentDevice().setValue(value, forKey: "orientation")
but it is not working.
Is there any solution to rotate the simulator using Swift code in xcode ui test?