Skip to main content

UI hierarchy visualization tool, supporting Android, iOS, HarmonyOS NEXT.

Project description

ui-viewer

github actions pypi version python

UI hierarchy inspector, supporting Android, iOS, HarmonyOS NEXT.

This project is developed using FastAPI and Vue. It starts the service locally and displays UI hierarchy tree through web browser.

show

Installation

  • python3.8+
pip3 install -U uiviewer

Run

Run the following command on the terminal. (default port 8000)

uiviewer
# or
python3 -m uiviewer

INFO:     Started server process [46814]
INFO:     Waiting for application startup.
INFO:     Application startup complete.
INFO:     Uvicorn running on http://127.0.0.1:8000 (Press CTRL+C to quit)
INFO:     127.0.0.1:55080 - "GET / HTTP/1.1" 307 Temporary Redirect
INFO:     127.0.0.1:55080 - "GET /static/index.html HTTP/1.1" 200 OK
INFO:     127.0.0.1:55080 - "GET /static/css/style.css HTTP/1.1" 200 OK
INFO:     127.0.0.1:55080 - "GET /static/js/index.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:55080 - "GET /static/js/api.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:55082 - "GET /static/js/utils.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:55082 - "GET /static/js/config.js HTTP/1.1" 200 OK
INFO:     127.0.0.1:55082 - "GET /version HTTP/1.1" 200 OK

And then open the browser to http://localhost:8000

You can also customize port to start the service.

uiviewer -p <PORT>
# or
python3 -m uiviewer -p <PORT>

Tips

  • If you are using a virtual environment, please make sure to activate it before running the command.

  • On iOS, please ensure that WDA is successfully started and wda port forwarding is successful in advance.

    • First, Use xcode or tidevice or go-ios to launch wda.
    tidevice xctest -B <wda_bundle_id>
    
    • Second, Use tidevice or iproxy to forward the wda port,and keep it running.
    tidevice relay 8100 8100
    
    • And then, To ensure the success of the browser to access http://localhost:8100/status, return like this:
    {
      "value": {
          "build": {
              "productBundleIdentifier": "com.facebook.WebDriverAgentRunner",
              "time": "Mar 25 2024 15:17:30"
          },
          ...
          "state": "success",
          "ready": true
      },
      "sessionId": null
    } 
    
    • Finally, Input the wdaUrl in the web page, such as http://localhost:8100
  • On iOS,WDA can easily freeze when dumping high UI hierarchy. You can reduce the maxDepth on the web page. The default is 30.

Preview

  • HarmonyOS harmony

  • Android android

  • iOS ios

Relevant

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

uiviewer-1.0.3.tar.gz (399.5 kB view details)

Uploaded Source

Built Distribution

uiviewer-1.0.3-py3-none-any.whl (413.7 kB view details)

Uploaded Python 3

File details

Details for the file uiviewer-1.0.3.tar.gz.

File metadata

  • Download URL: uiviewer-1.0.3.tar.gz
  • Upload date:
  • Size: 399.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for uiviewer-1.0.3.tar.gz
Algorithm Hash digest
SHA256 7c0f350325863298318ac93d3577d23f6994b46e5a1453d17ab55f1eb646d8fb
MD5 c7da42d2417077a48760bde40bb707b5
BLAKE2b-256 c46ac0157edc3c70248e3baf826236dcb3ccf2d1d8d63f3ade5485c34070b124

See more details on using hashes here.

File details

Details for the file uiviewer-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: uiviewer-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 413.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.7

File hashes

Hashes for uiviewer-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 acb5d3a0c79c672f54d4a71460bed0ae6d5a4e5a3e6a392026a5570afaf33b69
MD5 11bfbc37d46459b3dda9c38ada474254
BLAKE2b-256 258094ac5670b3d1311f0514b4adf7e86307abe4aa1fde2b8d792847ac914e6f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page