deepLink
Abre un enlace profundo (deep link) en la aplicación móvil basado en la URL y el nombre del paquete de la aplicación (Android) o el ID del paquete (iOS).
Uso
browser.deepLink(link, appIdentifier)
Parámetros
Nombre | Tipo | Detalles |
---|---|---|
link | string | La URL del enlace profundo que debería abrirse en la aplicación móvil. Debe ser una URL de enlace profundo válida (por ejemplo, myapp://path ). Si es un enlace profundo universal, que puede usarse para iOS, utilice el método browser.url("your-url") . |
appIdentifier | string | El valor del package (Android) o bundleId (iOS) de la aplicación que debería abrir el enlace profundo. |
Ejemplo
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');
})