XCUITests to check Deeplink / Universal link and the webview loads the url

209 views Asked by At

I am working on an app and wanted to have a XCUITest in place tests that my Deeplink logic works as expected. When a user in their email get a url such as http://www.example.com/details?productId=zxy the app loads and internally adds a ref tag =iOSApp_Version_XYN to the url and loads it up in WKWebView.

Q1: Is there any way I can add an XCUITests to tests this case? The URL opens the app when I get the url in mail but if I paste this in safari then the app does not load? (not sure why).
Q2: Is there a way to detect via XCUITests what is the url of the webview that is loaded? ( Basically in my url I can confirm that the ref tag is added)

0

There are 0 answers