* 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)
| 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 |
no test coverage detected