UNPKG

e2ed

Version:

E2E testing framework over Playwright

14 lines (13 loc) 661 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.switchToIframe = void 0; const frameContext_1 = require("../context/frameContext"); const step_1 = require("../step"); /** * Switches browsing context to the specified iframe (by iframe selector). */ const switchToIframe = (iframeSelector) => (0, step_1.step)('Switch browsing context to the specified iframe', () => { const frameContext = iframeSelector.getPlaywrightLocator().contentFrame(); (0, frameContext_1.setFrameContext)(frameContext); }, { payload: { iframeSelector }, type: 5 /* LogEventType.InternalAction */ }); exports.switchToIframe = switchToIframe;