UNPKG

appium-xcuitest-driver

Version:

Appium driver for iOS using XCUITest for backend

79 lines 3.66 kB
declare namespace _default { /** * Get all available ConditionInducer configuration information, which can be used with * {@linkcode XCUITestDriver.enableConditionInducer} * @returns {Promise<Condition[]>} * @since 4.9.0 * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42} * @this {XCUITestDriver} */ function listConditionInducers(this: import("../driver").XCUITestDriver): Promise<Condition[]>; /** * Enable a "condition inducer". You can create a condition on a connected device to test your app under adverse conditions, * such as poor network connectivity or thermal constraints. When you start a device condition, * the operating system on the device behaves as if its environment has changed. The device * condition remains active until you stop the device condition or disconnect the device. For * example, you can start a device condition, run your app, monitor your app’s energy usage, and * then stop the condition. * * (Note: the socket needs to remain connected during operation) * (Note: Device conditions are available only for real devices running iOS 13.0 and later.) * * @param {string} conditionID - Determine which condition IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command * @param {string} profileID - Determine which profile IDs are available with the {@linkcode XCUITestDriver.listConditionInducers} command * @returns {Promise<boolean>} `true` if enabling the condition succeeded * @throws {Error} If you try to start another Condition and the previous Condition has not stopped * @since 4.9.0 * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42} * @this {XCUITestDriver} */ function enableConditionInducer(this: import("../driver").XCUITestDriver, conditionID: string, profileID: string): Promise<boolean>; /** * Disable a condition inducer enabled with {@linkcode XCUITestDriver.enableConditionInducer} Usually * a persistent connection is maintained after the condition inducer is enabled, and this method * is only valid for the currently enabled connection. If the connection is disconnected, the * condition inducer will be automatically disabled * * (Note: this is also automatically called upon session cleanup) * @returns {Promise<boolean>} `true` if disable the condition succeeded * @since 4.9.0 * @see {@link https://help.apple.com/xcode/mac/current/#/dev308429d42} * @this {XCUITestDriver} */ function disableConditionInducer(this: import("../driver").XCUITestDriver): Promise<boolean>; } export default _default; export type Profile = { name: string; /** * the property is profileID used in {@linkcode XCUITestDriver.enableConditionInducer} */ identifier: string; /** * Configuration details */ description: string; }; /** * We can use the returned data to determine whether the Condition is enabled and the currently enabled configuration information */ export type Condition = { profiles: Profile[]; /** * the property is conditionID used in {@linkcode XCUITestDriver.enableConditionInducer} */ identifier: string; profilesSorted: boolean; isDestructive: boolean; isInternal: boolean; /** * `true` if this condition identifier is enabled */ isActive: boolean; /** * enabled profiles identifier */ activeProfile: string; }; export type XCUITestDriver = import("../driver").XCUITestDriver; //# sourceMappingURL=condition.d.ts.map