UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

141 lines 5.94 kB
/** * https://github.com/appium/appium/issues/20741 * * @this {XCUITestDriver} * @returns {Promise<void>} */ export function notifyBiDiContextChange(this: import("../driver").XCUITestDriver): Promise<void>; declare namespace _default { /** * @this {XCUITestDriver} * @returns {Promise<string>} */ function getCurrentContext(this: import("../driver").XCUITestDriver): Promise<string>; /** * Set context * * @param {string|Context} name - The name of context to set. It could be 'null' as NATIVE_WIN. * @param {any} [callback] The callback. (It is not called in this method) * @param {boolean} [skipReadyCheck=false] - Whether it waits for the new context is ready * @this {XCUITestDriver} * @returns {Promise<void>} */ function setContext(this: import("../driver").XCUITestDriver, name: string | Context, callback?: any, skipReadyCheck?: boolean): Promise<void>; /** * @this {XCUITestDriver} * @returns {Promise<string[]|FullContext[]>} */ function getContexts(this: import("../driver").XCUITestDriver): Promise<string[] | FullContext[]>; /** * @this {XCUITestDriver} * @param {string} name * @param {boolean} [skipReadyCheck] * @returns {Promise<void>} */ function setWindow(this: import("../driver").XCUITestDriver, name: string, skipReadyCheck?: boolean): Promise<void>; /** * @this {XCUITestDriver} * @returns {Promise<string>} */ function getWindowHandle(this: import("../driver").XCUITestDriver): Promise<string>; /** * @this {XCUITestDriver} * @returns {Promise<string[]>} */ function getWindowHandles(this: import("../driver").XCUITestDriver): Promise<string[]>; /** * @this {XCUITestDriver} * @param {boolean} [useUrl=false] * @returns {Promise<import('./types').ViewContext<typeof NATIVE_WIN>[]>} */ function getContextsAndViews(this: import("../driver").XCUITestDriver, useUrl?: boolean): Promise<import("./types").ViewContext<typeof NATIVE_WIN>[]>; /** * Right now we don't necessarily wait for webview * and frame to load, which leads to race conditions and flakiness, * let's see if we can transition to something better * @this {XCUITestDriver} * @returns {boolean} */ function useNewSafari(this: import("../driver").XCUITestDriver): boolean; /** * @this {XCUITestDriver} * @returns {Promise<void>} */ function activateRecentWebview(this: import("../driver").XCUITestDriver): Promise<void>; /** * @this {XCUITestDriver} * @returns {Promise<import('../types').Page[]>} */ function listWebFrames(this: import("../driver").XCUITestDriver, useUrl?: boolean): Promise<import("../types").Page[]>; /** * @this {XCUITestDriver} * @returns {Promise<void>} */ function connectToRemoteDebugger(this: import("../driver").XCUITestDriver): Promise<void>; /** * Retrieves the list of available contexts. * * The list includes extended context information, like URLs and page names. * This is different from the standard `getContexts` API, because the latter * only has web view names without any additional information. * * @remarks In situations where multiple web views are available at once, the * client code would have to connect to each of them in order to detect the * one which needs to be interacted with. This extra effort is not needed with * the information provided by this extension. * @param {number} [waitForWebviewMs=0] - The period to poll for available webview(s) (in ms) * @returns {Promise<Context[]>} The list of available context objects along with their properties. * @this {XCUITestDriver} */ function mobileGetContexts(this: import("../driver").XCUITestDriver, waitForWebviewMs?: number): Promise<Context[]>; /** * @this {XCUITestDriver} * @param {import('./types').PageChangeNotification} pageChangeNotification * @returns {Promise<void>} */ function onPageChange(this: import("../driver").XCUITestDriver, pageChangeNotification: import("./types").PageChangeNotification): Promise<void>; /** * @this {XCUITestDriver} * @returns {Promise<void>} */ function stopRemote(this: import("../driver").XCUITestDriver, closeWindowBeforeDisconnecting?: boolean): Promise<void>; /** * @this {XCUITestDriver} * @param {string|undefined|null} url */ function setCurrentUrl(this: import("../driver").XCUITestDriver, url: string | undefined | null): void; /** * @this {XCUITestDriver} * @returns {string|undefined|null} */ function getCurrentUrl(this: import("../driver").XCUITestDriver): string | undefined | null; /** * @param {RegExp} titleRegExp * @param {RegExp} urlRegExp * @this {XCUITestDriver} * @returns {Promise<string|undefined>} */ function getRecentWebviewContextId(this: import("../driver").XCUITestDriver, titleRegExp: RegExp, urlRegExp: RegExp): Promise<string | undefined>; /** * @this {XCUITestDriver} * @returns {boolean} */ function isWebContext(this: import("../driver").XCUITestDriver): boolean; /** * @this {XCUITestDriver} * @returns {boolean} */ function isWebview(this: import("../driver").XCUITestDriver): boolean; /** * @this {XCUITestDriver} * @returns {Promise<RemoteDebugger>} */ function getNewRemoteDebugger(this: import("../driver").XCUITestDriver): Promise<RemoteDebugger>; } export default _default; export type XCUITestDriver = import("../driver").XCUITestDriver; export type Context = import("./types").Context; export type FullContext = import("./types").FullContext; import { NATIVE_WIN } from '../utils'; import { RemoteDebugger } from 'appium-remote-debugger'; //# sourceMappingURL=context.d.ts.map