fix: address Playwright API audit findings
All checks were successful
CI / test (pull_request) Successful in 34s
CI / vet (pull_request) Successful in 48s
CI / build (pull_request) Successful in 49s

- Replace deprecated Locator.Type() with PressSequentially() (node.go)
- Close page on Goto failure to prevent resource leak (playwright.go)
- Fix teardown order: close context before browser (playwright.go)
- Clean up resources on NewPage failure (interactive.go)
- Spawn cleanup goroutine on context cancellation in both constructors

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-02 04:54:00 +00:00
parent ace6c1e0bf
commit 0447f1bdbe
3 changed files with 18 additions and 2 deletions

View File

@@ -29,7 +29,7 @@ type node struct {
}
func (n node) Type(input string) error {
return n.locator.Type(input)
return n.locator.PressSequentially(input)
}
func (n node) Click() error {