UNPKG

appium-ios-simulator

Version:
40 lines 1.98 kB
import type { CoreSimulator, InteractsWithSafariBrowser, InteractsWithApps, HasSettings } from '../types'; import type { StringRecord } from '@appium/types'; type CoreSimulatorWithSafariBrowser = CoreSimulator & InteractsWithSafariBrowser & InteractsWithApps & HasSettings; /** * Open the given URL in mobile Safari browser. * The browser will be started automatically if it is not running. * * @param url URL to open */ export declare function openUrl(this: CoreSimulatorWithSafariBrowser, url: string): Promise<void>; /** * Clean up the directories for mobile Safari. * Safari will be terminated if it is running. * * @param keepPrefs Whether to keep Safari preferences from being deleted. */ export declare function scrubSafari(this: CoreSimulatorWithSafariBrowser, keepPrefs?: boolean): Promise<void>; /** * Updates various Safari settings. Simulator must be booted in order for it * to success. * * @param updates An object containing Safari settings to be updated. * The list of available setting names and their values could be retrieved by * changing the corresponding Safari settings in the UI and then inspecting * 'Library/Preferences/com.apple.mobilesafari.plist' file inside of * com.apple.mobilesafari app container. * The full path to the Mobile Safari's container could be retrieved from * `xcrun simctl get_app_container <sim_udid> com.apple.mobilesafari data` * command output. * Use the `xcrun simctl spawn <sim_udid> defaults read <path_to_plist>` command * to print the plist content to the Terminal. * @returns Promise that resolves to true if settings were updated */ export declare function updateSafariSettings(this: CoreSimulatorWithSafariBrowser, updates: StringRecord): Promise<boolean>; /** * @returns Promise that resolves to the Web Inspector socket path or null */ export declare function getWebInspectorSocket(this: CoreSimulatorWithSafariBrowser): Promise<string | null>; export {}; //# sourceMappingURL=safari.d.ts.map