appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
62 lines • 2.86 kB
TypeScript
/**
* https://w3c.github.io/webdriver-bidi/#event-log-entryAdded
*
* @template {import('node:events').EventEmitter} EE
* @this {XCUITestDriver}
* @param {EE} logEmitter
* @param {BiDiListenerProperties} properties
* @returns {[EE, import('./types').LogListener]}
*/
export function assignBiDiLogListener<EE extends import("node:events").EventEmitter>(this: import("../driver").XCUITestDriver, logEmitter: EE, properties: BiDiListenerProperties): [EE, import("./types").LogListener];
declare namespace _default {
export { SUPPORTED_LOG_TYPES as supportedLogTypes };
/**
*
* @param {XCUITestDriverLogTypes} logType
* @param {Partial<Record<XCUITestDriverLogTypes,{getLogs(): Promise<any>}>>} [logsContainer]
* @this {XCUITestDriver}
*/
export function extractLogs(this: import("../driver").XCUITestDriver, logType: XCUITestDriverLogTypes, logsContainer?: Partial<Record<XCUITestDriverLogTypes, {
getLogs(): Promise<any>;
}>>): Promise<any>;
/**
* @this {XCUITestDriver}
*/
export function startLogCapture(this: import("../driver").XCUITestDriver): Promise<boolean>;
/**
* Starts an iOS system logs broadcast websocket.
*
* The websocket listens on the same host and port as Appium. The endpoint created is `/ws/session/:sessionId:/appium/syslog`.
*
* If the websocket is already running, this command does nothing.
*
* Each connected webcoket listener will receive syslog lines as soon as they are visible to Appium.
* @see https://appiumpro.com/editions/55-using-mobile-execution-commands-to-continuously-stream-device-logs-with-appium
* @returns {Promise<void>}
* @this {XCUITestDriver}
*/
export function mobileStartLogsBroadcast(this: import("../driver").XCUITestDriver): Promise<void>;
/**
* Stops the syslog broadcasting wesocket server previously started by `mobile: startLogsBroadcast`.
* If no websocket server is running, this command does nothing.
* @this {XCUITestDriver}
* @returns {Promise<void>}
*/
export function mobileStopLogsBroadcast(this: import("../driver").XCUITestDriver): Promise<void>;
}
export default _default;
export type XCUITestDriver = import("../driver").XCUITestDriver;
export type XCUITestDriverLogTypes = keyof typeof SUPPORTED_LOG_TYPES;
export type AppiumServer = import("@appium/types").AppiumServer;
export type BiDiListenerProperties = {
type: string;
srcEventName?: string | undefined;
context?: string | undefined;
entryTransformer?: ((x: any) => import("./types").LogEntry) | undefined;
};
/**
* @type {import('@appium/types').LogDefRecord}
* @privateRemarks The return types for these getters should be specified
*/
declare const SUPPORTED_LOG_TYPES: import("@appium/types").LogDefRecord;
//# sourceMappingURL=log.d.ts.map