Skip to content

Commit 257a77a

Browse files
authored
chore: roll to Playwright v1.44.0 (#454)
1 parent f764444 commit 257a77a

22 files changed

+629
-184
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,18 @@ jobs:
1414
uses: actions/setup-go@v5
1515
with:
1616
go-version: ^1.19.9
17-
cache: false
1817
id: go
1918
- name: golangci-lint
20-
uses: golangci/golangci-lint-action@v3
19+
uses: golangci/golangci-lint-action@v6
2120
with:
2221
version: latest
2322
test:
2423
strategy:
2524
fail-fast: false
2625
matrix:
27-
os: [ubuntu-latest, windows-latest, macos-latest]
26+
# Stick with macos-13 for now which is Intel-based until
27+
# https://github.com/microsoft/playwright/issues/30705 is fixed.
28+
os: [ubuntu-latest, windows-latest, macos-13]
2829
browser: [chromium, firefox, webkit]
2930
runs-on: ${{ matrix.os }}
3031
name: ${{ matrix.browser }} on ${{ matrix.os }}
@@ -60,13 +61,13 @@ jobs:
6061
BROWSER: ${{ matrix.browser }}
6162
GOEXPERIMENT: nocoverageredesign
6263
if: matrix.os == 'ubuntu-latest'
63-
run: xvfb-run go test -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
64+
run: xvfb-run go test -timeout 15m -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
6465
- name: Test
6566
env:
6667
BROWSER: ${{ matrix.browser }}
6768
GOEXPERIMENT: nocoverageredesign
6869
if: matrix.os != 'ubuntu-latest'
69-
run: go test -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
70+
run: go test -timeout 15m -v -covermode atomic -coverprofile=covprofile -coverpkg="github.com/playwright-community/playwright-go" --race ./...
7071
- name: Install goveralls
7172
run: go install github.com/mattn/goveralls@latest
7273
- name: Send coverage

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@
55
[![PkgGoDev](https://pkg.go.dev/badge/github.com/playwright-community/playwright-go)](https://pkg.go.dev/github.com/playwright-community/playwright-go)
66
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](http://opensource.org/licenses/MIT)
77
[![Go Report Card](https://goreportcard.com/badge/github.com/playwright-community/playwright-go)](https://goreportcard.com/report/github.com/playwright-community/playwright-go) ![Build Status](https://github.com/playwright-community/playwright-go/workflows/Go/badge.svg)
8-
[![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://aka.ms/playwright-slack) [![Coverage Status](https://coveralls.io/repos/github/playwright-community/playwright-go/badge.svg?branch=main)](https://coveralls.io/github/playwright-community/playwright-go?branch=main) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-124.0.6367.29-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-124.0-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->
8+
[![Join Slack](https://img.shields.io/badge/join-slack-infomational)](https://aka.ms/playwright-slack) [![Coverage Status](https://coveralls.io/repos/github/playwright-community/playwright-go/badge.svg?branch=main)](https://coveralls.io/github/playwright-community/playwright-go?branch=main) <!-- GEN:chromium-version-badge -->[![Chromium version](https://img.shields.io/badge/chromium-125.0.6422.26-blue.svg?logo=google-chrome)](https://www.chromium.org/Home)<!-- GEN:stop --> <!-- GEN:firefox-version-badge -->[![Firefox version](https://img.shields.io/badge/firefox-125.0.1-blue.svg?logo=mozilla-firefox)](https://www.mozilla.org/en-US/firefox/new/)<!-- GEN:stop --> <!-- GEN:webkit-version-badge -->[![WebKit version](https://img.shields.io/badge/webkit-17.4-blue.svg?logo=safari)](https://webkit.org/)<!-- GEN:stop -->
99

1010
[API reference](https://playwright.dev/docs/api/class-playwright) | [Example recipes](https://github.com/playwright-community/playwright-go/tree/main/examples)
1111

1212
Playwright is a Go library to automate [Chromium](https://www.chromium.org/Home), [Firefox](https://www.mozilla.org/en-US/firefox/new/) and [WebKit](https://webkit.org/) with a single API. Playwright is built to enable cross-browser web automation that is **ever-green**, **capable**, **reliable** and **fast**.
1313

1414
| | Linux | macOS | Windows |
1515
| :--- | :---: | :---: | :---: |
16-
| Chromium <!-- GEN:chromium-version -->124.0.6367.29<!-- GEN:stop --> ||||
16+
| Chromium <!-- GEN:chromium-version -->125.0.6422.26<!-- GEN:stop --> ||||
1717
| WebKit <!-- GEN:webkit-version -->17.4<!-- GEN:stop --> ||||
18-
| Firefox <!-- GEN:firefox-version -->124.0<!-- GEN:stop --> ||||
18+
| Firefox <!-- GEN:firefox-version -->125.0.1<!-- GEN:stop --> ||||
1919

2020
Headless execution is supported for all the browsers on all platforms.
2121

artifact.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,11 @@ func (a *artifactImpl) SaveAs(path string) error {
3737
}
3838

3939
func (a *artifactImpl) Failure() error {
40-
failure, err := a.channel.Send("failure")
41-
if failure == nil {
40+
reason, err := a.channel.Send("failure")
41+
if reason == nil {
4242
return err
4343
}
44-
return fmt.Errorf("%v", failure)
44+
return fmt.Errorf("%w: %v", ErrPlaywright, reason)
4545
}
4646

4747
func (a *artifactImpl) Delete() error {

browser_context.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,6 +667,10 @@ func (b *browserContextImpl) ServiceWorkers() []Worker {
667667
return b.serviceWorkers
668668
}
669669

670+
func (b *browserContextImpl) OnBackgroundPage(fn func(Page)) {
671+
b.On("backgroundpage", fn)
672+
}
673+
670674
func (b *browserContextImpl) OnClose(fn func(BrowserContext)) {
671675
b.On("close", fn)
672676
}

connection.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ func (c *connection) sendMessageToServer(object *channelOwner, method string, pa
238238
}
239239
stack = append(stack, apiZone.(parsedStackTrace).frames...)
240240
}
241-
metadata["wallTime"] = time.Now().Nanosecond()
241+
metadata["wallTime"] = time.Now().UnixMilli()
242242
message := map[string]interface{}{
243243
"id": id,
244244
"guid": object.guid,

generated-enums.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,10 +269,11 @@ func getKeyboardModifier(in string) *KeyboardModifier {
269269
type KeyboardModifier string
270270

271271
var (
272-
KeyboardModifierAlt *KeyboardModifier = getKeyboardModifier("Alt")
273-
KeyboardModifierControl = getKeyboardModifier("Control")
274-
KeyboardModifierMeta = getKeyboardModifier("Meta")
275-
KeyboardModifierShift = getKeyboardModifier("Shift")
272+
KeyboardModifierAlt *KeyboardModifier = getKeyboardModifier("Alt")
273+
KeyboardModifierControl = getKeyboardModifier("Control")
274+
KeyboardModifierControlOrMeta = getKeyboardModifier("ControlOrMeta")
275+
KeyboardModifierMeta = getKeyboardModifier("Meta")
276+
KeyboardModifierShift = getKeyboardModifier("Shift")
276277
)
277278

278279
func getScreenshotAnimations(in string) *ScreenshotAnimations {

0 commit comments

Comments
 (0)