import type { ChainablePromiseElement } from '../../types.js';
/**
* Switch the Classic session into a frame.
*
* In a WebDriver BiDi session this command throws. Hold the browsing context
* from `browser.url()` or `browser.newWindow()` and call `context.frame()`.
* `context.parent` is the frame you came from. There is no `switchFrame(null)`.
*
* In a Classic session, pass an element or `null` for the top frame. A string
* or a function is rejected.
*
*
:switchFrame.js
// Classic
await browser.switchFrame($('iframe'))
await browser.switchFrame(null)
// BiDi
const page = await browser.url('https://example.com')
const child = await page.frame('iframe')
console.log(await child.getTitle())
*
*
* @alias browser.switchFrame
* @param {Element|null} context frame element, or `null` for the top frame (Classic only)
* @return {void}
*/
export declare function switchFrame(this: WebdriverIO.Browser, context: WebdriverIO.Element | ChainablePromiseElement | string | null | ((tree: unknown) => boolean | Promise)): Promise;
//# sourceMappingURL=switchFrame.d.ts.map