appium-ios-simulator
Version:
iOS Simulator interface for Appium.
155 lines • 7.38 kB
TypeScript
/**
* Updates Reduce Motion setting state.
*
* @this {CoreSimulatorWithSettings}
* @param {boolean} reduceMotion Whether to enable or disable the setting.
*/
export function setReduceMotion(this: CoreSimulatorWithSettings, reduceMotion: boolean): Promise<boolean>;
/**
* Updates Reduce Transparency setting state.
*
* @this {CoreSimulatorWithSettings}
* @param {boolean} reduceTransparency Whether to enable or disable the setting.
*/
export function setReduceTransparency(this: CoreSimulatorWithSettings, reduceTransparency: boolean): Promise<boolean>;
/**
* Disable keyboard tutorial as 'com.apple.keyboard.preferences' domain via 'defaults' command.
* @this {CoreSimulatorWithSettings}
* @returns {Promise<boolean>}
*/
export function disableKeyboardIntroduction(this: CoreSimulatorWithSettings): Promise<boolean>;
/**
* Allows to update Simulator preferences in runtime.
*
* @this {CoreSimulatorWithSettings}
* @param {string} domain The name of preferences domain to be updated,
* for example, 'com.apple.Preferences' or 'com.apple.Accessibility' or
* full path to a plist file on the local file system.
* @param {import('@appium/types').StringRecord} updates Mapping of keys/values to be updated
* @returns {Promise<boolean>} True if settings were actually changed
*/
export function updateSettings(this: CoreSimulatorWithSettings, domain: string, updates: import("@appium/types").StringRecord): Promise<boolean>;
/**
* Sets UI appearance style.
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @param {string} value
* @since Xcode SDK 11.4
* @returns {Promise<void>}
*/
export function setAppearance(this: CoreSimulatorWithSettings, value: string): Promise<void>;
/**
* Gets the current UI appearance style
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @returns {Promise<string>}
* @since Xcode SDK 11.4
*/
export function getAppearance(this: CoreSimulatorWithSettings): Promise<string>;
/**
* Sets the increase contrast configuration for the given simulator.
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @param {string} value valid increase constrast configuration value.
* Acceptable value is 'enabled' or 'disabled' with Xcode 16.2.
* @since Xcode SDK 15 (but lower xcode could have this command)
* @returns {Promise<void>}
*/
export function setIncreaseContrast(this: CoreSimulatorWithSettings, value: string): Promise<void>;
/**
* Retrieves the current increase contrast configuration value from the given simulator.
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @returns {Promise<string>} the contrast configuration value.
* Possible return value is 'enabled', 'disabled',
* 'unsupported' or 'unknown' with Xcode 16.2.
* @since Xcode SDK 15 (but lower xcode could have this command)
*/
export function getIncreaseContrast(this: CoreSimulatorWithSettings): Promise<string>;
/**
* Sets content size for the given simulator.
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @param {string} value valid content size or action value. Acceptable value is
* extra-small, small, medium, large, extra-large, extra-extra-large,
* extra-extra-extra-large, accessibility-medium, accessibility-large,
* accessibility-extra-large, accessibility-extra-extra-large,
* accessibility-extra-extra-extra-large with Xcode 16.2.
* @since Xcode SDK 15 (but lower xcode could have this command)
* @returns {Promise<void>}
*/
export function setContentSize(this: CoreSimulatorWithSettings, value: string): Promise<void>;
/**
* Retrieves the current content size value from the given simulator.
* This function can only be called on a booted simulator.
*
* @this {CoreSimulatorWithSettings}
* @return {Promise<string>} the content size value. Possible return value is
* extra-small, small, medium, large, extra-large, extra-extra-large,
* extra-extra-extra-large, accessibility-medium, accessibility-large,
* accessibility-extra-large, accessibility-extra-extra-large,
* accessibility-extra-extra-extra-large,
* unknown or unsupported with Xcode 16.2.
* @since Xcode SDK 15 (but lower xcode could have this command)
*/
export function getContentSize(this: CoreSimulatorWithSettings): Promise<string>;
/**
* Change localization settings on the currently booted simulator
*
* @this {CoreSimulatorWithSettings}
* @param {import('../types').LocalizationOptions} [opts={}]
* @throws {Error} If there was a failure while setting the preferences
* @returns {Promise<boolean>} `true` if any of settings has been successfully changed
*/
export function configureLocalization(this: CoreSimulatorWithSettings, opts?: import("../types").LocalizationOptions): Promise<boolean>;
/**
* Updates Auto Fill Passwords setting state.
*
* @this {CoreSimulatorWithSettings}
* @param {boolean} isEnabled Whether to enable or disable the setting.
* @returns {Promise<boolean>}
*/
export function setAutoFillPasswords(this: CoreSimulatorWithSettings, isEnabled: boolean): Promise<boolean>;
/**
* Update the common iOS Simulator preferences file with new values.
* It is necessary to restart the corresponding Simulator before
* these changes are applied.
*
* @private
* @this {CoreSimulatorWithSettings}
* @param {import('../types').DevicePreferences} [devicePrefs={}] - The mapping, which represents new device preference values
* for the given Simulator.
* @param {import('../types').CommonPreferences} [commonPrefs={}] - The mapping, which represents new common preference values
* for all Simulators.
* @return {Promise<boolean>} True if the preferences were successfully updated.
*/
export function updatePreferences(this: CoreSimulatorWithSettings, devicePrefs?: import("../types").DevicePreferences, commonPrefs?: import("../types").CommonPreferences): Promise<boolean>;
/**
* Creates device and common Simulator preferences, which could
* be later applied using `defaults` CLI utility.
*
* @this {CoreSimulatorWithSettings}
* @private
* @param {import('../types').RunOptions} [opts={}]
* @returns {any[]} The first array item is the resulting device preferences
* object and the second one is common preferences object
*/
export function compileSimulatorPreferences(this: CoreSimulatorWithSettings, opts?: import("../types").RunOptions): any[];
/**
* Perform verification of device preferences correctness.
*
* @private
* @this {CoreSimulatorWithSettings}
* @param {import('../types').DevicePreferences} [prefs={}] - The preferences to be verified
* @returns {void}
* @throws {Error} If any of the given preference values does not match the expected
* format.
*/
export function verifyDevicePreferences(this: CoreSimulatorWithSettings, prefs?: import("../types").DevicePreferences): void;
export type CoreSimulatorWithSettings = import("../types").CoreSimulator & import("../types").HasSettings;
//# sourceMappingURL=settings.d.ts.map