In mabl mobile tests, you can use deep links to navigate directly to a specific piece of content, including a specific view in your mobile app or a web page in the device browser.
Before you start
Before you add a deep link step, you need the URL (or URI) you want to open. You'll also tell mabl which app should open it — by its package name (Android) or bundle ID (iOS) — but you can grab that while setting up the step, so the URL is the main thing to prepare.
Getting your deep link URL
Mobile deep links are derived from your application's routing and do not follow a consistent format across apps. If you're not sure what your app's deep links look like, ask your development team:
-
What URL scheme do our deep links use? For example, do they use a custom scheme like
myapp://or universal/App Links that start withhttps://? - Which screens support deeplinking? Not every view is necessarily reachable through deep links.
- Does that link need any values filled in, like an ID, and where do those come from? If a value comes from an API response, you can store it in a variable and drop it into the URL.
Once you know the pattern, you can usually build the deep link for the specific screen you want to test yourself. For example, the Wikipedia mobile app uses https://en.wikipedia.org/wiki/{article-title}, so to open the Albert Einstein article, you'd use https://en.wikipedia.org/wiki/Albert_Einstein. If the routing isn't predictable, ask your dev for the exact link.
Using a variable in a deep link
If part of your deep link is dynamic, store that value in a variable and reference it in the URL. For example, if you stored an article title in the variable articleTitle, you could build the Wikipedia deep link like this: https://en.wikipedia.org/wiki/{{@articleTitle}}
The value might come from an earlier step, such as an API step or a DataTable. Make sure the step that sets the variable runs before the deep link step, so the value is available when the deep link opens.
Adding a deep link step
To create a deep link step:
- Click on the plus sign to add a new step.
- Select Open deep link.
- Enter the URL you'd like to open.
- Enter the package name for Android or bundle ID for iOS for the app that the URL should be opened against:
- To grab the name or ID of the app currently in focus, click on the phone icon.
- To grab the name or ID of a different app, see opening a web page or another app.
- Click OK to save the step. The step runs upon creation.
Adding a deep link step
Opening a web page or another app
The package name or bundle ID controls which app opens the URL. It doesn't have to be the app you're testing. To open the same URL somewhere else, such as a web browser, enter that app's package name or bundle ID instead.
For example, the Wikipedia article URL above opens in the Wikipedia app, but you could open the same URL in Chrome by entering the browser's package name (com.android.chrome) instead. The same applies to any other installed app.
If you don't know an app's package name or bundle ID, open it on the device so it's in focus, then click the phone icon in the deep link step to grab it.