UNPKG

@wdio/sauce-service

Version:

WebdriverIO service that provides a better integration into Sauce Labs

57 lines 2.17 kB
/** * Determine if the current instance is a RDC instance. RDC tests are Real Device tests * that can be started with different sets of capabilities. A deviceName is not mandatory, the only mandatory cap for * RDC is the platformName. Downside of the platformName is that is can also be EMUSIM. EMUSIM can be distinguished by * the `Emulator|Simulator` postfix * * @param {object} caps * @returns {boolean} * * This is what we get back from the UP (for now) * * capabilities = { * webStorageEnabled: false, * locationContextEnabled: false, * browserName: 'safari', * platform: 'MAC', * javascriptEnabled: true, * databaseEnabled: false, * takesScreenshot: true, * networkConnectionEnabled: false, * platformVersion: '12.1.2', * webDriverAgentUrl: 'http://127.0.0.1:5700', * testobject_platform_name: 'iOS', * orientation: 'PORTRAIT', * realDevice: true, * build: 'Sauce Real Device browser iOS - 1594732389756', * commandTimeouts: { default: 60000 }, * testobject_device: 'iPhone_XS_ws', * automationName: 'XCUITest', * platformName: 'iOS', * udid: '', * deviceName: '', * testobject_test_report_api_url: '', * testobject_test_report_url: '', * testobject_user_id: 'wim.selles', * testobject_project_id: 'saucelabs-default', * testobject_test_report_id: 51, * testobject_device_name: 'iPhone XS', * testobject_device_session_id: '', * deviceContextId: '' * } */ export declare function isRDC(caps: WebdriverIO.Capabilities): boolean; /** * Determine if this is an EMUSIM session * @param {object} caps * @returns {boolean} */ export declare function isEmuSim(caps: WebdriverIO.Capabilities): boolean; /** Ensure capabilities are in the correct format for Sauce Labs * @param {string} tunnelName - The default Sauce Connect tunnel identifier * @param {object} options - Additional options to set on the capability * @returns {function(object): void} - A function that mutates a single capability */ export declare function makeCapabilityFactory(tunnelName: string): (capability: WebdriverIO.Capabilities) => void; export declare function ansiRegex(): RegExp; //# sourceMappingURL=utils.d.ts.map