appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
48 lines • 1.97 kB
TypeScript
declare namespace _default {
/**
* @this {XCUITestDriver}
*/
function getAlertText(this: import("../driver").XCUITestDriver): Promise<string | null>;
/**
* @param {string} value
* @this {XCUITestDriver}
* @returns {Promise<void>}
*/
function setAlertText(this: import("../driver").XCUITestDriver, value: string): Promise<void>;
/**
* @param { {buttonLabel?: string} } opts
* @returns {Promise<void>}
* @this {XCUITestDriver}
*/
function postAcceptAlert(this: import("../driver").XCUITestDriver, opts?: {
buttonLabel?: string;
}): Promise<void>;
/**
* @param { {buttonLabel?: string} } opts
* @returns {Promise<void>}
* @this {XCUITestDriver}
*/
function postDismissAlert(this: import("../driver").XCUITestDriver, opts?: {
buttonLabel?: string;
}): Promise<void>;
/**
* @internal
* @this {XCUITestDriver}
* @returns {Promise<string[]>} The list of button labels
*/
function getAlertButtons(this: import("../driver").XCUITestDriver): Promise<string[]>;
/**
* Tries to apply the given action to the currently visible alert.
*
* @param {AlertAction} action - The actual action to apply.
* @param {string} [buttonLabel] - The name of the button used to perform the chosen alert action. Only makes sense if the action is `accept` or `dismiss`.
* @returns {Promise<string[]|void>} If `action` is `getButtons`, a list of alert button labelsp; otherwise nothing.
* @remarks This should really be separate commands.
* @this {XCUITestDriver}
*/
function mobileHandleAlert(this: import("../driver").XCUITestDriver, action: AlertAction, buttonLabel?: string): Promise<string[] | void>;
}
export default _default;
export type AlertAction = "accept" | "dismiss" | "getButtons";
export type XCUITestDriver = import("../driver").XCUITestDriver;
//# sourceMappingURL=alert.d.ts.map