پرش به محتوای اصلی

لینک عمیق

باز کردن یک URL لینک عمیق در برنامه موبایل بر اساس آدرس و نام بسته برنامه (اندروید) یا شناسه باندل (iOS).

استفاده
browser.deepLink(link, appIdentifier)
پارامترها
نامنوعجزئیات
linkstringآدرس لینک عمیقی که باید در برنامه موبایل باز شود. باید یک آدرس لینک عمیق معتبر باشد (مانند myapp://path). اگر یک لینک عمیق جهانی است که می‌تواند برای iOS استفاده شود، از متد browser.url("your-url") استفاده کنید.
appIdentifierstringمقدار package (اندروید) یا 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