import { Browser } from 'webdriverio'; import type { Browser as Browser_2 } from 'playwright'; import type { BrowserContext } from 'playwright'; import type { BrowserContextOptions } from 'playwright'; import { BrowserType } from 'playwright'; import type { CDPSession } from 'playwright'; import { devices } from 'playwright'; import { ElectronApplication } from 'playwright'; import type { Email } from '@qawolf/emails'; import { EventEmitter } from 'node:events'; import { Expect } from 'playwright/test'; import type { GetInboxFn } from '@qawolf/emails'; import type { GetInboxOptions } from '@qawolf/emails'; import type { GetInboxResult } from '@qawolf/emails'; import { Locator } from 'playwright'; import { LocatorScreenshotOptions } from 'playwright'; import type * as OTPAuthModule from 'otpauth'; import { Page } from 'playwright'; import { PageScreenshotOptions } from 'playwright'; import type { ParsedEmail } from '@qawolf/emails'; import type { readQRCode } from '@qawolf/testkit/web'; import { selectors } from 'playwright'; import type { SendMessage } from '@qawolf/emails'; import type { SendMessageResult } from '@qawolf/emails'; import type { WaitForMessage } from '@qawolf/emails'; import z from 'zod'; export declare type AndroidDependencies = BaseDependencies & { /** @deprecated Use `device` from `@qawolf/flows/android` instead. */ emulator: AndroidEmulatorApi; /** @deprecated Use `launch()` from `@qawolf/flows/android` instead. */ wdio: WebDriverIo; }; export declare type AndroidEmulatorApi = typeof emulator; export declare type AndroidExecutionTarget = z.input; declare const androidExecutionTargetSchema: z.ZodDiscriminatedUnion<[z.ZodCodec; deviceModel: z.ZodEnum<{ "Pixel 2": "Pixel 2"; }>; }, z.core.$strip>, z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; }>; deviceModel: z.ZodEnum<{ "Pixel Tablet": "Pixel Tablet"; }>; }, z.core.$strip>, z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; 35: "35"; 36: "36"; }>; deviceModel: z.ZodEnum<{ "Pixel 9": "Pixel 9"; }>; }, z.core.$strip>], "deviceModel">; platform: z.ZodEnum<{ android: "android"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; 35: "35"; 36: "36"; }>; deviceModel: z.ZodEnum<{ pixel_2: "pixel_2"; pixel_tablet: "pixel_tablet"; pixel_9: "pixel_9"; }>; screenHeight: z.ZodNumber; screenWidth: z.ZodNumber; }, z.core.$strip>; runnerName: z.ZodEnum<{ node20WithAndroid: "node20WithAndroid"; }>; platform: z.ZodEnum<{ android: "android"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">; export declare type AndroidPresetLiteral = (typeof androidPresetLiteralRaw)[number]; declare const androidPresetLiteralRaw: readonly ["Android - Pixel", "Android - Pixel 2 (Android 14)", "Android - Pixel 9", "Android - Pixel 9 (Android 14)", "Android - Pixel 9 (Android 15)", "Android - Pixel 9 (Android 16)", "Android - Pixel Tablet (Android 14)", "Android - Tablet"]; /** * Represents the audio fingerprint calculation result */ declare type AudioFingerprint = z.input; /** * Schema for the audio fingerprint calculation result */ declare const AudioFingerprintSchema: z.ZodObject<{ fingerprint: z.ZodArray; duration: z.ZodNumber; }, z.core.$strip>; /** * Source configuration for microphone/audio injection. */ declare interface AudioSource { /** File path, URL, or data URI for the audio to inject */ data: string; /** Delay in seconds before injection starts */ delaySeconds?: number; } /** * Configuration for a barcode or QR code to inject. */ declare interface BarcodeConfig { /** AVMetadataObjectType constant. Default: "org.iso.QRCode" */ type?: string; /** The barcode/QR code value to inject */ value: string; /** Normalized bounds (0.0-1.0) for the detected barcode position */ bounds?: { x: number; y: number; width: number; height: number; }; /** Corner points (0.0-1.0) for the detected barcode shape */ corners?: { x: number; y: number; }[]; /** * Raw binary payload exposed via `AVMetadataMachineReadableCodeObject.rawValue` * (iOS 13+). Accepts a Buffer or a base64-encoded string. When omitted, the * injector defaults to the UTF-8 encoding of `value`. */ rawValue?: Buffer | string; } export declare type BaseDependencies = Omit & FlowIO & { /** * @deprecated If the goal is to communicate between flows, consider using `setOutput` and `inputs` instead. * Fetch the latest environment variables from the Apex backend. */ fetchLatestEnvironmentVariables: () => Promise; /** * @deprecated Import from `@qawolf/testkit` instead. * * Mount a CIFS share using the provided options and return the stdout. * Command is idempotent and will not throw an error if the share is already mounted. * Will throw an error if stderr is not empty. */ mountCifsShare: (options: { mountPoint: string; password: string; share: string; username: string; }) => Promise; /** * @deprecated If the goal is to communicate between flows, consider using `setOutput` and `inputs` instead. * * Create or update the value of an environment variable. Changes will apply to all flows in this environment. */ setEnvironmentVariable: (name: string, value: string) => Promise; /** * @deprecated Import from `@qawolf/testkit` instead. * * Start an OpenVPN connection using the provided options and return the stdout. * Command is idempotent and will not create multiple connections. */ startOpenVpn: (options: { /** * Path to the OpenVPN configuration in the runner. */ configPath: string; /** * Resolve these hostnames before connecting and route them through the VPN. */ routeHosts?: string[]; /** * Route these IPv4 addresses through the VPN. */ routeIps?: string[]; /** * Skip pulling routes from the VPN config and use only the supplied routes. */ routeNoPull?: boolean; }) => Promise; /** * Start a WireGuard connection using the provided options and return the stdout. * Command is idempotent and will not create multiple connections. */ startWireGuard: (options: { /** * Path to the WireGuard configuration file in the runner. */ configPath: string; }) => Promise; }; /** * Configuration for iBeacon injection. */ declare interface BeaconConfig { /** Beacon region UUID */ uuid: string; /** * Beacons to simulate in this region. When omitted or empty, only the * `.region` file is pushed — the app receives a region-entry callback but * no ranging callbacks. */ beacons?: { major: number | string; minor: number | string; }[]; } declare type BrowserContextLaunchOptions = { acceptDownloads?: boolean; bypassCSP?: boolean; colorScheme?: null | "light" | "dark" | "no-preference"; deviceScaleFactor?: number; extraHTTPHeaders?: { [key: string]: string; }; geolocation?: { accuracy?: number; latitude: number; longitude: number; }; hasTouch?: boolean; httpCredentials?: { origin?: string; password: string; send?: "unauthorized" | "always"; username: string; }; ignoreHTTPSErrors?: boolean; isMobile?: boolean; locale?: string; offline?: boolean; permissions?: Array; proxy?: { bypass?: string; password?: string; server: string; username?: string; }; storageState?: string | { cookies: Array<{ domain: string; expires: number; httpOnly: boolean; name: string; path: string; sameSite: "Strict" | "Lax" | "None"; secure: boolean; value: string; }>; origins: Array<{ localStorage: Array<{ name: string; value: string; }>; origin: string; }>; }; timezoneId?: string; userAgent?: string; viewport?: null | { height: number; width: number; }; }; declare type BrowserLaunchOptions = { args?: Array; channel?: string; env?: { [key: string]: string | undefined; }; executablePath?: string; firefoxUserPrefs?: { [key: string]: string | number | boolean; }; logger?: unknown; proxy?: { bypass?: string; password?: string; server: string; username?: string; }; slowMo?: number; timeout?: number; }; /** * Calculate audio fingerprint from audio data. * Accepts either a Buffer or base64-encoded string of WAV audio data. * * @param driver - The WebDriverIO browser instance * @param audioData - Audio data as Buffer or base64 string (WAV format) * @returns Promise resolving to the fingerprint calculation result * @example * ```typescript * const audioBuffer = fs.readFileSync('/tmp/reference.wav'); * const fingerprint = await ios.calculateAudioFingerprint(driver, audioBuffer); * console.log(`Duration: ${fingerprint.duration}s`); * console.log(`Fingerprint: ${fingerprint.fingerprint.slice(0, 10).join(', ')}...`); * ``` */ declare function calculateAudioFingerprint(driver: Browser, audioData: Buffer | string): Promise; /** * Source configuration for camera/video feed injection. */ declare interface CameraSource { /** File path, URL, or data URI for the media to inject */ data: string; /** Media type. Default: inferred from file extension */ type?: "image" | "video"; /** Delay in seconds before injection starts */ delaySeconds?: number; } /** * Clear the proxy setting for the emulator. * * @param runCommandOptions optional options to pass to runCommand * @throws if the command failed */ declare function clearProxy(runCommandOptions?: Omit): Promise; /** * Options for installing a configuration profile */ declare type ConfigurationProfileOptions = z.input; /** * Schema for configuration profile options */ declare const ConfigurationProfileOptionsSchema: z.ZodObject<{ profileString: z.ZodString; }, z.core.$strip>; export declare type CustomRunGlobals = { expect: Expect; /** @deprecated Throw `FailWithoutRetryError` from `@qawolf/flows` instead. */ failWithoutRetry: () => never; /** @deprecated Use `mail.inbox` from `@qawolf/emails` instead. */ getInbox: GetInboxFn; /** @deprecated Use `otp.fromUri` from `@qawolf/testkit` instead. */ getOTP(uri: string): string; /** @deprecated Import `otpauth` directly if needed. */ OTPAuth: typeof OTPAuthModule; /** @deprecated Use `platform.target` from `@qawolf/flows` instead. */ qawolf: QaWolf; /** @deprecated Use standard Node.js or other libraries directly. */ runCommand(command: string, options?: RunCommandOptions): Promise; }; /** * Delete all photos and videos from the Photos library. * This is useful for cleaning up test data between test runs. * * @param driver - The WebDriverIO browser instance * @returns Promise resolving to delete result with count and message * @example * ```typescript * const result = await ios.deleteAllPhotos(driver); * console.log(`Deleted ${result.deletedCount} photos`); * ``` */ declare function deleteAllPhotos(driver: Browser): Promise; /** * Result of deleting all photos from the Photos library */ declare type DeletePhotosResult = z.input; /** * Schema for the result of deleting all photos from the Photos library */ declare const DeletePhotosResultSchema: z.ZodObject<{ success: z.ZodBoolean; deletedCount: z.ZodNumber; message: z.ZodOptional; }, z.core.$strip>; export declare type DeviceDescriptor = Devices[keyof Devices]; export declare type Devices = typeof devices; /** * Download a recorded audio file as a Buffer. * The audio file is returned in WAV format. * * @param driver - The WebDriverIO browser instance * @param filename - The filename returned from stopRecording * @returns Promise resolving to the audio file contents as a Buffer * @example * ```typescript * const audioBuffer = await ios.downloadSpeakerRecording(driver, file.filename); * fs.writeFileSync('/tmp/recording.wav', audioBuffer); * ``` */ declare function downloadSpeakerRecording(driver: Browser, filename: string): Promise; export { Email } export declare type EmailAttachment = NonNullable[number]; declare namespace emulator { export { PlayAutomationOptions, playAutomation, GeoLocationOptions, setGeoLocation, ProxyOptions, clearProxy, setProxy, VirtualSceneImageOptions, setVirtualSceneImage } } declare type ExecutionTargetOutput = z.output; declare const executionTargetSchema: z.ZodDiscriminatedUnion<[z.ZodDiscriminatedUnion<[z.ZodCodec; deviceModel: z.ZodEnum<{ "Pixel 2": "Pixel 2"; }>; }, z.core.$strip>, z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; }>; deviceModel: z.ZodEnum<{ "Pixel Tablet": "Pixel Tablet"; }>; }, z.core.$strip>, z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; 35: "35"; 36: "36"; }>; deviceModel: z.ZodEnum<{ "Pixel 9": "Pixel 9"; }>; }, z.core.$strip>], "deviceModel">; platform: z.ZodEnum<{ android: "android"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodObject<{ androidVersion: z.ZodEnum<{ 34: "34"; 35: "35"; 36: "36"; }>; deviceModel: z.ZodEnum<{ pixel_2: "pixel_2"; pixel_tablet: "pixel_tablet"; pixel_9: "pixel_9"; }>; screenHeight: z.ZodNumber; screenWidth: z.ZodNumber; }, z.core.$strip>; runnerName: z.ZodEnum<{ node20WithAndroid: "node20WithAndroid"; }>; platform: z.ZodEnum<{ android: "android"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">, z.ZodDiscriminatedUnion<[z.ZodCodec>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15": "iPhone 15"; }>; iosVersion: z.ZodEnum<{ 17: "17"; 18: "18"; 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15 Plus": "iPhone 15 Plus"; }>; iosVersion: z.ZodEnum<{ 17: "17"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15 Pro Max": "iPhone 15 Pro Max"; }>; iosVersion: z.ZodEnum<{ 17: "17"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 16 Plus": "iPhone 16 Plus"; }>; iosVersion: z.ZodEnum<{ 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 17": "iPhone 17"; }>; iosVersion: z.ZodEnum<{ 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPad 11": "iPad 11"; }>; iosVersion: z.ZodEnum<{ 18: "18"; 26: "26"; }>; }, z.core.$strip>], "deviceModel">; platform: z.ZodEnum<{ ios: "ios"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodObject<{ appleId: z.ZodOptional>; deviceModel: z.ZodEnum<{ iphone15_4: "iphone15_4"; iphone15_5: "iphone15_5"; iphone16_2: "iphone16_2"; iphone17_4: "iphone17_4"; iphone18_3: "iphone18_3"; ipad15_7: "ipad15_7"; }>; deviceUdid: z.ZodOptional; iosVersion: z.ZodEnum<{ 17: "17"; 18: "18"; 26: "26"; }>; screenHeight: z.ZodNumber; screenWidth: z.ZodNumber; targetDevices: z.ZodEnum<{ anyDevice: "anyDevice"; allowlistedDevice: "allowlistedDevice"; teamDedicatedDevice: "teamDedicatedDevice"; }>; }, z.core.$strip>; runnerName: z.ZodEnum<{ node20WithIos: "node20WithIos"; }>; platform: z.ZodEnum<{ ios: "ios"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">, z.ZodDiscriminatedUnion<[z.ZodCodec; defaultBrowser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ browser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; defaultBrowser: z.ZodOptional; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>]>, z.ZodObject<{ browser: z.ZodOptional; defaultBrowser: z.ZodOptional; gpuEnabled: z.ZodDefault>; kind: z.ZodLiteral<"electron">; }, z.core.$strip>]>, z.ZodLiteral<"legacy">]>; platform: z.ZodEnum<{ web: "web"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodUnion; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ browser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ gpuEnabled: z.ZodLiteral; kind: z.ZodLiteral<"electron">; }, z.core.$strip>, z.ZodLiteral<"legacy">]>; platform: z.ZodLiteral<"web">; runnerName: z.ZodEnum<{ node20Basic: "node20Basic"; node20GpuWithPlaywright: "node20GpuWithPlaywright"; node20WithPlaywright: "node20WithPlaywright"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">], "platform">; export { Expect } export declare type FlowIO = { /** * The inputs of the flow, if a previous flow set the output via `setOutput`. This requires sequencing the flows using Run Rules. */ inputs: WorkflowInput; /** * Set the output of the flow. The next flow can read it via `inputs`. This requires sequencing the flows using Run Rules. */ setOutput: (key: string, value: JsonSerializable) => void; /** * The inputs of the flow, if a previous flow set the output via `setOutput`. This requires sequencing the flows using Run Rules. * @deprecated Use `inputs` instead. */ workflowInputs: WorkflowInput; }; declare type GeoLocationOptions = z.input; declare const GeoLocationOptions_2: z.ZodObject<{ altitude: z.ZodDefault; latitude: z.ZodNumber; longitude: z.ZodNumber; satellites: z.ZodDefault; velocity: z.ZodDefault; }, z.core.$strip>; declare type GeoLocationOptions = z.input; export { GetInboxFn } export { GetInboxOptions } export { GetInboxResult } /** * Get the current network condition status. */ declare function getNetworkCondition(): Promise; /** * Get the current network routing status via the Appium server's sessionless endpoint. * * Appium URL is resolved from APPIUM_HOST / APPIUM_PORT env vars (default 127.0.0.1:4723). * * @returns Combined network status */ declare function getNetworkStatus(): Promise; declare type HttpProxyTunnel = z.infer; declare const HttpProxyTunnelSchema: z.ZodObject<{ type: z.ZodLiteral<"http-proxy">; host: z.ZodString; port: z.ZodNumber; username: z.ZodOptional; password: z.ZodOptional; }, z.core.$strip>; /** * Inject audio into the app's microphone input. * * Replaces microphone input with the provided audio file. Affects * AVAudioRecorder and AVCaptureAudioDataOutput. * * Cannot be used simultaneously with `injectCamera` (they share the same config file). * * @param driver - The WebDriverIO browser instance * @param bundleId - Bundle ID of the target app * @param source - Audio source configuration * @returns Cleanup function that removes the injection config and audio file * * @example * ```typescript * const cleanup = await ios.injectAudio(driver, "com.example.app", { * data: "/path/to/audio.mp3", * }); * * await cleanup(); * ``` */ declare function injectAudio(driver: Browser, bundleId: string, source: AudioSource): Promise<() => Promise>; /** * Inject a barcode or QR code detection into the app's AVCaptureMetadataOutput. * * The injected barcode(s) will be delivered to the app's metadata output delegate * as if they were scanned by the camera. The config file is auto-consumed by the * injection system after delivery. * * @param driver - The WebDriverIO browser instance * @param bundleId - Bundle ID of the target app * @param barcodes - Single barcode config or array of configs * @returns Cleanup function that removes the injection config * * @example * ```typescript * // Inject a QR code * const cleanup = await ios.injectBarcode(driver, "com.example.app", { * value: "https://example.com", * }); * * // Inject multiple barcodes * const cleanup = await ios.injectBarcode(driver, "com.example.app", [ * { type: "org.iso.QRCode", value: "https://example.com" }, * { type: "org.gs1.EAN-13", value: "1234567890123" }, * ]); * * await cleanup(); * ``` */ declare function injectBarcode(driver: Browser, bundleId: string, barcodes: BarcodeConfig | BarcodeConfig[]): Promise<() => Promise>; /** * Inject iBeacon detections into the app's CLLocationManager. * * Always pushes the `{uuid}.region` file, which triggers * `locationManager(_:didEnterRegion:)`. When `beacons` is provided, also * pushes `{uuid}.beacon` so the app receives * `locationManager(_:didRangeBeacons:inRegion:)` callbacks. * * @param driver - The WebDriverIO browser instance * @param bundleId - Bundle ID of the target app * @param config - Beacon configuration with UUID and (optional) beacon list * @returns Cleanup function that removes the injection config files * * @example * ```typescript * // Region entry + ranging * const cleanup = await ios.injectBeacon(driver, "com.example.app", { * uuid: "8613BEAD-5465-4515-8F9C-AEEA717484C9", * beacons: [{ major: 1, minor: 7 }], * }); * * // Region entry only (no ranging) * const cleanup = await ios.injectBeacon(driver, "com.example.app", { * uuid: "e62c96fd-014a-454f-9b41-32245d802bb3", * }); * * await cleanup(); * ``` */ declare function injectBeacon(driver: Browser, bundleId: string, config: BeaconConfig): Promise<() => Promise>; /** * Inject a camera/video feed into the app's AVCaptureSession. * * Replaces the camera input with the provided image or video. Affects photo * capture, video data output, video recording, and preview layers. * * When `data` is a local file path, the file is pushed to the device first. * URLs and data URIs are downloaded/decoded by the injection dylib on device. * * Cannot be used simultaneously with `injectAudio` (they share the same config file). * * @param driver - The WebDriverIO browser instance * @param bundleId - Bundle ID of the target app * @param source - Media source configuration * @returns Cleanup function that removes the injection config and media file * * @example * ```typescript * // Inject a local image as camera feed * const cleanup = await ios.injectCamera(driver, "com.example.app", { * data: "/path/to/image.jpg", * type: "image", * }); * * // Inject a video from URL * const cleanup = await ios.injectCamera(driver, "com.example.app", { * data: "https://example.com/video.mp4", * type: "video", * }); * * await cleanup(); * ``` */ declare function injectCamera(driver: Browser, bundleId: string, source: CameraSource): Promise<() => Promise>; /** * Install a configuration profile on the iOS device. * * @param driver - The WebDriverIO browser instance * @param profileString - The configuration profile plist string * @returns A function to uninstall the configuration profile * @example * ```typescript * const uninstall = await ios.installConfigurationProfile(driver, profilePlistString); * // ... run your test ... * await uninstall(); // Clean up after the test * ``` */ declare function installConfigurationProfile(driver: Browser, profileString: string): Promise<() => Promise>; export declare type IosApi = typeof iosModule; export declare type IosDependencies = BaseDependencies & { /** @deprecated Use `device` from `@qawolf/flows/ios` instead. */ ios: IosApi; /** @deprecated Use `launch()` from `@qawolf/flows/ios` instead. */ wdio: WebDriverIo; }; export declare type IosExecutionTarget = z.input; declare const iosExecutionTargetSchema: z.ZodDiscriminatedUnion<[z.ZodCodec>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15": "iPhone 15"; }>; iosVersion: z.ZodEnum<{ 17: "17"; 18: "18"; 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15 Plus": "iPhone 15 Plus"; }>; iosVersion: z.ZodEnum<{ 17: "17"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 15 Pro Max": "iPhone 15 Pro Max"; }>; iosVersion: z.ZodEnum<{ 17: "17"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 16 Plus": "iPhone 16 Plus"; }>; iosVersion: z.ZodEnum<{ 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPhone 17": "iPhone 17"; }>; iosVersion: z.ZodEnum<{ 26: "26"; }>; }, z.core.$strip>, z.ZodObject<{ appleId: z.ZodOptional>; deviceUdid: z.ZodOptional; targetDevices: z.ZodDefault>; deviceModel: z.ZodEnum<{ "iPad 11": "iPad 11"; }>; iosVersion: z.ZodEnum<{ 18: "18"; 26: "26"; }>; }, z.core.$strip>], "deviceModel">; platform: z.ZodEnum<{ ios: "ios"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodObject<{ appleId: z.ZodOptional>; deviceModel: z.ZodEnum<{ iphone15_4: "iphone15_4"; iphone15_5: "iphone15_5"; iphone16_2: "iphone16_2"; iphone17_4: "iphone17_4"; iphone18_3: "iphone18_3"; ipad15_7: "ipad15_7"; }>; deviceUdid: z.ZodOptional; iosVersion: z.ZodEnum<{ 17: "17"; 18: "18"; 26: "26"; }>; screenHeight: z.ZodNumber; screenWidth: z.ZodNumber; targetDevices: z.ZodEnum<{ anyDevice: "anyDevice"; allowlistedDevice: "allowlistedDevice"; teamDedicatedDevice: "teamDedicatedDevice"; }>; }, z.core.$strip>; runnerName: z.ZodEnum<{ node20WithIos: "node20WithIos"; }>; platform: z.ZodEnum<{ ios: "ios"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">; declare namespace iosModule { export { startSpeakerRecording, stopSpeakerRecording, downloadSpeakerRecording, calculateAudioFingerprint, SpeakerRecordingSession, SpeakerRecordingFile, AudioFingerprint, savePhoto, listPhotos, deleteAllPhotos, PhotoAsset, SavePhotoResult, ListPhotosResult, DeletePhotosResult, installConfigurationProfile, ConfigurationProfileOptions, routeTraffic, getNetworkStatus, subscribeNetworkLogs, simulateNetworkCondition, getNetworkCondition, NETWORK_2G_EDGE, NETWORK_3G, NETWORK_4G_LTE, NETWORK_5G, NETWORK_SATELLITE, NETWORK_WIFI_CONGESTED, NETWORK_VERY_BAD, NETWORK_OFFLINE, NetworkConditionConfigSchema, NetworkConditionStatusSchema, RouteType, TunnelStatus, TunnelState, TunnelStatusMap, NetworkStatus, NetworkLogSubscription, HttpProxyTunnel, WireGuardTunnel, OpenVPNTunnel, TunnelConfig, RouteTrafficConfig, NetworkConditionConfig, NetworkConditionStatus, RecordedEntry, injectBarcode, BarcodeConfig, injectCamera, injectAudio, CameraSource, AudioSource, injectBeacon, BeaconConfig, setWebViewDebugging } } export declare type IosPresetLiteral = (typeof iosPresetLiteralRaw)[number]; declare const iosPresetLiteralRaw: readonly ["iOS - Allowlisted iPhone", "iOS - Apple ID Enabled iPad", "iOS - Apple ID Enabled iPhone", "iOS - iPad", "iOS - iPad 11 (iOS 18)", "iOS - iPad 11 (iOS 18) (Apple ID)", "iOS - iPad 11 (iOS 26)", "iOS - iPhone 15 (iOS 17)", "iOS - iPhone 15 (iOS 18)", "iOS - iPhone 15 (iOS 26)", "iOS - iPhone 15 (iOS 26) (Apple ID)", "iOS - iPhone 15 (iOS 26) (allowlisted)", "iOS - iPhone 15 (iOS 26) (private)", "iOS - iPhone 17 (iOS 26)"]; declare type JsonPrimitiveValue = boolean | null | number | string; export declare type JsonSerializable = Exclude; export declare type JsonSerializableInner = undefined | JsonPrimitiveValue | JsonSerializableInner[] | { [_ in string]?: JsonSerializableInner; }; declare type LaunchBrowserContextOptions = BrowserContextLaunchOptions & BrowserLaunchOptions & { browser?: "chrome" | "chromium" | "firefox" | "msedge" | "webkit"; headless?: boolean; polyfills?: { intlListFormat?: boolean; }; }; export declare type LaunchBrowserResult = { browser: QAWolfBrowser; browserType: "chromium" | "firefox" | "webkit"; context: BrowserContext; }; declare type LaunchElectronResult = { electronApplication: ElectronApplication; firstWindowPage: Page; }; export declare type LaunchOptions = LaunchBrowserContextOptions | LaunchPersistentContextOptions; declare type LaunchPersistentContextOptions = LaunchBrowserContextOptions & { persistentContext: true; userDataDir?: string; }; export declare type LaunchPersistentContextResult = { browserType: "chromium" | "firefox" | "webkit"; context: BrowserContext; page: Page; }; export declare type LaunchResult = LaunchBrowserResult | LaunchPersistentContextResult; /** * List all photos and videos from the Photos library. * Returns full protocol response with success status, assets array, and total count. * * @param driver - The WebDriverIO browser instance * @returns Promise resolving to list result with assets and count * @example * ```typescript * const result = await ios.listPhotos(driver); * console.log(`Found ${result.totalCount} photos in library`); * result.assets.forEach(asset => { * console.log(`${asset.mediaType}: ${asset.localIdentifier}`); * }); * ``` */ declare function listPhotos(driver: Browser): Promise; /** * Result of listing photos from the Photos library */ declare type ListPhotosResult = z.input; /** * Schema for the result of listing photos from the Photos library */ declare const ListPhotosResultSchema: z.ZodObject<{ success: z.ZodBoolean; assets: z.ZodArray>; totalCount: z.ZodNumber; }, z.core.$strip>; /** 2G EDGE: ~240 Kbps, 300ms latency, high jitter */ declare const NETWORK_2G_EDGE: { readonly bandwidthKbps: 240; readonly latencyMs: 300; readonly jitterMs: 100; readonly packetLossPercent: 1.5; }; /** 3G: ~1.8 Mbps, 100ms latency */ declare const NETWORK_3G: { readonly bandwidthKbps: 1800; readonly latencyMs: 100; readonly jitterMs: 30; readonly packetLossPercent: 0.5; }; /** 4G LTE: ~12 Mbps, 30ms latency */ declare const NETWORK_4G_LTE: { readonly bandwidthKbps: 12000; readonly latencyMs: 30; readonly jitterMs: 10; readonly packetLossPercent: 0.1; }; /** 5G: ~100 Mbps, 10ms latency */ declare const NETWORK_5G: { readonly bandwidthKbps: 100000; readonly latencyMs: 10; readonly jitterMs: 3; readonly packetLossPercent: 0.01; }; /** Offline: 100% packet loss — drops all packets to simulate no connectivity */ declare const NETWORK_OFFLINE: { readonly packetLossPercent: 100; }; /** Satellite: ~5 Mbps, 600ms latency */ declare const NETWORK_SATELLITE: { readonly bandwidthKbps: 5000; readonly latencyMs: 600; readonly jitterMs: 50; readonly packetLossPercent: 1; }; /** Very bad network: ~100 Kbps, 500ms latency, extreme jitter and packet loss */ declare const NETWORK_VERY_BAD: { readonly bandwidthKbps: 100; readonly latencyMs: 500; readonly jitterMs: 200; readonly packetLossPercent: 10; }; /** Congested WiFi: ~2 Mbps, 50ms latency, high jitter and packet loss */ declare const NETWORK_WIFI_CONGESTED: { readonly bandwidthKbps: 2000; readonly latencyMs: 50; readonly jitterMs: 40; readonly packetLossPercent: 3; }; declare type NetworkConditionConfig = z.infer; declare const NetworkConditionConfigSchema: z.ZodObject<{ bandwidthKbps: z.ZodOptional; latencyMs: z.ZodOptional; jitterMs: z.ZodOptional; packetLossPercent: z.ZodOptional; }, z.core.$strip>; declare type NetworkConditionStatus = z.infer; declare const NetworkConditionStatusSchema: z.ZodObject<{ enabled: z.ZodBoolean; config: z.ZodOptional; latencyMs: z.ZodOptional; jitterMs: z.ZodOptional; packetLossPercent: z.ZodOptional; }, z.core.$strip>>; interface: z.ZodOptional; }, z.core.$strip>; /** * Route traffic from specific apps through the gateway. * * This is the main entry point for traffic routing. It handles: * 1. Setting up the per-app VPN to intercept traffic from specified apps * 2. Optionally starting a tunnel (HTTP proxy, WireGuard, or OpenVPN) * 3. Activating the route (tunnel type, or "direct" when no tunnel) * * When tunnel type is "direct", traffic flows through the gateway in direct mode * (GOST SOCKS5 → internet). This is useful for network condition simulation * without needing a proxy or VPN. * * Uses the Appium server's sessionless REST endpoint so no active WebDriver * session is required. This allows routing to be set up *before* creating a * browser session, giving the VPN time to become active. * * Appium URL is resolved from APPIUM_HOST / APPIUM_PORT env vars (default 127.0.0.1:4723). * * Returns a cleanup function that tears down everything in the correct order. * * @param config - Traffic routing configuration * @returns Cleanup function to stop routing and tear down tunnel * * @example * ```typescript * // Direct mode — route through gateway without a tunnel * const cleanup = await ios.routeTraffic({ * apps: ["com.apple.mobilesafari"], * tunnel: { type: "direct" }, * socksHost: "192.168.2.1", * }); * * // With a tunnel * const cleanup = await ios.routeTraffic({ * apps: ["com.apple.mobilesafari"], * domains: ["*.example.com"], * tunnel: { * type: "http-proxy", * host: "proxy.example.com", * port: 8080, * }, * }); * * // ... run tests ... * * await cleanup(); * ``` */ declare type NetworkLogHandler = (entry: RecordedEntry) => void; declare interface NetworkLogSubscription { on(handler: NetworkLogHandler): void; close(): void; } declare type NetworkStatus = z.infer; declare const NetworkStatusSchema: z.ZodObject<{ route: z.ZodEnum<{ direct: "direct"; "http-proxy": "http-proxy"; wireguard: "wireguard"; openvpn: "openvpn"; relay: "relay"; }>; tunnels: z.ZodRecord; interface: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>>; routingTables: z.ZodOptional>; }, z.core.$strip>>; traffic: z.ZodOptional>; interfaces: z.ZodRecord>; }, z.core.$strip>>; vpnApp: z.ZodObject<{ bundleId: z.ZodString; installed: z.ZodBoolean; pid: z.ZodOptional; }, z.core.$strip>; routedApps: z.ZodArray; routedDomains: z.ZodArray; }, z.core.$strip>; declare type OpenVPNTunnel = z.infer; declare const OpenVPNTunnelSchema: z.ZodObject<{ type: z.ZodLiteral<"openvpn">; configPath: z.ZodString; }, z.core.$strip>; export { ParsedEmail } /** * Represents a photo or video asset in the Photos library */ declare type PhotoAsset = z.input; /** * Schema for a photo or video asset in the Photos library */ declare const PhotoAssetSchema: z.ZodObject<{ localIdentifier: z.ZodString; mediaType: z.ZodString; mediaSubtype: z.ZodString; creationDate: z.ZodString; modificationDate: z.ZodString; pixelWidth: z.ZodNumber; pixelHeight: z.ZodNumber; duration: z.ZodNumber; isFavorite: z.ZodBoolean; isHidden: z.ZodBoolean; }, z.core.$strip>; /** * Plays back the automation macro from the given file. Can use a built-in macro or a custom file. * * Use with `setVirtualSceneImage` to set the virtual scene image. * * ```plaintext * 'play ': start playing back the macro from the given file. * ``` * * @param options the geo location options * @param runCommandOptions optional options to pass to runCommand * @throws if the command failed */ declare function playAutomation(options: PlayAutomationOptions, runCommandOptions?: Omit): Promise; declare type PlayAutomationOptions = z.input; /** * Options for playing back an automation macro. */ declare const PlayAutomationOptions_2: z.ZodUnion; overrideMacroPath: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ file: z.ZodString; }, z.core.$strip>]>; declare type PlayAutomationOptions = z.input; export declare type PresetLiteral = z.infer; declare const presetLiteralsSchema: z.ZodUnion, z.ZodEnum<{ "iOS - Allowlisted iPhone": "iOS - Allowlisted iPhone"; "iOS - Apple ID Enabled iPad": "iOS - Apple ID Enabled iPad"; "iOS - Apple ID Enabled iPhone": "iOS - Apple ID Enabled iPhone"; "iOS - iPad": "iOS - iPad"; "iOS - iPad 11 (iOS 18)": "iOS - iPad 11 (iOS 18)"; "iOS - iPad 11 (iOS 18) (Apple ID)": "iOS - iPad 11 (iOS 18) (Apple ID)"; "iOS - iPad 11 (iOS 26)": "iOS - iPad 11 (iOS 26)"; "iOS - iPhone 15 (iOS 17)": "iOS - iPhone 15 (iOS 17)"; "iOS - iPhone 15 (iOS 18)": "iOS - iPhone 15 (iOS 18)"; "iOS - iPhone 15 (iOS 26)": "iOS - iPhone 15 (iOS 26)"; "iOS - iPhone 15 (iOS 26) (Apple ID)": "iOS - iPhone 15 (iOS 26) (Apple ID)"; "iOS - iPhone 15 (iOS 26) (allowlisted)": "iOS - iPhone 15 (iOS 26) (allowlisted)"; "iOS - iPhone 15 (iOS 26) (private)": "iOS - iPhone 15 (iOS 26) (private)"; "iOS - iPhone 17 (iOS 26)": "iOS - iPhone 17 (iOS 26)"; }>, z.ZodEnum<{ Basic: "Basic"; Electron: "Electron"; "Web - Chrome": "Web - Chrome"; "Web - Chrome (GPU)": "Web - Chrome (GPU)"; "Web - Firefox": "Web - Firefox"; "Web - Firefox (GPU)": "Web - Firefox (GPU)"; "Web - Safari": "Web - Safari"; "Web - Safari (GPU)": "Web - Safari (GPU)"; }>]>; declare type ProxyOptions = z.input; declare const ProxyOptions_2: z.ZodObject<{ url: z.ZodString; }, z.core.$strip>; declare type ProxyOptions = z.input; /** * A collection of QA Wolf utility functions and readonly settings. */ export declare type QaWolf = { /** Intentionally crash the test. */ crash(): never; /** The execution target for this run. */ executionTarget: ExecutionTargetOutput; }; declare class QAWolfBrowser extends EventEmitter implements Browser_2 { _browser: Browser_2; constructor(browser: Browser_2); addListener(event: string | symbol, listener: (...args: any[]) => void): this; browserType(): BrowserType< {}>; close(): Promise; contexts(): BrowserContext[]; isConnected(): boolean; newBrowserCDPSession(): Promise; newContext(options?: BrowserContextOptions): Promise; newPage(...args: Parameters): Promise; off(event: string | symbol, listener: (...args: any[]) => void): this; on(event: string | symbol, listener: (...args: any[]) => void): this; once(event: string | symbol, listener: (...args: any[]) => void): this; removeAllListeners(type?: string | symbol): this; removeAllListeners(type: string | symbol | undefined, options: { behavior?: "wait" | "ignoreErrors" | "default"; }): Promise; removeListener(event: string | symbol, listener: (...args: any[]) => void): this; startTracing(...args: Parameters): Promise; stopTracing(): Promise; [Symbol.asyncDispose](): Promise; version(): string; } /** A recorded network entry from GOST MITM inspection */ declare interface RecordedEntry { service: string; network: string; remote?: string; local?: string; host?: string; proto?: string; http?: { host: string; method: string; proto: string; scheme: string; uri: string; statusCode: number; request?: { contentLength: number; header: Record; body: string | null; }; response?: { contentLength: number; header: Record; body: string | null; }; }; websocket?: { from: string; fin: boolean; rsv1: boolean; rsv2: boolean; rsv3: boolean; opcode: number; masked: boolean; maskKey: number; length: number; payload: string; }; tls?: { serverName: string; cipherSuite: string; version: string; proto?: string; }; dns?: { id: number; name: string; class: string; type: string; question: string; answer: string; cached: boolean; }; sid: string; time: string; duration: number; } declare function routeTraffic(config: RouteTrafficConfig): Promise<() => Promise>; declare type RouteTrafficConfig = z.infer; declare const RouteTrafficConfigSchema: z.ZodObject<{ apps: z.ZodArray; domains: z.ZodOptional>; tunnel: z.ZodUnion; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http-proxy">; host: z.ZodString; port: z.ZodNumber; username: z.ZodOptional; password: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"wireguard">; configPath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"openvpn">; configPath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"relay">; host: z.ZodString; port: z.ZodNumber; username: z.ZodString; password: z.ZodString; dialer: z.ZodOptional>; secure: z.ZodOptional; }, z.core.$strip>]>; socksHost: z.ZodOptional; socksPort: z.ZodOptional; inspect: z.ZodOptional; }, z.core.$strip>; declare type RouteType = z.infer; declare const RouteTypeSchema: z.ZodEnum<{ direct: "direct"; "http-proxy": "http-proxy"; wireguard: "wireguard"; openvpn: "openvpn"; relay: "relay"; }>; export declare type RunCommandOptions = { /** * The command will run in the user's home directory by default. * This allows you to specify a subdirectory in the user's home directory. */ cwdRelativeToHome?: string | undefined; /** * By default, the command will throw an error if stderr is not empty. * If you provide a function here, it will be called with the stderr * string as its only argument whenever there is a non-empty stderr. * The stderr will not be thrown. * Use this for commands that output to stderr but still succeed. */ logStderr?: ((stderr: string) => void) | undefined; /** * The command will time out after 1 minute by default. * This allows you to specify a custom timeout in milliseconds. */ timeout?: number | undefined; }; declare const RunCommandOptions_2: z.ZodObject<{ amendPath: z.ZodOptional; args: z.ZodDefault>; cwdRelativeToHome: z.ZodOptional; logStderr: z.ZodOptional, z.core.$ZodFunctionOut>>; timeout: z.ZodOptional; }, z.core.$strip>; declare type RunCommandOptions_2 = z.input; /** * Save an image file from the filesystem to the device Photos library. * This function handles the entire workflow: * 1. Reads the file from the filesystem * 2. Pushes it to the device's app container * 3. Saves it to Photos library via the iOS agent * 4. Cleans up the temporary file from the device * * @param driver - The WebDriverIO browser instance * @param filePath - Absolute path to the file on the filesystem * @returns Promise resolving to the save operation result * @example * ```typescript * const result = await ios.savePhoto(driver, '/Users/me/photo.jpg'); * if (result.success) { * console.log('Photo saved to library'); * } * ``` */ declare function savePhoto(driver: Browser, filePath: string): Promise; /** * Result of saving a photo to the Photos library */ declare type SavePhotoResult = z.input; /** * Schema for the result of saving a photo to the Photos library */ declare const SavePhotoResultSchema: z.ZodObject<{ success: z.ZodBoolean; message: z.ZodOptional; }, z.core.$strip>; export { SendMessage } export { SendMessageResult } /** * Set the geo location of the emulator. * * ```plaintext * 'geo fix [ [ []]]' * allows you to send a simple GPS fix to the emulated system. * The parameters are: * * longitude, in decimal degrees * latitude, in decimal degrees * optional altitude in meters * number of satellites being tracked (1-12) * optional velocity in knots * ``` * * @param options the geo location options * @param runCommandOptions optional options to pass to runCommand * @throws if the command failed */ declare function setGeoLocation(options: GeoLocationOptions, runCommandOptions?: Omit): Promise; /** * Set the proxy for the emulator. If the proxy requires authentication, * username and password must be provided in the URL. * Example URL: http://username:password@proxy.example.com:8080 * * @param options the proxy options * @param runCommandOptions optional options to pass to runCommand * @throws if the command failed */ declare function setProxy(options: ProxyOptions, runCommandOptions?: Omit): Promise; /** * Set or reset the virtual scene image. * * ```plaintext * Usage: virtualscene-image [path-to-image]. * If path-to-image is void, restore default image. * ``` * * @param options the virtual scene image options * @param runCommandOptions optional options to pass to runCommand * @throws if the command failed */ declare function setVirtualSceneImage(options: VirtualSceneImageOptions, runCommandOptions?: Omit): Promise; /** * Toggle WebView debugging (Safari Web Inspector) for all WKWebViews in the app. * * When enabled, WKWebViews become inspectable via Safari DevTools. * The default behavior (when no config file exists) is enabled. * * @param driver - The WebDriverIO browser instance * @param bundleId - Bundle ID of the target app * @param enabled - Whether to enable or disable WebView debugging * @returns Cleanup function that removes the config (reverts to default: enabled) * * @example * ```typescript * // Disable WebView debugging * const cleanup = await ios.setWebViewDebugging(driver, "com.example.app", false); * * // Re-enable (cleanup removes config, which defaults to enabled) * await cleanup(); * ``` */ declare function setWebViewDebugging(driver: Browser, bundleId: string, enabled: boolean): Promise<() => Promise>; /** * Simulate a network condition (bandwidth limit, latency, jitter, packet loss) * on traffic flowing through the gateway. * * Returns a cleanup function that clears the condition. * * @example * ```typescript * // Use a built-in preset * const cleanup = await ios.simulateNetworkCondition(ios.NETWORK_3G); * await cleanup(); * * // Custom config * const cleanup = await ios.simulateNetworkCondition({ bandwidthKbps: 500, latencyMs: 200 }); * await cleanup(); * ``` */ declare function simulateNetworkCondition(config: NetworkConditionConfig): Promise<() => Promise>; /** * Represents a recorded audio file with optional fingerprint data */ declare type SpeakerRecordingFile = z.input; /** * Schema for a recorded audio file with optional fingerprint data */ declare const SpeakerRecordingFileSchema: z.ZodObject<{ filename: z.ZodString; fingerprint: z.ZodOptional>; duration: z.ZodOptional; }, z.core.$strip>; /** * Represents an active speaker recording session */ declare type SpeakerRecordingSession = z.input; /** * Schema for an active speaker recording session */ declare const SpeakerRecordingSessionSchema: z.ZodObject<{ id: z.ZodString; status: z.ZodString; }, z.core.$strip>; /** * Start audio recording on the iOS device. * This creates a new recording session and returns a session identifier * that must be used to stop the recording. * * @param driver - The WebDriverIO browser instance * @returns Promise resolving to the audio session information * @example * ```typescript * const session = await ios.startSpeakerRecording(driver); * console.log(`Recording started with session ID: ${session.id}`); * ``` */ declare function startSpeakerRecording(driver: Browser): Promise; /** * Stop audio recording and finalize the audio file. * This also calculates the audio fingerprint automatically. * * @param driver - The WebDriverIO browser instance * @param sessionId - The session ID returned from startRecording * @returns Promise resolving to the audio file information including fingerprint * @example * ```typescript * const file = await ios.stopSpeakerRecording(driver, session.id); * console.log(`Recording saved to: ${file.filename}`); * if (file.fingerprint) { * console.log(`Fingerprint has ${file.fingerprint.length} values`); * } * ``` */ declare function stopSpeakerRecording(driver: Browser, sessionId: string): Promise; /** * Subscribe to real-time network entries streamed via SSE from the * Appium plugin. Requires `routeTraffic()` to have been called first * with `inspect: true`. * * Each call opens its own SSE connection to the plugin; closing the * subscription tears it down. No shared state. * * @example * ```typescript * const logs = ios.subscribeNetworkLogs(); * logs.on((entry) => { * if (entry.http) console.log(`${entry.http.method} ${entry.http.uri} → ${entry.http.statusCode}`); * if (entry.dns) console.log(`DNS ${entry.dns.name} → ${entry.dns.answer}`); * }); * * // ... run tests ... * * logs.close(); * ``` */ declare function subscribeNetworkLogs(): NetworkLogSubscription; declare type TunnelConfig = z.infer; declare const TunnelConfigSchema: z.ZodUnion; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"http-proxy">; host: z.ZodString; port: z.ZodNumber; username: z.ZodOptional; password: z.ZodOptional; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"wireguard">; configPath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"openvpn">; configPath: z.ZodString; }, z.core.$strip>, z.ZodObject<{ type: z.ZodLiteral<"relay">; host: z.ZodString; port: z.ZodNumber; username: z.ZodString; password: z.ZodString; dialer: z.ZodOptional>; secure: z.ZodOptional; }, z.core.$strip>]>; declare type TunnelState = z.infer; declare const TunnelStateSchema: z.ZodObject<{ status: z.ZodEnum<{ down: "down"; starting: "starting"; up: "up"; error: "error"; }>; interface: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>; declare type TunnelStatus = z.infer; declare type TunnelStatusMap = z.infer; declare const TunnelStatusMapSchema: z.ZodRecord; interface: z.ZodOptional; error: z.ZodOptional; }, z.core.$strip>>; declare const TunnelStatusSchema: z.ZodEnum<{ down: "down"; starting: "starting"; up: "up"; error: "error"; }>; declare type VirtualSceneImageOptions = z.input; declare const VirtualSceneImageOptions_2: z.ZodObject<{ image: z.ZodDefault; location: z.ZodEnum<{ wall: "wall"; table: "table"; }>; }, z.core.$strip>; declare type VirtualSceneImageOptions = z.input; export { WaitForMessage } export declare type WebDependencies = BaseDependencies & { /** @deprecated Use `#playwright` instead. */ devices: Devices; isGpuAvailable: () => boolean; /** @deprecated Use `launch()` from `@qawolf/flows/web` instead. */ launch: { (launchOptions?: LaunchBrowserContextOptions, onPlaywrightApiLogs?: (severity: "verbose" | "info" | "warning" | "error", message: string | Error) => void): Promise; (launchOptions?: LaunchPersistentContextOptions, onPlaywrightApiLogs?: (severity: "verbose" | "info" | "warning" | "error", message: string | Error) => void): Promise; }; /** @deprecated Use the "Electron" target with `launch({ executablePath })` from `@qawolf/flows/web` instead. */ launchElectron: (executablePath: string) => Promise; /** @deprecated Use `launch()` from `@qawolf/flows/web` with a GPU-enabled execution target instead. */ launchWithGpu: { (launchOptions?: LaunchBrowserContextOptions, onPlaywrightApiLogs?: (severity: "verbose" | "info" | "warning" | "error", message: string | Error) => void): Promise; (launchOptions?: LaunchPersistentContextOptions, onPlaywrightApiLogs?: (severity: "verbose" | "info" | "warning" | "error", message: string | Error) => void): Promise; }; /** @deprecated Import from `@qawolf/testkit/web` instead. */ readQRCode: typeof readQRCode; /** * @deprecated Import from `@qawolf/testkit` instead. * * Save a baseline screenshot to be used for visual regression testing. * * @param pageOrLocator The page or locator to capture * @param name The name to save the screenshot under * @param screenshotOptions Optional screenshot options */ saveBaselineScreenshot: (pageOrLocator: Page | Locator, name: string, screenshotOptions?: PageScreenshotOptions | LocatorScreenshotOptions) => Promise; /** @deprecated Use `#playwright` instead. */ selectors: typeof selectors; }; export declare type WebDriverIo = { expect: (driver: Browser) => { toHaveScreenshot: { (element: WebdriverIO.Element, name: string, options?: { maxMisMatchPercentage?: number; skipDiffUI?: boolean; }): Promise; (name: string, options?: { maxMisMatchPercentage?: number; skipDiffUI?: boolean; }): Promise; }; }; startAndroid: (optionsOrAppPath?: string | { [key: string]: unknown; "appium:app"?: string; "appium:appActivity"?: string; "appium:appPackage"?: string; "appium:appWaitActivity"?: string; "appium:autoGrantPermissions"?: boolean; "appium:noReset"?: boolean; "appium:waitForIdleTimeout"?: number; browserName?: string; "qawolf:webviewDebuggable"?: boolean; }) => Promise; startIos: (optionsOrAppPath?: string | { [key: string]: unknown; "appium:app"?: string; "appium:autoAcceptAlerts"?: boolean; "appium:autoDismissAlerts"?: boolean; "appium:bundleId"?: string; "appium:noReset"?: boolean; "appium:platformVersion"?: string; "appium:settings[respectSystemAlerts]"?: boolean; "appium:settings[snapshotMaxDepth]"?: number; "appium:udid"?: string; "appium:waitForIdleTimeout"?: number; "appium:webDriverAgentUrl"?: string; "appium:webviewAtomWaitTimeout"?: number; browserName?: string; "qawolf:driver"?: "legacy" | "wolfdriver"; }) => Promise; }; export declare type WebExecutionTarget = z.input; declare const webExecutionTargetSchema: z.ZodDiscriminatedUnion<[z.ZodCodec; defaultBrowser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ browser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; defaultBrowser: z.ZodOptional; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>]>, z.ZodObject<{ browser: z.ZodOptional; defaultBrowser: z.ZodOptional; gpuEnabled: z.ZodDefault>; kind: z.ZodLiteral<"electron">; }, z.core.$strip>]>, z.ZodLiteral<"legacy">]>; platform: z.ZodEnum<{ web: "web"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>, z.ZodObject<{ meta: z.ZodUnion; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ browser: z.ZodObject<{ name: z.ZodEnum<{ chrome: "chrome"; firefox: "firefox"; safari: "safari"; }>; screenHeight: z.ZodDefault; screenWidth: z.ZodDefault; }, z.core.$strip>; gpuEnabled: z.ZodBoolean; kind: z.ZodDefault>; }, z.core.$strip>, z.ZodObject<{ gpuEnabled: z.ZodLiteral; kind: z.ZodLiteral<"electron">; }, z.core.$strip>, z.ZodLiteral<"legacy">]>; platform: z.ZodLiteral<"web">; runnerName: z.ZodEnum<{ node20Basic: "node20Basic"; node20GpuWithPlaywright: "node20GpuWithPlaywright"; node20WithPlaywright: "node20WithPlaywright"; }>; schemaVersion: z.ZodLiteral<1>; }, z.core.$strip>>], "schemaVersion">; export declare type WebPresetLiteral = (typeof webPresetLiteralRaw)[number]; declare const webPresetLiteralRaw: readonly ["Basic", "Electron", "Web - Chrome", "Web - Chrome (GPU)", "Web - Firefox", "Web - Firefox (GPU)", "Web - Safari", "Web - Safari (GPU)"]; declare type WireGuardTunnel = z.infer; declare const WireGuardTunnelSchema: z.ZodObject<{ type: z.ZodLiteral<"wireguard">; configPath: z.ZodString; }, z.core.$strip>; export declare type WorkflowInput = Record>; export { }