we are trying Ranorex with a iOS app and so far it's great except for one thing which has to do with multiple windows.
We display alerts and password prompts using UIAlertControllers that are shown UIWindows that are above the default UIWindow where all the view controllers are. Here's a code example of how we do it:
Code: Select all
let window = UIWindow(frame: UIScreen.main.bounds) let transparentViewController = UIViewController() transparentViewController.view.backgroundColor = .clear window.rootViewController = transparentViewController window.windowLevel = UIWindow.Level.alert + 1 window.makeKeyAndVisible() transparentViewController.present(alertController, animated: true, completion: nil)
Usually after dismissing the alert the alertController everything is dismissed out of memory because nothing is holding any references to it. But it seems that Ranorex is indeed holding references that prevent the UIWindow from being deallocated. Therefore the UIWindow appears to remain and there's no way to tap anything any more. This effectively prevents any further testing.
Furthermore, the View Hierarchy looks strange. It seems that to Ranorex the alert window is somehow a child window of the first/root window.
I'd appreciate any tipps on how to handle this scenario. (However: We do want to keep the multi window approach.)