@@ -25,6 +25,9 @@ type APIRequestNewContextOptions struct {
25
25
ClientCertificates []ClientCertificate `json:"clientCertificates"`
26
26
// An object containing additional HTTP headers to be sent with every request. Defaults to none.
27
27
ExtraHttpHeaders map [string ]string `json:"extraHTTPHeaders"`
28
+ // Whether to throw on response codes other than 2xx and 3xx. By default response object is returned for all status
29
+ // codes.
30
+ FailOnStatusCode * bool `json:"failOnStatusCode"`
28
31
// Credentials for [HTTP authentication]. If no
29
32
// origin is specified, the username and password are sent to any servers upon unauthorized responses.
30
33
//
@@ -1261,7 +1264,11 @@ type ElementHandleScreenshotOptions struct {
1261
1264
// changed. Defaults to `"hide"`.
1262
1265
Caret * ScreenshotCaret `json:"caret"`
1263
1266
// Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
1264
- // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box.
1267
+ // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box. The mask is also applied
1268
+ // to invisible elements, see [Matching only visible elements] to
1269
+ // disable that.
1270
+ //
1271
+ // [Matching only visible elements]: https://playwright.dev/docs/locators#matching-only-visible-elements
1265
1272
Mask []Locator `json:"mask"`
1266
1273
// Specify the color of the overlay box for masked elements, in
1267
1274
// [CSS color format]. Default color is pink `#FF00FF`.
@@ -2451,6 +2458,8 @@ type LocatorFilterOptions struct {
2451
2458
// passed a [string], matching is case-insensitive and searches for a substring. For example, `"Playwright"` matches
2452
2459
// `<article><div>Playwright</div></article>`.
2453
2460
HasText interface {} `json:"hasText"`
2461
+ // Only matches visible or invisible elements.
2462
+ Visible * bool `json:"visible"`
2454
2463
}
2455
2464
2456
2465
type LocatorFocusOptions struct {
@@ -2688,7 +2697,11 @@ type LocatorScreenshotOptions struct {
2688
2697
// changed. Defaults to `"hide"`.
2689
2698
Caret * ScreenshotCaret `json:"caret"`
2690
2699
// Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
2691
- // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box.
2700
+ // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box. The mask is also applied
2701
+ // to invisible elements, see [Matching only visible elements] to
2702
+ // disable that.
2703
+ //
2704
+ // [Matching only visible elements]: https://playwright.dev/docs/locators#matching-only-visible-elements
2692
2705
Mask []Locator `json:"mask"`
2693
2706
// Specify the color of the overlay box for masked elements, in
2694
2707
// [CSS color format]. Default color is pink `#FF00FF`.
@@ -3236,7 +3249,12 @@ type PageEmulateMediaOptions struct {
3236
3249
// emulation. `no-preference` is deprecated.
3237
3250
//
3238
3251
// [prefers-colors-scheme]: https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-color-scheme
3239
- ColorScheme * ColorScheme `json:"colorScheme"`
3252
+ ColorScheme * ColorScheme `json:"colorScheme"`
3253
+ // Emulates `prefers-contrast` media feature, supported values are `no-preference`, `more`. Passing
3254
+ // `no-override` disables contrast emulation.
3255
+ Contrast * Contrast `json:"contrast"`
3256
+ // Emulates `forced-colors` media feature, supported values are `active` and `none`. Passing `no-override`
3257
+ // disables forced colors emulation.
3240
3258
ForcedColors * ForcedColors `json:"forcedColors"`
3241
3259
// Changes the CSS media type of the page. The only allowed values are `screen`, `print` and `no-override`.
3242
3260
// Passing `no-override` disables CSS media emulation.
@@ -3683,7 +3701,11 @@ type PageScreenshotOptions struct {
3683
3701
// `false`.
3684
3702
FullPage * bool `json:"fullPage"`
3685
3703
// Specify locators that should be masked when the screenshot is taken. Masked elements will be overlaid with a pink
3686
- // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box.
3704
+ // box `#FF00FF` (customized by “[object Object]”) that completely covers its bounding box. The mask is also applied
3705
+ // to invisible elements, see [Matching only visible elements] to
3706
+ // disable that.
3707
+ //
3708
+ // [Matching only visible elements]: https://playwright.dev/docs/locators#matching-only-visible-elements
3687
3709
Mask []Locator `json:"mask"`
3688
3710
// Specify the color of the overlay box for masked elements, in
3689
3711
// [CSS color format]. Default color is pink `#FF00FF`.
@@ -4048,7 +4070,7 @@ type PageAssertionsToHaveTitleOptions struct {
4048
4070
4049
4071
type PageAssertionsToHaveURLOptions struct {
4050
4072
// Whether to perform case-insensitive match. “[object Object]” option takes precedence over the corresponding regular
4051
- // expression flag if specified.
4073
+ // expression parameter if specified. A provided predicate ignores this flag .
4052
4074
IgnoreCase * bool `json:"ignoreCase"`
4053
4075
// Time to retry the assertion for in milliseconds. Defaults to `5000`.
4054
4076
Timeout * float64 `json:"timeout"`
0 commit comments