डीपलि ंक
मोबाइल ऐप में URL और ऐप के पैकेज नाम (Android) या बंडल ID (iOS) के आधार पर डीप लिंक URL खोलें।
उपयोग
browser.deepLink(link, appIdentifier)
पैरामीटर्स
नाम | प्रकार | विवरण |
---|---|---|
link | string | डीप लिंक URL जो मोबाइल ऐप में खोला जाना चाहिए। यह एक वैध डीप लिंक URL होना चाहिए (जैसे myapp://path )। अगर यह एक यूनिवर्सल डीप लिंक है, जिसे iOS के लिए उपयोग किया जा सकता है, तो browser.url("your-url") -मेथड का उपयोग करें। |
appIdentifier | string | ऐप के package (Android) या bundleId (iOS) का मान, जिसमें डीप लिंक खुलना चाहिए। |
उदाहरण
deeplink.js
it('should open a deep link for the WDIO native demo app', async () => {
// open the Drag tab with a deep link (this the bundleId for the iOS Demo App)
await browser.deepLink('wdio://drag', 'org.reactjs.native.example.wdiodemoapp');
// Or open the Drag tab with a deep link (this the package name for the Android Demo App)
await browser.deepLink('wdio://drag', 'com.wdiodemoapp');
// Or if you want to have it "cross-platform" you can use it like this
await browser.deepLink('wdio://drag', browser.isIOS ? 'org.reactjs.native.example.wdiodemoapp' : 'com.wdiodemoapp');
})