Android | Use deep links
Deep linking uses a hyperlink that points to a specific piece of web content on a website (for example http://directaccount.chickenshack.com) rather than the website's home page (for example "http://www.chickenshack.com"). The URL contains all the information needed to point to a particular item inside that site.
Deep links are becoming more and more useful. For Android, however, you need to ensure that the coding in your test is correct. Otherwise, nothing will happen.
With Appium 2, Android deep-link automation requires W3C-compliant commands. Use the mobile: deepLink command instead of driver.get().
To run a deep link test on Android, you need the following information:
- The Application Identifier
- The URL of your deep link to test on
- The
enableAppiumBehaviorcapability set totrue(see Driver-based Appium architecture for testing on Android)
To open the deep link, use the following Appium 2 command:
params.clear();
params.put("url", "https://direct.chickenshack.com");
params.put("package", "com.chickenshack.consumer");
driver.executeScript("mobile: deepLink", params);
Replace the sample URL and package name with values for your application.
If you need assistance with deep linking for iOS, see iOS | Use deep links.
For all other questions regarding deep linking, contact Perfecto Support.