I'm trying to write a UITest to verify the following: the user taps a button in the app. The app then initiates a phone call by calling UIApplication's openURL method with a tel://*** url.
In the simulator, the openURL attempt fails and then the completionHandler is called with the success parameter set to false. In my app, I then display a UIAlertController, which I can then look for in my UI Test.
On device, openURL works and the system prompts the user to dial the number, by system UI that looks like a sheet. Is there any way for my UITest to see that sheet so that I can verify its contents? The phone number can vary based on the user's locale so I want to test that the correct phone is displayed per region.
In the simulator, the openURL attempt fails and then the completionHandler is called with the success parameter set to false. In my app, I then display a UIAlertController, which I can then look for in my UI Test.
On device, openURL works and the system prompts the user to dial the number, by system UI that looks like a sheet. Is there any way for my UITest to see that sheet so that I can verify its contents? The phone number can vary based on the user's locale so I want to test that the correct phone is displayed per region.