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

Method runOnAndroid

lib/helper/Appium.js:514–520  ·  view source on GitHub ↗

* Execute code only on Android * * ```js * I.runOnAndroid(() => { * I.click('io.selendroid.testapp:id/buttonTest'); * }); * ``` * * Additional filter can be applied by checking for capabilities. * For instance, this code will be executed only on Android 6.0: * *

(caps, fn)

Source from the content-addressed store, hash-verified

512 * @param {*} fn
513 */
514 async runOnAndroid(caps, fn) {
515 if (this.platform !== 'android') return
516 recorder.session.start('Android-only actions')
517 this._runWithCaps(caps, fn)
518 recorder.add('restore from Android session', () => recorder.session.restore())
519 return recorder.promise()
520 }
521
522 /**
523 * Execute code only in Web mode.

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