revert(driver): drop WebDriver.Document

Document was only consumed by the runner's HTML capture which is gone.
This commit is contained in:
pj committed 2026-04-27 19:52:25 +07:00
1 parent ced6b5db7f
commit 1ec019e632
2 files changed
-11

No files matched your search

-9
View File
@@ -394,12 +394,3 @@ func (d *Driver) NextActionFromV8(_ context.Context) (json.RawMessage, error) {
}
return json.RawMessage(encoded), nil
}
// Document returns the current page's outer HTML for trace capture.
func (d *Driver) Document(_ context.Context) (string, error) {
var html string
if err := chromedp.Run(d.tabCtx, chromedp.OuterHTML("html", &html, chromedp.ByQuery)); err != nil {
return "", fmt.Errorf("document: %w", err)
}
return html, nil
}
-2
View File
@@ -82,6 +82,4 @@ type WebDriver interface {
// bundle and returns the resulting Action JSON for the host to
// dispatch. The shape mirrors verifier.Action's JSON form.
NextActionFromV8(ctx context.Context) (json.RawMessage, error)
// Document returns the current page outerHTML for trace capture.
Document(ctx context.Context) (string, error)
}