Closed
Description
What are you trying to achieve?
I want to use I.closeApp()
in an Appium test against Android device.
Appium docs for closeApp() says that it's allowed on Android/UiAutomator
What do you get instead?
CodeceptJS allows it for iOS only.
node_modules/codeceptjs/docs/build/Appium.js
:
/**
* Close the given application.
*
* ```js
* I.closeApp();
* ```
*
* Appium: support only iOS
*/
async closeApp() {
onlyForApps.call(this, 'iOS');
return this.browser.closeApp();
}
Note that I created the same method (without blocking of Android platform) in my custom helper and it works well with Android:
async closeApp() {
const browser = this.helpers["Appium"].browser;
await browser.closeApp();
}
Details
- CodeceptJS version: 3.0.5
- NodeJS Version: v12.21.0
- Operating System: Ubuntu 20.04
- Appium 1.15.1
- Android Studio 4.1.3 emulator Nexus 9 (Android 9)