mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
revert(driver): drop WebDriver.Document
Document was only consumed by the runner's HTML capture which is gone.
This commit is contained in:
1 parent
ced6b5db7f
commit
1ec019e632
2 files changed
-11
No files matched your search
@@ -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
|
||||
}
|
||||
@@ -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)
|
||||
}
|
||||
Reference in new issue
Block a user