e2ed
Version:
E2E testing framework over Playwright
15 lines (14 loc) • 642 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.switchToIframe = void 0;
const frameContext_1 = require("../context/frameContext");
const log_1 = require("../utils/log");
/**
* Switches browsing context to the specified iframe (by iframe selector).
*/
const switchToIframe = (iframeSelector) => {
(0, log_1.log)('Switch browsing context to the specified iframe', { iframeSelector }, 5 /* LogEventType.InternalAction */);
const frameContext = iframeSelector.getPlaywrightLocator().contentFrame();
(0, frameContext_1.setFrameContext)(frameContext);
};
exports.switchToIframe = switchToIframe;