Skip to content

Commit 53f5f4e

Browse files
asklarCopilot
andcommitted
Add Chromium tests to CI/release and update SKILL.md
- Run lvt_chromium_tests.exe in both CI and release pipelines - Add chromium to framework list in SKILL.md - Document one-time Chrome/Edge extension setup for DOM inspection Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 2abbdf7 commit 53f5f4e

3 files changed

Lines changed: 28 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@ jobs:
3838
- name: Unit tests
3939
run: build\lvt_unit_tests.exe --gtest_output=xml:build\unit_test_results.xml
4040

41+
- name: Chromium plugin tests
42+
run: build\lvt_chromium_tests.exe --gtest_output=xml:build\chromium_test_results.xml
43+
4144
- name: Integration tests
4245
run: build\lvt_integration_tests.exe --gtest_output=xml:build\integration_test_results.xml
4346

@@ -47,7 +50,6 @@ jobs:
4750
with:
4851
name: test-results
4952
path: build\*_test_results.xml
50-
5153
- name: Upload build artifacts
5254
uses: actions/upload-artifact@v4
5355
if: always()

.github/workflows/release.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ jobs:
6565
if: matrix.arch == 'x64'
6666
run: ${{ matrix.build_dir }}\lvt_unit_tests.exe
6767

68+
- name: Chromium plugin tests
69+
if: matrix.arch == 'x64'
70+
run: ${{ matrix.build_dir }}\lvt_chromium_tests.exe
71+
6872
- name: Integration tests
6973
if: matrix.arch == 'x64'
7074
run: ${{ matrix.build_dir }}\lvt_integration_tests.exe

skills/lvt/SKILL.md

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Use `lvt` whenever you need to understand the visual content or structure of a r
1616
- **UI verification** — confirm that a UI change was applied correctly (e.g. a button label changed, a dialog appeared)
1717
- **Finding UI elements** — locate a specific control, menu item, or text field in an app's visual tree
1818
- **Screenshot capture** — take an annotated screenshot of an app with element IDs overlaid
19-
- **Framework detection** — determine which UI frameworks an app uses (Win32, ComCtl, XAML, WinUI 3, WPF)
19+
- **Framework detection** — determine which UI frameworks an app uses (Win32, ComCtl, XAML, WinUI 3, WPF, Chromium)
2020
- **Automated UI interaction planning** — get element IDs and bounds to plan mouse clicks or keyboard input
2121

2222
## Prerequisites
@@ -118,7 +118,7 @@ Every element gets a stable ID like `e0`, `e1`, `e2`, etc., assigned in depth-fi
118118
|----------|-------------|
119119
| `id` | Stable element ID (e.g. `e0`) |
120120
| `type` | Element type name (e.g. `Window`, `Button`, `TextBlock`) |
121-
| `framework` | Which framework owns this element (`win32`, `comctl`, `xaml`, `winui3`, `wpf`) |
121+
| `framework` | Which framework owns this element (`win32`, `comctl`, `xaml`, `winui3`, `wpf`, `chromium`) |
122122
| `className` | Win32 window class name (Win32/ComCtl elements) |
123123
| `text` | Visible text content or window title |
124124
| `bounds` | Screen-relative bounding rectangle `{x, y, width, height}` |
@@ -169,3 +169,22 @@ Every element gets a stable ID like `e0`, `e1`, `e2`, etc., assigned in depth-fi
169169
- For XAML/WinUI 3 apps, lvt injects a helper DLL into the target — this is safe and non-destructive but means `lvt_tap_{arch}.dll` must be next to `lvt.exe`
170170
- For WPF apps, lvt injects `lvt_wpf_tap_{arch}.dll` and the managed `LvtWpfTap.dll` — both must be next to `lvt.exe`
171171
- lvt.exe must match the target process architecture (x64, x86, or ARM64) — a clear error is shown on mismatch. Use `lvt-x86.exe` for 32-bit WPF apps.
172+
173+
## Chrome/Edge DOM inspection (optional one-time setup)
174+
175+
lvt can dump the DOM tree of web pages in Chrome and Edge. This requires a one-time setup:
176+
177+
```powershell
178+
$lvtDir = "$env:USERPROFILE\.lvt"
179+
180+
# 1. Register the native messaging host for Chrome and Edge
181+
& "$lvtDir\plugins\chromium\lvt_chromium_host.exe" --register
182+
183+
# 2. Load the browser extension in Chrome or Edge:
184+
# - Open chrome://extensions (or edge://extensions)
185+
# - Enable "Developer mode"
186+
# - Click "Load unpacked" → select the extension folder:
187+
Start-Process "$lvtDir\plugins\chromium\extension"
188+
```
189+
190+
After setup, `lvt --name chrome` or `lvt --name msedge` will include the DOM tree of the active tab. If the extension is not installed, lvt still works for all other frameworks — it just won't show web content.

0 commit comments

Comments
 (0)