UNPKG

e2ed

Version:

E2E testing framework over Playwright

16 lines (15 loc) 504 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.switchToTab = void 0; const tab_1 = require("../context/tab"); const log_1 = require("../utils/log"); /** * Switches page context to the specified tab. */ const switchToTab = (tab) => { const { page } = tab; const url = page.url(); (0, log_1.log)(`Switch page context to the specified tab at ${url}`, 5 /* LogEventType.InternalAction */); (0, tab_1.setTab)(tab); }; exports.switchToTab = switchToTab;