मुख्य सामग्री पर जाएं

डीपलिंक

मोबाइल ऐप में URL और ऐप के पैकेज नाम (Android) या बंडल ID (iOS) के आधार पर डीप लिंक URL खोलें।

उपयोग
browser.deepLink(link, appIdentifier)
पैरामीटर्स
नामप्रकारविवरण
linkstringडीप लिंक URL जो मोबाइल ऐप में खोला जाना चाहिए। यह एक वैध डीप लिंक URL होना चाहिए (जैसे myapp://path)। अगर यह एक यूनिवर्सल डीप लिंक है, जिसे iOS के लिए उपयोग किया जा सकता है, तो browser.url("your-url")-मेथड का उपयोग करें।
appIdentifierstringऐप के 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');
})

Welcome! How can I help?

WebdriverIO AI Copilot