appium-xcuitest-driver
Version:
Appium driver for iOS using XCUITest for backend
47 lines • 3.35 kB
TypeScript
export function parseCommonName(stringCertificate: any): string;
declare namespace _default {
/**
* Installs a custom certificate onto the device.
*
* Since Xcode SDK 11.4, Apple has added a dedicated `simctl` subcommand to quickly handle
* certificates on Simulator over CLI.
*
* On real devices (or simulators before Xcode SDK 11.4), Apple provides no "official" way to do this via the command line. In such a case (and also as a fallback if CLI setup fails), this method tries to wrap the certificate into `.mobileconfig` format, then deploys the wrapped file to the internal HTTP server so that it can be opened via mobile Safari. This command then goes through the profile installation procedure by clicking the necessary buttons using WebDriverAgent.
* @param {string} content - Base64-encoded content of the public certificate in [PEM](https://knowledge.digicert.com/quovadis/ssl-certificates/ssl-general-topics/what-is-pem-format.html) format
* @param {string} [commonName] - Common name of the certificate. If this is not set, the command will try to parse it from the provided `content`.
* @param {boolean} isRoot - Defines where the certificate should be installed; either the Trusted Root Store (`true`) or the Keychain (`false`). On environments other than Xcode 11.4+ Simulator, this option is ignored.
* @returns {Promise<string|void>} The content of the generated `.mobileconfig` file as
* a base64-encoded string. This config might be useful for debugging purposes. If the certificate has been successfully set via CLI, then nothing is returned.
* @this {XCUITestDriver}
*/
function mobileInstallCertificate(this: import("../driver").XCUITestDriver, content: string, commonName?: string, isRoot?: boolean): Promise<string | void>;
/**
* Removes installed certificates.
*
* This only works _if and only if_ `py-ios-device` is installed on the same machine Appium is running on.
*
* @see https://github.com/YueChen-C/py-ios-device
* @since 4.19.2
* @param {string} name - Name of the profile
* @returns {Promise<string>} Returns status acknowledgment status if
* tht certificate is successfully removed or 'None' (basically just
* forwards the original pyidevice output)
* @throws {Error} If attempting to remove certificates for a simulated device or if `py-ios-device` is not installed
* @group Real Device Only
*/
function mobileRemoveCertificate(name: string): Promise<string>;
/**
* Returns map of certificates installed on the real device.
*
* This only works _if and only if_ `py-ios-device` is installed on the same machine Appium is running on.
* @since 4.10.0
* @see https://github.com/YueChen-C/py-ios-device
* @returns {Promise<import('./types').CertificateList>} An object describing the certificates installed on the real device.
* @throws {Error} If attempting to list certificates for a simulated device or if `py-ios-device` is not installed
* @this {XCUITestDriver}
*/
function mobileListCertificates(this: import("../driver").XCUITestDriver): Promise<import("./types").CertificateList>;
}
export default _default;
export type XCUITestDriver = import("../driver").XCUITestDriver;
//# sourceMappingURL=certificate.d.ts.map