Skip to content

Commit

Permalink
feat: add skipping app state check in terminateApp when the given tim…
Browse files Browse the repository at this point in the history
…eout is zero (#827)
  • Loading branch information
KazuCocoa authored Oct 19, 2022
1 parent 172608c commit a85364b
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -856,14 +856,19 @@ True is the app has been found on the device and successfully removed. Otherwise

### mobile: terminateApp

Terminates the app if it is running.
Terminates the app and waits until the app is terminated up to the given timeout
by checking the app state to ensure if the app process is actually stopped.

The app state check can be skipped if the given timeout is lower or equal to zero since Espresso driver 2.13.0.
The skip helps when you want to terminate the app process but do not want to check the process existence
because the app under test may, for example, restart it automatically.

#### Arguments

Name | Type | Required | Description | Example
--- | --- | --- | --- | ---
appId | string | yes | The identifier of the application package to be terminated | `my.app.id`
timeout | number | no | The count of milliseconds to wait until the app is terminated. 500ms by default. | 1500
timeout | number | no | The count of milliseconds to wait until the app is terminated. 500ms by default. | 1500, 0

#### Returned Result

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
"dependencies": {
"@babel/runtime": "^7.4.3",
"appium-adb": "^9.10.2",
"appium-android-driver": "^5.4.0",
"appium-android-driver": "^5.6.0",
"asyncbox": "^2.3.1",
"bluebird": "^3.5.0",
"lodash": "^4.17.11",
Expand Down

0 comments on commit a85364b

Please sign in to comment.