npm install taiko-android
import { openBrowser, closeBrowser, goto, evaluate } from 'taiko';
jest.setTimeout(30000);
beforeEach(async () => {
await openBrowser();
});
afterEach(async () => {
await closeBrowser();
});
test('Should open browser and send events', async () => {
await goto('http://the-internet.herokuapp.com/');
let version = await evaluate(
() => navigator.appVersion.match(/.*Chrome\/([0-9.]+)/)[1]
);
expect(version.result).toBeTruthy();
});
Opens the chrome browser and forwards the host and port to taiko and start using all the taiko API.
openBrowser();
Close chrome browser.
closeBrowser();