Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async switchToCleanRun (url) {
this.ctx = Object.create(null);
this.fixtureCtx = Object.create(null);
this.consoleMessages = new BrowserConsoleMessages();
this.session.useStateSnapshot(StateSnapshot.empty());
if (this.speed !== this.opts.speed) {
const setSpeedCommand = new actionCommands.SetTestSpeedCommand({ speed: this.opts.speed });
await this.executeCommand(setSpeedCommand);
}
if (this.pageLoadTimeout !== this.opts.pageLoadTimeout) {
const setPageLoadTimeoutCommand = new actionCommands.SetPageLoadTimeoutCommand({ duration: this.opts.pageLoadTimeout });
await this.executeCommand(setPageLoadTimeoutCommand);
}
await this.navigateToUrl(url, true);
if (this.activeDialogHandler) {
constructor (loginPage, initFn, options = {}) {
super();
this[roleMarker] = true;
this.id = nanoid(7);
this.phase = loginPage ? PHASE.uninitialized : PHASE.initialized;
this.loginPage = loginPage;
this.initFn = initFn;
this.opts = options;
this.url = null;
this.stateSnapshot = StateSnapshot.empty();
this.initErr = null;
}