fix: address Playwright API audit findings #83
Reference in New Issue
Block a user
Delete Branch "fix/playwright-api-audit"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Audit of all
playwright-gov0.5200.0 API calls, fixing deprecated usage, resource leaks, and teardown ordering:Locator.Type()withPressSequentially()innode.go—Type()was deprecated in Playwright v1.45;PressSequentially()preserves the same key-by-key behaviorGotofailure inplaywright.go—NewPage()created a page that was never closed ifGotoreturned an errorplayWrightBrowser.Close()— context should close before browser (matchinginteractiveBrowser.Close()which already had the correct order)NewPagefailure ininteractive.go— ifinitBrowsersucceeded butNewPagefailed, the Playwright process, browser, and context were leakedNewBrowserandNewInteractiveBrowser— if the Go context was cancelled mid-setup, the goroutine's browser resources were abandonedTest plan
go build ./...passesgo vet ./...passesgolangci-lint runintroduces zero new issuesgo test ./...all existing tests pass🤖 Generated with Claude Code