Skip to content

Commit cbc3a2e

Browse files
committed
docs: Update README.md
1 parent bd80401 commit cbc3a2e

File tree

8 files changed

+1279
-10
lines changed

8 files changed

+1279
-10
lines changed

DEVELOP.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
2+
This project is developed using FastAPI, Vue, and Element-UI. It starts the service locally and displays the UI hierarchy tree through a web browser.
3+
4+
**Tech Stack**
5+
6+
- python3
7+
- html/css/js
8+
- fastapi
9+
- vue
10+
- element-ui
11+
12+
13+
# Build
14+
```
15+
pip3 install poetry
16+
17+
git clone git@github.com:codematrixer/ui-viewer.git
18+
cd ui-viewer
19+
20+
poetry install
21+
poetry build
22+
```
23+
24+
## Run
25+
```
26+
poetry run python3 -m uiviewer
27+
```

README.md

Lines changed: 39 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,49 @@
11
# ui-viewer
22
UI hierarchy visualization tool, supporting Android, iOS, HarmonyOS NEXT.
33

4-
![showcase](/docs/imgs/showcase.jpg)
4+
![showcase](./docs/imgs/show.gif)
5+
6+
# Installation
7+
```shell
8+
pip3 install -U uiviewer
9+
```
510

611
# Run
12+
Start with a default port (8000)
13+
```shell
14+
uiviewer
15+
# or
16+
python3 -m uiviewer
717
```
8-
poetry install
9-
poetry run python3 -m uiviewer.app
18+
Start with a custom port
19+
```
20+
uiviewer -p <PORT>
21+
python3 -m uiviewer -p <PORT>
22+
1023
```
1124
and then open the browser to [http://localhost:8000](http://localhost:8000)
1225

1326

14-
# TODO
15-
1. support iOS
16-
1. Selected Element Info 增加path信息
17-
2. UI hierarchy 显示层级线
18-
3. 左侧节点联动右侧el-tree
27+
# Tips
28+
- If you are using a virtual environment, please make sure to activate it before running the command.
29+
- On iOS, please ensure that WDA is successfully started and wda port forwarding is successful in advance.
30+
- First, Use `xcode` or `tidevice` or `go-ios` to launch wda.
31+
```
32+
tidevice xctest -B <wda_bundle_id>
33+
```
34+
- Second, Use `tidevice` or `iproxy` to forward the wda port,and keep it running.
35+
```
36+
tidevice relay <local_port> 8100
37+
```
38+
- Finally, To ensure the success of the browser to access `http://localhost:<local_port>/status`
39+
- On iOS,WDA can easily freeze when dumping high UI hierarchy. You can reduce the **`maxDepth`** on the web page. The default is 30.
40+
41+
# preview
42+
- HarmonyOS
43+
![harmony](./docs/imgs/harmony.png)
44+
45+
- Android
46+
![android](./docs/imgs/android.png)
47+
48+
- iOS
49+
![ios](./docs/imgs/ios.png)

docs/imgs/android.png

4.69 MB
Loading

docs/imgs/ios.png

2.7 MB
Loading

docs/imgs/show.gif

2.19 MB
Loading

poetry.lock

Lines changed: 1208 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@ description = "UI hierarchy visualization tool, supporting Android, iOS, Harmony
55
authors = ["codematrixer <chenli_gogo@163.com>"]
66
license = "MIT"
77
readme = "README.md"
8-
include = ["*/assets/*"]
8+
include = ["*/static/*"]
9+
10+
[tool.poetry.scripts]
11+
uiviewer = "uiviewer.cli:main"
912

1013
[tool.poetry.dependencies]
1114
python = "^3.8"
@@ -15,7 +18,7 @@ aiofiles = "^23.1.0"
1518
uiautomator2 = "^3.0.0"
1619
facebook-wda = "^1.0.5"
1720
tidevice = "^0.12.10"
18-
hmdriver2 = "^1.2.9"
21+
hmdriver2 = "^1.2.10"
1922

2023
[tool.poetry.extras]
2124

0 commit comments

Comments
 (0)