Skip to content

Latest commit

 

History

History
28 lines (21 loc) · 584 Bytes

APIRef.MockingOpenFromURL.md

File metadata and controls

28 lines (21 loc) · 584 Bytes

Mocking Open from URL (Deep Links)

You can mock opening the app from URL to test your app's deep link handling mechanism.

Mocking App Launch from a URL

await device.relaunchApp({url: url});

Example:

describe('relaunchApp', () => {
    before(async () => {
      await device.relaunchApp({url: 'scheme://some.url'});
    });

    it('should tap successfully', async () => {
      await expect(element(by.label('a label'))).toBeVisible();
    });
  });

Mocking Opening URL on a Launched App

await device.openURL('scheme://some.url');