appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
37 lines • 1.87 kB
TypeScript
import type { AppiumLogger } from '@appium/types';
/** Subset of appium-ios-remotexpc exports used here (types may lag the runtime package). */
export type RemotexpcAttachmentModule = {
XCTestAttachment?: XCTestAttachmentCtor;
};
export interface IXctestAttachmentDeletionClient {
deleteAttachmentsByUuid(uuids: string[]): Promise<void>;
}
type XCTestAttachmentCtor = new (udid: string) => {
delete(uuids: string[]): Promise<unknown>;
};
/**
* Deletes XCTest screen-recording attachments on a real device via appium-ios-remotexpc
* (testmanagerd). Use {@link isDeletionAvailable} before start; {@link create} returns a client
* ready to delete (or throws if deletion cannot run).
*/
export declare class XctestAttachmentDeletionClient implements IXctestAttachmentDeletionClient {
private readonly udid;
private readonly XCTestAttachment;
private constructor();
/**
* Whether attachment deletion can run: **iOS 18+**, **appium-ios-remotexpc** loadable, and
* **XCTestAttachment** exported (new enough package).
*
* @param remotexpcModule - optional pre-loaded module (for unit tests)
* @param log - if set, warns when the package is present but too old (no **XCTestAttachment** export)
*/
static isDeletionAvailable(udid: string, platformVersion: string, remotexpcModule?: RemotexpcAttachmentModule | null, log?: AppiumLogger): Promise<boolean>;
/**
* @param remotexpcModule - optional pre-loaded module (for unit tests)
* @throws {Error} If real-device XCTest attachment deletion is not supported
*/
static create(udid: string, platformVersion: string, remotexpcModule?: RemotexpcAttachmentModule | null): Promise<XctestAttachmentDeletionClient>;
deleteAttachmentsByUuid(uuids: string[]): Promise<void>;
}
export {};
//# sourceMappingURL=xctest-attachment-deletion-client.d.ts.map