MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / runOnIOS

Method runOnIOS

lib/helper/Appium.js:472–478  ·  view source on GitHub ↗

* Execute code only on iOS * * ```js * I.runOnIOS(() => { * I.click('//UIAApplication[1]/UIAWindow[1]/UIAButton[1]'); * I.see('Hi, IOS', '~welcome'); * }); * ``` * * Additional filter can be applied by checking for capabilities. * For instance, this code will be e

(caps, fn)

Source from the content-addressed store, hash-verified

470 * @param {*} fn
471 */
472 async runOnIOS(caps, fn) {
473 if (this.platform !== 'ios') return
474 recorder.session.start('iOS-only actions')
475 this._runWithCaps(caps, fn)
476 recorder.add('restore from iOS session', () => recorder.session.restore())
477 return recorder.promise()
478 }
479
480 /**
481 * Execute code only on Android

Callers 3

Appium_test.jsFile · 0.45
AppiumTs.types.tsFile · 0.45
Appium.types.tsFile · 0.45

Calls 3

_runWithCapsMethod · 0.95
startMethod · 0.45
addMethod · 0.45

Tested by

no test coverage detected