ディープリンク
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');
})