How do I close a native mobile app?
The example demonstrates how to close a native mobile app.
In the solution below, the HICC app is closed using the ‘closeApp’ command.
Solution:
# | Command | Target | Value |
---|---|---|---|
Closing app | |||
1 | closeApp |
Tips, Tricks, Gotchas & Best Practices:
- You can store the app activity before using ‘closeApp’ with the ‘storeCurrentActivity’ command and then just call the variable in ‘assertNotCurrentActivity’.
- After closing the app, you can verify if the app is closed (not actively running) by using assertNotCurrentActivity or verifyNotCurrentActivity commands.