e2ed
Version:
E2E testing framework over Playwright
17 lines (16 loc) • 588 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.switchToMainTab = void 0;
const tab_1 = require("../context/tab");
const useContext_1 = require("../useContext");
const log_1 = require("../utils/log");
/**
* Switches page context to the specified tab.
*/
const switchToMainTab = () => {
const page = (0, useContext_1.getPlaywrightPage)();
const url = page.url();
(0, log_1.log)(`Switch page context to the main tab at ${url}`, 5 /* LogEventType.InternalAction */);
(0, tab_1.clearTab)();
};
exports.switchToMainTab = switchToMainTab;