Skip to content

Commit 0e59438

Browse files
authored
docs: add plugin-related information (#2000)
* docs: adjust plugin-related information * docs: integrate plugin readme into main docs * docs: minor adjustments * chore: prettier
1 parent 57839a3 commit 0e59438

File tree

10 files changed

+88
-82
lines changed

10 files changed

+88
-82
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,14 @@ When inspecting a mobile app, the Inspector looks like this:
3737

3838
## Installation
3939

40-
Appium Inspector is released in two formats:
40+
Appium Inspector is released in 3 formats:
4141

4242
1. Standalone desktop application for macOS, Windows, and Linux - download it from the
4343
[**Releases**](https://github.com/appium/appium-inspector/releases) section
4444
2. Web application - **<https://inspector.appiumpro.com>** (note that
4545
[CORS must be enabled](https://appium.github.io/appium-inspector/latest/troubleshooting/#cannot-start-a-session-using-browser-inspector)
4646
in order to connect to an Appium server)
47+
3. Appium server plugin - see the [**plugin README**](./plugins/README.md) for details
4748

4849
Check the [System Requirements](https://appium.github.io/appium-inspector/latest/quickstart/requirements/)
4950
and [Installation](https://appium.github.io/appium-inspector/latest/quickstart/installation/)

docs/contributing.md

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Want to contribute to this app? We'd love it!
99

1010
## Code
1111

12-
The code for this app is based on React and Electron.
12+
The application is primarily built using React, with the desktop app version being based on Electron.
1313

1414
To start off, clone the project from GitHub and run:
1515

@@ -28,7 +28,7 @@ npm ci
2828
Run in development mode:
2929

3030
```bash
31-
npm run dev:browser
31+
npm run dev:browser # same as the plugin version
3232
npm run dev:electron
3333
```
3434

@@ -51,21 +51,23 @@ npm run test:e2e
5151
npm run test # lint, unit & integration
5252
```
5353

54-
Build the production version (desktop app into `/dist`, browser app into `/dist-browser`):
54+
Build the production version:
5555

5656
```bash
57-
npm run build:browser
58-
npm run build:electron
57+
npm run build:browser # output directory: /dist-browser
58+
npm run build:plugin # output directory: /plugins/dist-browser
59+
npm run build:electron # output directory: /dist
5960
```
6061

6162
Build the production version and run it:
6263

6364
```bash
6465
npm run preview:browser
66+
npm run preview:plugin
6567
npm run preview:electron
6668
```
6769

68-
Build the Electron app executable package (and other artifacts) for your platform into `/release`:
70+
Build the desktop app executable package (and other artifacts) for your platform into `/release`:
6971

7072
!!! note
7173

@@ -75,6 +77,13 @@ Build the Electron app executable package (and other artifacts) for your platfor
7577
npm run pack:electron
7678
```
7779

80+
Link the plugin version to your local Appium server:
81+
82+
```bash
83+
cd plugins && npm install && cd .. # install @appium/base-plugin
84+
appium plugin install --source=local plugins # link the plugin to Appium
85+
```
86+
7887
## Documentation
7988

8089
The documentation for this app is built using Appium's own [`docutils`](https://github.com/appium/appium/tree/master/packages/docutils),

docs/overview.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,13 @@ with a graphical user interface and additional features.
1414

1515
## Formats
1616

17-
The Inspector is distributed in two formats:
17+
The Inspector is distributed in 3 formats:
1818

1919
- Standalone desktop application for Windows, macOS, and Linux, available for download from
2020
[its GitHub repo](https://github.com/appium/appium-inspector/releases)
2121
- Web application, available at <https://inspector.appiumpro.com>
22+
- Appium server plugin, available for installation using
23+
[Appium's Extension CLI](https://appium.io/docs/en/latest/cli/extensions/)
2224

2325
Note that the web application may not be fully up-to-date with the desktop application.
2426

docs/quickstart/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ This quickstart will cover the following:
1515
3. [Configure Appium session details](./starting-a-session.md)
1616
4. [Start an Inspector session](./starting-a-session.md#launching-the-session)
1717

18-
Continue with the [installation requirements](./requirements.md)!
18+
Continue with the [system requirements](./requirements.md)!

docs/quickstart/installation.md

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,46 @@
22
title: Installation
33
---
44

5-
If you are using the Inspector's web app version, this step is, of course, not required. But if
6-
you wish to use the Inspector desktop app, it needs to be installed first.
5+
This step is only relevant if using the Inspector desktop app or Appium plugin formats.
6+
7+
## Appium Plugin
8+
9+
Like all Appium plugins, the Inspector plugin can be installed and activated using
10+
[the Appium command line](https://appium.io/docs/en/latest/cli/).
11+
12+
1. Install the plugin:
13+
14+
```bash
15+
appium plugin install --source=npm appium-inspector-plugin
16+
```
17+
18+
!!! note
19+
20+
Appium 3 will also support the `appium plugin install inspector` command
21+
22+
2. Launch the Appium server with the plugin activated:
23+
24+
```bash
25+
appium --use-plugins=inspector --allow-cors
26+
```
27+
28+
3. Open the Inspector URL in your web browser:
29+
30+
```
31+
http://localhost:4723/inspector
32+
```
33+
34+
!!! info
35+
36+
Make sure the above **host URL** and **port** match those of the Appium server. Note that the
37+
server's base path value is ignored - the plugin always uses the `/inspector` path.
38+
39+
## Desktop App
740

841
The app can be downloaded from [the Inspector's GitHub repository](https://github.com/appium/appium-inspector/releases).
942
Different file formats are provided for each supported platform.
1043

11-
## Windows
44+
### Windows
1245

1346
For Windows it is recommended to download the `.exe` installer file, as it supports [checking for updates](../menu-bar.md#update-checker).
1447

@@ -30,7 +63,7 @@ Alternatively, you can also bypass this after having opened the installer:
3063
After following the installer steps, the Inspector app should be installed, and you should be able
3164
to open it without any warnings.
3265

33-
## macOS
66+
### macOS
3467

3568
For macOS it is recommended to download the `.dmg` file, as it supports [checking for updates](../menu-bar.md#update-checker).
3669
Opening the file will open a simple window, showing icons for the Inspector and the _Applications_ folder.
@@ -45,7 +78,7 @@ There are two ways to work around these warnings: using the macOS user interface
4578
command line. The user interface flows will differ depending on your macOS version, while the
4679
command line approach works for all macOS versions.
4780

48-
### Command Line
81+
#### Command Line
4982

5083
Simply open your Terminal app and run the following command:
5184

@@ -55,7 +88,7 @@ xattr -cr "/Applications/Appium Inspector.app"
5588

5689
You should now be able to open the app with no warnings.
5790

58-
### UI - macOS Sequoia or later
91+
#### UI - macOS Sequoia or later
5992

6093
With macOS Sequoia, Apple has tightened their security for installing non-notarized apps, so the
6194
required steps to allow opening the app have become more complex.
@@ -75,7 +108,7 @@ required steps to allow opening the app have become more complex.
75108
5. A prompt should appear, requiring you to confirm the action using administrator user credentials.
76109
6. After confirming the action, the app should open.
77110

78-
### UI - macOS Sonoma or earlier
111+
#### UI - macOS Sonoma or earlier
79112

80113
1. Upon opening the app, the following warning will be shown. Click _OK_.
81114
![Appium Inspector Open Warning on macOS](./assets/images/open-warning-macos.png)
@@ -84,7 +117,7 @@ required steps to allow opening the app have become more complex.
84117
4. A prompt should appear - click _Open_ again.
85118
5. After accepting the prompt, the app should open.
86119

87-
## Linux
120+
### Linux
88121

89122
For Linux it is recommended to download the `.AppImage` file, as it supports [checking for updates](../menu-bar.md#update-checker).
90123

docs/quickstart/requirements.md

Lines changed: 14 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,31 +5,26 @@ hide:
55
title: System Requirements
66
---
77

8-
Since the Inspector has two versions, [a desktop app and a web app](../overview.md#formats), the
9-
requirements for these will differ.
8+
Since the Inspector is released in [3 versions](../overview.md#formats), the requirements for these
9+
will differ:
1010

11-
- Web app
12-
- Works in Chrome/Edge/Firefox, released in 2022 or later
13-
([Safari is not supported](../troubleshooting.md#browser-version-does-not-work-in-safari))
14-
- Viewport size of at least **870 x 610** pixels is recommended
1511
- Desktop app
1612
- Works on Windows 10+, macOS 11+, Ubuntu 18.04+, Debian 10+, openSUSE 15.5+, or Fedora Linux 39+
1713
- [These requirements are taken from Chrome](https://support.google.com/chrome/a/answer/7100626),
1814
as the Inspector is built using Electron (which uses Chromium)
1915
- Up to around **600MB** of free space is required
2016
- The minimum application window size is **890 x 710** pixels
17+
- Web app/Appium server plugin
18+
- Works in Chrome/Edge/Firefox, released in 2022 or later
19+
([Safari is not supported](../troubleshooting.md#browser-version-does-not-work-in-safari))
20+
- The plugin version requires around **9MB** of free space
21+
- Viewport size of at least **870 x 610** pixels is recommended
2122

22-
Both Inspector versions also require an **Appium server** to connect to, which is _not_ bundled with
23-
the Inspector. This server can be run either locally or remotely. If you need to install it, please
24-
check the [Appium Install documentation](https://appium.io/docs/en/latest/quickstart/install/)
25-
for details.
26-
27-
!!! note
28-
29-
If using a standalone Appium server, make sure the server also has the necessary
30-
[driver(s)](https://appium.io/docs/en/latest/ecosystem/drivers/) for your target platform(s)!
23+
All Inspector versions also require an **Appium server** to connect to, which can be hosted either
24+
locally or remotely. For instructions on how to install and set up the server, please refer to the
25+
[Appium documentation](https://appium.io/docs/en/latest/quickstart/install/). Make sure to also
26+
install the necessary [driver(s)](https://appium.io/docs/en/latest/ecosystem/drivers/) for your
27+
target platform(s).
3128

32-
While the Inspector is designed to work with Appium 2, it is also compatible with
33-
later versions of Appium 1. Please be aware of
34-
[the differences between both Appium versions](https://appium.io/docs/en/latest/guides/migrating-1-to-2/) -
35-
in particular, the default server base path.
29+
Continue with the [Installation](./installation.md) steps, or jump directly to
30+
[Starting a Session](./starting-a-session.md)!

docs/quickstart/starting-a-session.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,6 @@ information about the Appium server is specified, so that the Inspector knows ho
3131
- For a local or remote Appium server with non-default properties, please change the field
3232
values accordingly.
3333

34-
!!! note
35-
36-
The above assumes that you are using Appium 2. If using Appium 1, the _Remote Path_ value
37-
must be changed to `/wd/hub`. This may also apply to an Appium 2 server, if it was launched
38-
with the `--base-path="/wd/hub"` argument.
39-
4034
With the server details specified, you can move on to the session details!
4135

4236
## Adding Session Details

docs/session-builder/server-details.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,14 +17,13 @@ The default server details have 4 fields:
1717

1818
![Default Server Details](./assets/images/server-details/default-server-details.png)
1919

20-
- **Remote Host**: the host URL of the server
21-
- **Remote Port**: the port on which the server is running
22-
- **Remote Path**: the path used to access the server. Appium 2 servers use `/` by default, whereas
23-
Appium 1 servers use `/wd/hub`
24-
- **SSL**: by default, the server is accessed over HTTP - tick this checkbox to use HTTPS
20+
- **Remote Host**: the host URL of the server (default: `127.0.0.1`)
21+
- **Remote Port**: the port on which the server is running (default: `4723`)
22+
- **Remote Path**: the base path used to access the server (default: `/`)
23+
- **SSL**: whether HTTPS should be used when connecting to the server (default: `false`)
2524

2625
If using the placeholder details, the Inspector will try to connect to `http://127.0.0.1:4723/`.
27-
If you have a locally-running Appium 2 server that was launched with default parameters, it should
26+
If you have a locally-running Appium server that was launched with default parameters, it should
2827
also be using this address, in which case you can leave the fields unchanged.
2928

3029
## Cloud Providers

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"build:plugin": "vite build --base /inspector --outDir ../../plugins/dist-browser",
3838
"build:electron": "electron-vite build",
3939
"preview:browser": "npm run build:browser && vite preview",
40+
"preview:plugin": "npm run build:plugin && vite preview --base /inspector --outDir ../../plugins/dist-browser",
4041
"preview:electron": "electron-vite preview",
4142
"pack:electron": "electron-builder build --publish never",
4243
"clean": "npm run clean:electron && npm run clean:browser && npm run clean:npm && npm run clean:plugin",

plugins/README.md

Lines changed: 6 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -3,50 +3,22 @@
33
[![npm version](http://img.shields.io/npm/v/appium-inspector-plugin.svg)](https://npmjs.org/package/appium-inspector-plugin)
44
[![Downloads](http://img.shields.io/npm/dm/appium-inspector-plugin.svg)](https://npmjs.org/package/appium-inspector-plugin)
55

6-
A plugin that integrates the [Appium Inspector](https://github.com/appium/appium-inspector) directly into your Appium server installation, providing a web-based interface for inspecting and interacting with your application under test.
6+
A plugin that integrates the [Appium Inspector](https://github.com/appium/appium-inspector) directly
7+
into your Appium server installation, providing a web-based interface for inspecting and interacting
8+
with your application under test.
79

810
## Features
911

10-
- Web-based Appium Inspector interface accessible via `/inspector` endpoint with appium server
12+
- Web-based Appium Inspector interface, accessible via the Appium server's `/inspector` endpoint
1113
- Full feature parity with standalone Appium Inspector
1214

1315
## Installation
1416

15-
```bash
16-
appium plugin install --source=npm appium-inspector-plugin
17-
```
18-
19-
> [!Note]
20-
> Appium 3 will support this plugin as a first-class plugin with `appium plugin install inspector`
21-
22-
## Usage
23-
24-
1. Start Appium server with the inspector plugin enabled:
25-
26-
```bash
27-
appium --use-plugins=inspector --allow-cors
28-
```
29-
30-
2. Access the Inspector interface by navigating to:
31-
32-
```
33-
http://localhost:4723/inspector
34-
```
17+
Refer to the [Plugin Installation documentation](https://appium.github.io/appium-inspector/latest/quickstart/installation/#appium-plugin).
3518

3619
## Development
3720

38-
1. `git clone` this repositiry
39-
2. Run `npm install` in `/path/to/appium-inspector/plugins`
40-
3. `appium plugin install --source=local /path/to/appium-inspector/plugins`
41-
4. Update the plugin content with `npm run build:plugin` in `/path/to/appium-inspector`
42-
5. Start Appium with `appium --use-plugins=inspector --allow-cors`
43-
44-
## Release
45-
46-
(TODO: add this release steps in .github/workflows/package.yml later as another PR)
47-
48-
1. Run `npm run plugin:sync:version` to sync the version with the root project.json
49-
2. Run `npm publish` in `/path/to/appium-inspector/plugins` to publish the module
21+
Refer to the [Contributing documentation](https://appium.github.io/appium-inspector/latest/contributing/).
5022

5123
## License
5224

0 commit comments

Comments
 (0)