go-webview/README.md
Claude 2f9ff11204
All checks were successful
Security Scan / security (push) Successful in 8s
Test / test (push) Successful in 42s
chore: migrate to dappco.re vanity import path
Change module path from forge.lthn.ai/core/go-webview to
dappco.re/go/core/webview. Update all Go imports and documentation
references. The go-log dependency uses a replace directive to
resolve via the forge until the vanity redirect is configured.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-21 23:45:30 +00:00

51 lines
1.8 KiB
Markdown

[![Go Reference](https://pkg.go.dev/badge/dappco.re/go/core/webview.svg)](https://pkg.go.dev/dappco.re/go/core/webview)
[![License: EUPL-1.2](https://img.shields.io/badge/License-EUPL--1.2-blue.svg)](LICENSE.md)
[![Go Version](https://img.shields.io/badge/Go-1.26-00ADD8?style=flat&logo=go)](go.mod)
# go-webview
Chrome DevTools Protocol (CDP) client for browser automation, testing, and scraping. Connects to an externally managed Chrome or Chromium instance running with `--remote-debugging-port=9222`, providing navigation, DOM queries, click and type actions, console capture, JavaScript evaluation, screenshots, multi-tab support, viewport emulation, and a fluent `ActionSequence` builder. Includes Angular-specific helpers for Zone.js stability, router navigation, component introspection, and ngModel access.
**Module**: `dappco.re/go/core/webview`
**Licence**: EUPL-1.2
**Language**: Go 1.25
## Quick Start
```go
import "dappco.re/go/core/webview"
wv, err := webview.New(webview.WithDebugURL("http://localhost:9222"))
defer wv.Close()
wv.Navigate("https://example.com")
wv.Click("#submit")
wv.Type("#input", "search term")
png, err := wv.Screenshot()
// Fluent action sequence
err = webview.NewActionSequence().
Navigate("https://example.com").
WaitForSelector("#login-form").
Type("#email", "user@example.com").
Click("#submit").
Execute(ctx, wv)
```
## Documentation
- [Architecture](docs/architecture.md) — CDP connection, DOM queries, console capture, Angular helpers, action system
- [Development Guide](docs/development.md) — prerequisites, build, test patterns, adding actions
- [Project History](docs/history.md) — completed phases, known limitations, future considerations
## Build & Test
```bash
go test ./...
go vet ./...
go build ./...
```
## Licence
European Union Public Licence 1.2 — see [LICENCE](LICENCE) for details.