Skip to content

Commit

Permalink
doc: subcommand usage workflows (#69)
Browse files Browse the repository at this point in the history
Co-authored-by: Priyansh Garg <[email protected]>
  • Loading branch information
itsspriyansh and garg3133 authored Sep 3, 2024
1 parent 1736a7c commit f4304f1
Show file tree
Hide file tree
Showing 4 changed files with 85 additions and 0 deletions.
15 changes: 15 additions & 0 deletions docs/subcommands/connect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Workflows of the `connect` subcommand

**Syntax**
```sh
npx @nightwatch/mobile-helper android connect FLAG [configs]
```

### 1. Connect a real device wirelessly

> Note: Only devices with Android version 11 or higher are supported.
Run the below command to connect to a real device wirelessly:
```sh
npx @nightwatch/mobile-helper android connect --wireless
```
32 changes: 32 additions & 0 deletions docs/subcommands/install.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
## Workflows of the `install` subcommand

**Syntax**
```sh
npx @nightwatch/mobile-helper android install FLAG [configs]
```

### 1. Install an APK

Run the below command to install an APK on a real device or an AVD:

```sh
npx @nightwatch/mobile-helper android install --app

# with configs
npx @nightwatch/mobile-helper android install --app [--deviceId <device_id>] [--path <path_to_apk>]
```

**Configs**

| Config | Description |
| ------------------------------ | -------------------------------------------------------------- |
| --deviceId \| -s <device_id> | Id of the device to install the APK to |
| --path \| -p <path_to_apk> | Path to the APK file relative to the current working directory |

### 2. Create a new Android Virtual Device

Run the below command to create a new AVD:

```sh
npx @nightwatch/mobile-helper android install --avd
```
23 changes: 23 additions & 0 deletions docs/subcommands/list.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
## Workflows of the `list` subcommand

**Syntax**

```sh
npx @nightwatch/mobile-helper android list [flags]
```

### 1. Show a list of connected devices

Run the below command to show a list of all the connected real devices and running AVDs:

```sh
npx @nightwatch/mobile-helper android list --device
```

### 2. Show a list of installed AVDs

Run the below command to show a list of all the currently installed AVDs

```sh
npx @nightwatch/mobile-helper android list --avd
```
15 changes: 15 additions & 0 deletions docs/subcommands/uninstall.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
## Workflows of the `uninstall` subcommand

**Syntax**

```sh
npx @nightwatch/mobile-helper android uninstall FLAG [configs]
```

### 1. Delete an Android Virtual Device (AVD)

Run the below command to delete an AVD:

```sh
npx @nightwatch/mobile-helper android uninstall --avd
```

0 comments on commit f4304f1

Please sign in to comment.