appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
31 lines • 1.59 kB
TypeScript
import { net } from 'appium/support';
import type { HTTPHeaders } from '@appium/types';
export type UploadOptions = {
/** The name of the user for remote authentication (only when `remotePath` is provided). */
user?: string;
/** The password for remote authentication (only when `remotePath` is provided). */
pass?: string;
/** Multipart upload HTTP method. Defaults to `PUT`. */
method?: net.HttpUploadOptions['method'];
/** Additional headers mapping for multipart HTTP(S) uploads. */
headers?: HTTPHeaders;
/** The form field name that receives the file blob in multipart uploads. */
fileFieldName?: string;
/** Additional form fields for multipart HTTP(S) uploads. */
formFields?: Record<string, any> | [string, any][];
};
/**
* Get the IDs of processes listening on the particular system port.
* It is also possible to apply additional filtering based on the
* process command line.
*/
export declare function getPIDsListeningOnPort(port: string | number, filteringFunc?: ((cmdLine: string) => boolean | Promise<boolean>) | null): Promise<string[]>;
/**
* Encodes the given local file to base64 and returns the resulting string
* or uploads it to a remote server using http/https or ftp protocols
* if `remotePath` is set
*/
export declare function encodeBase64OrUpload(localPath: string, remotePath?: string | null, uploadOptions?: UploadOptions): Promise<string>;
/** Returns true if the given URL host resolves to localhost. */
export declare function isLocalHost(urlString: string): boolean;
//# sourceMappingURL=network.d.ts.map