Check Email during Xcode UI Testing?

怎甘沉沦 提交于 2019-11-29 17:28:49

If you have a way for your device/simulator to receive the code while still in the app then you can write a script an iOS UIA script to do this.

However with the current state of the built in iOS UIA tool, you cannot access anything that is outside of your app. So basically you cannot launch your app, then launch another app (like safari) go to mail.google.com blah blah.

The closest thing to leaving your app in iOS UIA is using a function call to send your app to background for X amount of seconds.

ma11hew28

Use NSURLSession to make HTTP requests from within test methods. See: https://stackoverflow.com/a/35708282/242933

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!