Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
beforeEach(function () {
driver = new AndroidUiautomator2Driver({}, false);
driver.caps = {};
driver.opts = { autoLaunch: false, skipUnlock: true};
sandbox.stub(driver, 'initUiAutomator2Server');
sandbox.stub(driver, 'addDeviceInfoToCaps');
driver.uiautomator2 = new UiAutomator2Server({
adb: ADB.createADB(), tmpDir: 'tmp', systemPort: 4724, host: 'localhost', devicePort: 6790, disableWindowAnimation: false
});
sandbox.stub(driver.uiautomator2, 'startSession');
});