Skip to content

Commit 7530f86

Browse files
authored
chore: roll to Playwright v1.47.1 (#487)
1 parent a1b6055 commit 7530f86

File tree

5 files changed

+44
-48
lines changed

5 files changed

+44
-48
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@ jobs:
2323
strategy:
2424
fail-fast: false
2525
matrix:
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]
26+
os: [ubuntu-latest, windows-latest, macos-latest]
2927
browser: [chromium, firefox, webkit]
3028
go: ['stable', 'oldstable']
3129
runs-on: ${{ matrix.os }}

frame.go

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ import (
44
"errors"
55
"fmt"
66
"os"
7-
"sync"
87
"time"
98

109
mapset "github.com/deckarep/golang-set/v2"
1110
)
1211

1312
type frameImpl struct {
1413
channelOwner
15-
sync.RWMutex
1614
detached bool
1715
page *pageImpl
1816
name string
@@ -30,23 +28,23 @@ func newFrame(parent *channelOwner, objectType string, guid string, initializer
3028
} else {
3129
loadStates = mapset.NewSet[string]()
3230
}
33-
bt := &frameImpl{
31+
f := &frameImpl{
3432
name: initializer["name"].(string),
3533
url: initializer["url"].(string),
3634
loadStates: loadStates,
3735
childFrames: make([]Frame, 0),
3836
}
39-
bt.createChannelOwner(bt, parent, objectType, guid, initializer)
37+
f.createChannelOwner(f, parent, objectType, guid, initializer)
4038

4139
channelOwner := fromNullableChannel(initializer["parentFrame"])
4240
if channelOwner != nil {
43-
bt.parentFrame = channelOwner.(*frameImpl)
44-
bt.parentFrame.(*frameImpl).childFrames = append(bt.parentFrame.(*frameImpl).childFrames, bt)
41+
f.parentFrame = channelOwner.(*frameImpl)
42+
f.parentFrame.(*frameImpl).childFrames = append(f.parentFrame.(*frameImpl).childFrames, f)
4543
}
4644

47-
bt.channel.On("navigated", bt.onFrameNavigated)
48-
bt.channel.On("loadstate", bt.onLoadState)
49-
return bt
45+
f.channel.On("navigated", f.onFrameNavigated)
46+
f.channel.On("loadstate", f.onLoadState)
47+
return f
5048
}
5149

5250
func (f *frameImpl) URL() string {

patches/main.patch

Lines changed: 34 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@ index 2f832e1dd..b8a33f161 100644
1212
- `cookies` <[Array]<[Object]>>
1313
- `name` <[string]>
1414
diff --git a/docs/src/api/class-apirequestcontext.md b/docs/src/api/class-apirequestcontext.md
15-
index a6333d6b0..9a37f42aa 100644
15+
index 1d3e72823..2db19192e 100644
1616
--- a/docs/src/api/class-apirequestcontext.md
1717
+++ b/docs/src/api/class-apirequestcontext.md
18-
@@ -156,12 +156,18 @@ context cookies from the response. The method will automatically follow redirect
18+
@@ -159,12 +159,18 @@ context cookies from the response. The method will automatically follow redirect
1919
### option: APIRequestContext.delete.data = %%-js-python-csharp-fetch-option-data-%%
2020
* since: v1.17
2121

@@ -34,7 +34,7 @@ index a6333d6b0..9a37f42aa 100644
3434
### option: APIRequestContext.delete.multipart = %%-js-fetch-option-multipart-%%
3535
* since: v1.17
3636

37-
@@ -171,6 +177,9 @@ context cookies from the response. The method will automatically follow redirect
37+
@@ -174,6 +180,9 @@ context cookies from the response. The method will automatically follow redirect
3838
### option: APIRequestContext.delete.multipart = %%-csharp-fetch-option-multipart-%%
3939
* since: v1.17
4040

@@ -44,7 +44,7 @@ index a6333d6b0..9a37f42aa 100644
4444
### option: APIRequestContext.delete.timeout = %%-js-python-csharp-fetch-option-timeout-%%
4545
* since: v1.16
4646

47-
@@ -314,7 +323,7 @@ Target URL or Request to get all parameters from.
47+
@@ -320,7 +329,7 @@ Target URL or Request to get all parameters from.
4848

4949
### option: APIRequestContext.fetch.method
5050
* since: v1.16
@@ -53,7 +53,7 @@ index a6333d6b0..9a37f42aa 100644
5353
- `method` <[string]>
5454

5555
If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/docs/Web/HTTP/Methods/PUT) or
56-
@@ -326,12 +335,18 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
56+
@@ -332,12 +341,18 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
5757
### option: APIRequestContext.fetch.data = %%-js-python-csharp-fetch-option-data-%%
5858
* since: v1.16
5959

@@ -72,7 +72,7 @@ index a6333d6b0..9a37f42aa 100644
7272
### option: APIRequestContext.fetch.multipart = %%-js-fetch-option-multipart-%%
7373
* since: v1.16
7474

75-
@@ -341,6 +356,9 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
75+
@@ -347,6 +362,9 @@ If set changes the fetch method (e.g. [PUT](https://developer.mozilla.org/en-US/
7676
### option: APIRequestContext.fetch.multipart = %%-csharp-fetch-option-multipart-%%
7777
* since: v1.16
7878

@@ -82,7 +82,7 @@ index a6333d6b0..9a37f42aa 100644
8282
### option: APIRequestContext.fetch.timeout = %%-js-python-csharp-fetch-option-timeout-%%
8383
* since: v1.16
8484

85-
@@ -433,12 +451,18 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
85+
@@ -442,12 +460,18 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
8686
### option: APIRequestContext.get.data = %%-js-python-csharp-fetch-option-data-%%
8787
* since: v1.26
8888

@@ -101,7 +101,7 @@ index a6333d6b0..9a37f42aa 100644
101101
### option: APIRequestContext.get.multipart = %%-js-fetch-option-multipart-%%
102102
* since: v1.26
103103

104-
@@ -448,6 +472,9 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
104+
@@ -457,6 +481,9 @@ await request.GetAsync("https://example.com/api/getText", new() { Params = query
105105
### option: APIRequestContext.get.multipart = %%-csharp-fetch-option-multipart-%%
106106
* since: v1.26
107107

@@ -111,7 +111,7 @@ index a6333d6b0..9a37f42aa 100644
111111
### option: APIRequestContext.get.timeout = %%-js-python-csharp-fetch-option-timeout-%%
112112
* since: v1.16
113113

114-
@@ -492,12 +519,18 @@ context cookies from the response. The method will automatically follow redirect
114+
@@ -504,12 +531,18 @@ context cookies from the response. The method will automatically follow redirect
115115
### option: APIRequestContext.head.data = %%-js-python-csharp-fetch-option-data-%%
116116
* since: v1.26
117117

@@ -130,7 +130,7 @@ index a6333d6b0..9a37f42aa 100644
130130
### option: APIRequestContext.head.multipart = %%-js-fetch-option-multipart-%%
131131
* since: v1.26
132132

133-
@@ -507,6 +540,9 @@ context cookies from the response. The method will automatically follow redirect
133+
@@ -519,6 +552,9 @@ context cookies from the response. The method will automatically follow redirect
134134
### option: APIRequestContext.head.multipart = %%-csharp-fetch-option-multipart-%%
135135
* since: v1.26
136136

@@ -140,7 +140,7 @@ index a6333d6b0..9a37f42aa 100644
140140
### option: APIRequestContext.head.timeout = %%-js-python-csharp-fetch-option-timeout-%%
141141
* since: v1.16
142142

143-
@@ -551,12 +587,18 @@ context cookies from the response. The method will automatically follow redirect
143+
@@ -566,12 +602,18 @@ context cookies from the response. The method will automatically follow redirect
144144
### option: APIRequestContext.patch.data = %%-js-python-csharp-fetch-option-data-%%
145145
* since: v1.16
146146

@@ -159,7 +159,7 @@ index a6333d6b0..9a37f42aa 100644
159159
### option: APIRequestContext.patch.multipart = %%-js-fetch-option-multipart-%%
160160
* since: v1.16
161161

162-
@@ -566,6 +608,9 @@ context cookies from the response. The method will automatically follow redirect
162+
@@ -581,6 +623,9 @@ context cookies from the response. The method will automatically follow redirect
163163
### option: APIRequestContext.patch.multipart = %%-csharp-fetch-option-multipart-%%
164164
* since: v1.16
165165

@@ -169,7 +169,7 @@ index a6333d6b0..9a37f42aa 100644
169169
### option: APIRequestContext.patch.timeout = %%-js-python-csharp-fetch-option-timeout-%%
170170
* since: v1.16
171171

172-
@@ -731,12 +776,18 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
172+
@@ -749,12 +794,18 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
173173
### option: APIRequestContext.post.data = %%-js-python-csharp-fetch-option-data-%%
174174
* since: v1.16
175175

@@ -188,7 +188,7 @@ index a6333d6b0..9a37f42aa 100644
188188
### option: APIRequestContext.post.multipart = %%-js-fetch-option-multipart-%%
189189
* since: v1.16
190190

191-
@@ -746,6 +797,9 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
191+
@@ -764,6 +815,9 @@ await request.PostAsync("https://example.com/api/uploadScript", new() { Multipar
192192
### option: APIRequestContext.post.multipart = %%-csharp-fetch-option-multipart-%%
193193
* since: v1.16
194194

@@ -198,7 +198,7 @@ index a6333d6b0..9a37f42aa 100644
198198
### option: APIRequestContext.post.timeout = %%-js-python-csharp-fetch-option-timeout-%%
199199
* since: v1.16
200200

201-
@@ -790,12 +844,18 @@ context cookies from the response. The method will automatically follow redirect
201+
@@ -811,12 +865,18 @@ context cookies from the response. The method will automatically follow redirect
202202
### option: APIRequestContext.put.data = %%-js-python-csharp-fetch-option-data-%%
203203
* since: v1.16
204204

@@ -217,7 +217,7 @@ index a6333d6b0..9a37f42aa 100644
217217
### option: APIRequestContext.put.multipart = %%-js-fetch-option-multipart-%%
218218
* since: v1.16
219219

220-
@@ -805,6 +865,9 @@ context cookies from the response. The method will automatically follow redirect
220+
@@ -826,6 +886,9 @@ context cookies from the response. The method will automatically follow redirect
221221
### option: APIRequestContext.put.multipart = %%-csharp-fetch-option-multipart-%%
222222
* since: v1.16
223223

@@ -1101,7 +1101,7 @@ index 3b3308b88..e21ea93ef 100644
11011101
- returns: <[any]>
11021102

11031103
diff --git a/docs/src/api/params.md b/docs/src/api/params.md
1104-
index ccd6bae8f..059ed0b8e 100644
1104+
index cbec1a5e2..e15948aef 100644
11051105
--- a/docs/src/api/params.md
11061106
+++ b/docs/src/api/params.md
11071107
@@ -8,7 +8,7 @@ When to consider operation succeeded, defaults to `load`. Events can be either:
@@ -1216,7 +1216,7 @@ index ccd6bae8f..059ed0b8e 100644
12161216
- `params` <[Object]<[string], [Serializable]>>
12171217

12181218
Query parameters to be sent with the URL.
1219-
@@ -381,19 +404,19 @@ Query parameters to be sent with the URL.
1219+
@@ -387,19 +410,19 @@ Query parameters to be sent with the URL.
12201220
Optional request parameters.
12211221

12221222
## js-python-csharp-fetch-option-headers
@@ -1239,7 +1239,7 @@ index ccd6bae8f..059ed0b8e 100644
12391239
- `failOnStatusCode` <[boolean]>
12401240

12411241
Whether to throw on response codes other than 2xx and 3xx. By default response object is returned
1242-
@@ -417,6 +440,14 @@ unless explicitly provided.
1242+
@@ -423,6 +446,14 @@ unless explicitly provided.
12431243

12441244
An instance of [FormData] can be created via [`method: APIRequestContext.createFormData`].
12451245

@@ -1254,7 +1254,7 @@ index ccd6bae8f..059ed0b8e 100644
12541254
## js-fetch-option-multipart
12551255
* langs: js
12561256
- `multipart` <[FormData]|[Object]<[string], [string]|[float]|[boolean]|[ReadStream]|[Object]>>
1257-
@@ -450,6 +481,15 @@ unless explicitly provided. File values can be passed as file-like object contai
1257+
@@ -456,6 +487,15 @@ unless explicitly provided. File values can be passed as file-like object contai
12581258

12591259
An instance of [FormData] can be created via [`method: APIRequestContext.createFormData`].
12601260

@@ -1270,7 +1270,7 @@ index ccd6bae8f..059ed0b8e 100644
12701270
## js-python-csharp-fetch-option-data
12711271
* langs: js, python, csharp
12721272
- `data` <[string]|[Buffer]|[Serializable]>
1273-
@@ -458,21 +498,29 @@ Allows to set post data of the request. If the data parameter is an object, it w
1273+
@@ -464,21 +504,29 @@ Allows to set post data of the request. If the data parameter is an object, it w
12741274
and `content-type` header will be set to `application/json` if not explicitly set. Otherwise the `content-type` header will be
12751275
set to `application/octet-stream` if not explicitly set.
12761276

@@ -1303,7 +1303,7 @@ index ccd6bae8f..059ed0b8e 100644
13031303
- `maxRetries` <[int]>
13041304

13051305
Maximum number of times network errors should be retried. Currently only `ECONNRESET` error is retried. Does not retry based on HTTP response codes. An error will be thrown if the limit is exceeded. Defaults to `0` - no retries.
1306-
@@ -514,7 +562,7 @@ Function to be evaluated in the worker context.
1306+
@@ -520,7 +568,7 @@ Function to be evaluated in the worker context.
13071307
Function to be evaluated in the main Electron process.
13081308

13091309
## python-context-option-viewport
@@ -1312,7 +1312,7 @@ index ccd6bae8f..059ed0b8e 100644
13121312
- `viewport` <[null]|[Object]>
13131313
- `width` <[int]> page width in pixels.
13141314
- `height` <[int]> page height in pixels.
1315-
@@ -522,7 +570,7 @@ Function to be evaluated in the main Electron process.
1315+
@@ -528,7 +576,7 @@ Function to be evaluated in the main Electron process.
13161316
Sets a consistent viewport for each page. Defaults to an 1280x720 viewport. `no_viewport` disables the fixed viewport. Learn more about [viewport emulation](../emulation.md#viewport).
13171317

13181318
## python-context-option-no-viewport
@@ -1321,7 +1321,7 @@ index ccd6bae8f..059ed0b8e 100644
13211321
- `noViewport` <[boolean]>
13221322

13231323
Does not enforce fixed viewport, allows resizing window in the headed mode.
1324-
@@ -628,11 +676,11 @@ Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`
1324+
@@ -634,11 +682,11 @@ Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`
13251325
[`method: Page.emulateMedia`] for more details. Passing `null` resets emulation to system defaults. Defaults to `'light'`.
13261326

13271327
## context-option-colorscheme-csharp-python
@@ -1336,7 +1336,7 @@ index ccd6bae8f..059ed0b8e 100644
13361336

13371337
## context-option-reducedMotion
13381338
* langs: js, java
1339-
@@ -641,10 +689,10 @@ Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`
1339+
@@ -647,10 +695,10 @@ Emulates `'prefers-colors-scheme'` media feature, supported values are `'light'`
13401340
Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce'`, `'no-preference'`. See [`method: Page.emulateMedia`] for more details. Passing `null` resets emulation to system defaults. Defaults to `'no-preference'`.
13411341

13421342
## context-option-reducedMotion-csharp-python
@@ -1350,7 +1350,7 @@ index ccd6bae8f..059ed0b8e 100644
13501350

13511351
## context-option-forcedColors
13521352
* langs: js, java
1353-
@@ -653,10 +701,10 @@ Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce
1353+
@@ -659,10 +707,10 @@ Emulates `'prefers-reduced-motion'` media feature, supported values are `'reduce
13541354
Emulates `'forced-colors'` media feature, supported values are `'active'`, `'none'`. See [`method: Page.emulateMedia`] for more details. Passing `null` resets emulation to system defaults. Defaults to `'none'`.
13551355

13561356
## context-option-forcedColors-csharp-python
@@ -1364,7 +1364,7 @@ index ccd6bae8f..059ed0b8e 100644
13641364

13651365
## context-option-logger
13661366
* langs: js
1367-
@@ -691,7 +739,7 @@ specified, the HAR is not recorded. Make sure to await [`method: BrowserContext.
1367+
@@ -697,7 +745,7 @@ specified, the HAR is not recorded. Make sure to await [`method: BrowserContext.
13681368
saved.
13691369

13701370
## context-option-recordhar-path
@@ -1373,7 +1373,7 @@ index ccd6bae8f..059ed0b8e 100644
13731373
- alias-python: record_har_path
13741374
- `recordHarPath` <[path]>
13751375

1376-
@@ -700,33 +748,33 @@ specified HAR file on the filesystem. If not specified, the HAR is not recorded.
1376+
@@ -706,33 +754,33 @@ specified HAR file on the filesystem. If not specified, the HAR is not recorded.
13771377
call [`method: BrowserContext.close`] for the HAR to be saved.
13781378

13791379
## context-option-recordhar-omit-content
@@ -1412,7 +1412,7 @@ index ccd6bae8f..059ed0b8e 100644
14121412
- `recordVideo` <[Object]>
14131413
- `dir` <[path]> Path to the directory to put videos into.
14141414
- `size` ?<[Object]> Optional dimensions of the recorded videos. If not specified the size will be equal to `viewport`
1415-
@@ -795,7 +843,7 @@ Specifies whether to wait for already running listeners and what to do if they t
1415+
@@ -801,7 +849,7 @@ Specifies whether to wait for already running listeners and what to do if they t
14161416
* `'ignoreErrors'` - do not wait for current listener calls (if any) to finish, all errors thrown by the listeners after removal are silently caught
14171417

14181418
## unroute-all-options-behavior
@@ -1421,7 +1421,7 @@ index ccd6bae8f..059ed0b8e 100644
14211421
* since: v1.41
14221422
- `behavior` <[UnrouteBehavior]<"wait"|"ignoreErrors"|"default">>
14231423

1424-
@@ -806,7 +854,7 @@ Specifies whether to wait for already running handlers and what to do if they th
1424+
@@ -812,7 +860,7 @@ Specifies whether to wait for already running handlers and what to do if they th
14251425

14261426

14271427
## select-options-values
@@ -1430,7 +1430,7 @@ index ccd6bae8f..059ed0b8e 100644
14301430
- `values` <[null]|[string]|[ElementHandle]|[Array]<[string]>|[Object]|[Array]<[ElementHandle]>|[Array]<[Object]>>
14311431
- `value` ?<[string]> Matches by `option.value`. Optional.
14321432
- `label` ?<[string]> Matches by `option.label`. Optional.
1433-
@@ -824,7 +872,7 @@ the parameter is a string without wildcard characters, the method will wait for
1433+
@@ -830,7 +878,7 @@ the parameter is a string without wildcard characters, the method will wait for
14341434
equal to the string.
14351435

14361436
## wait-for-event-event
@@ -1439,7 +1439,7 @@ index ccd6bae8f..059ed0b8e 100644
14391439
- `event` <[string]>
14401440

14411441
Event name, same one typically passed into `*.on(event)`.
1442-
@@ -882,7 +930,7 @@ only the first option matching one of the passed options is selected. Optional.
1442+
@@ -888,7 +936,7 @@ only the first option matching one of the passed options is selected. Optional.
14431443
Receives the event data and resolves to truthy value when the waiting should resolve.
14441444

14451445
## wait-for-event-timeout
@@ -1448,7 +1448,7 @@ index ccd6bae8f..059ed0b8e 100644
14481448
- `timeout` <[float]>
14491449

14501450
Maximum time to wait for in milliseconds. Defaults to `30000` (30 seconds). Pass `0` to disable timeout.
1451-
@@ -902,7 +950,7 @@ using the [`method: AndroidDevice.setDefaultTimeout`] method.
1451+
@@ -908,7 +956,7 @@ using the [`method: AndroidDevice.setDefaultTimeout`] method.
14521452
Time to retry the assertion for in milliseconds. Defaults to `timeout` in `TestConfig.expect`.
14531453

14541454
## csharp-java-python-assertions-timeout
@@ -1457,7 +1457,7 @@ index ccd6bae8f..059ed0b8e 100644
14571457
- `timeout` <[float]>
14581458

14591459
Time to retry the assertion for in milliseconds. Defaults to `5000`.
1460-
@@ -1041,7 +1089,7 @@ Firefox user preferences. Learn more about the Firefox user preferences at
1460+
@@ -1047,7 +1095,7 @@ Firefox user preferences. Learn more about the Firefox user preferences at
14611461
[`about:config`](https://support.mozilla.org/en-US/kb/about-config-editor-firefox).
14621462

14631463
## csharp-java-browser-option-firefoxuserprefs

run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818
)
1919

2020
const (
21-
playwrightCliVersion = "1.47.0"
21+
playwrightCliVersion = "1.47.1"
2222
)
2323

2424
var (

0 commit comments

Comments
 (0)