You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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**.
Copy file name to clipboardExpand all lines: generated-interfaces.go
+47-13Lines changed: 47 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -245,6 +245,10 @@ type BrowserContext interface {
245
245
// most cases).
246
246
OnPage(fnfunc(Page))
247
247
248
+
// Emitted when exception is unhandled in any of the pages in this context. To listen for errors from a particular
249
+
// page, use [Page.OnPageError] instead.
250
+
OnWebError(fnfunc(WebError))
251
+
248
252
// Emitted when a request is issued from any pages created through this context. The [request] object is read-only. To
249
253
// only listen for requests from a particular page, use [Page.OnRequest].
250
254
// In order to intercept and mutate requests, see [BrowserContext.Route] or [Page.Route].
@@ -585,7 +589,7 @@ type Dialog interface {
585
589
586
590
// [Download] objects are dispatched by page via the [Page.OnDownload] event.
587
591
// All the downloaded files belonging to the browser context are deleted when the browser context is closed.
588
-
// Download event is emitted once the download starts. Download path becomes available once download completes:
592
+
// Download event is emitted once the download starts. Download path becomes available once download completes.
589
593
typeDownloadinterface {
590
594
// Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
591
595
// `download.failure()` would resolve to `canceled`.
@@ -746,7 +750,7 @@ type ElementHandle interface {
746
750
// error. However, if the element is inside the `<label>` element that has an associated
747
751
// [control], the control will be filled
748
752
// instead.
749
-
// To send fine-grained keyboard events, use [ElementHandle.Type].
753
+
// To send fine-grained keyboard events, use [Locator.PressSequentially].
750
754
//
751
755
// value: Value to set for the `<input>`, `<textarea>` or `[contenteditable]` element.
752
756
//
@@ -946,6 +950,8 @@ type ElementHandle interface {
946
950
// text.
947
951
// To press a special key, like `Control` or `ArrowDown`, use [ElementHandle.Press].
948
952
//
953
+
// Deprecated: In most cases, you should use [Locator.Fill] instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentially].
// error. However, if the element is inside the `<label>` element that has an associated
1192
1198
// [control], the control will be filled
1193
1199
// instead.
1194
-
// To send fine-grained keyboard events, use [Frame.Type].
1200
+
// To send fine-grained keyboard events, use [Locator.PressSequentially].
1195
1201
//
1196
1202
// Deprecated: Use locator-based [Locator.Fill] instead. Read more about [locators].
1197
1203
//
@@ -1621,13 +1627,11 @@ type Frame interface {
1621
1627
// to send fine-grained keyboard events. To fill values in form fields, use [Frame.Fill].
1622
1628
// To press a special key, like `Control` or `ArrowDown`, use [Keyboard.Press].
1623
1629
//
1624
-
// Deprecated: Use locator-based [Locator.Type] instead. Read more about [locators].
1630
+
// Deprecated: In most cases, you should use [Locator.Fill] instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentially].
1625
1631
//
1626
1632
// 1. selector: A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
1627
1633
// used.
1628
1634
// 2. text: A text to type into a focused element.
// **NOTE** In most cases, you should use [Locator.Fill] instead. You only need to type characters if there is special
2491
-
// keyboard handling on the page.
2492
2506
// Focuses the element, and then sends a `keydown`, `keypress`/`input`, and `keyup` event for each character in the
2493
2507
// text.
2494
2508
// To press a special key, like `Control` or `ArrowDown`, use [Locator.Press].
2495
2509
//
2510
+
// Deprecated: In most cases, you should use [Locator.Fill] instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentially].
// error. However, if the element is inside the `<label>` element that has an associated
2978
2994
// [control], the control will be filled
2979
2995
// instead.
2980
-
// To send fine-grained keyboard events, use [Page.Type].
2996
+
// To send fine-grained keyboard events, use [Locator.PressSequentially].
2981
2997
//
2982
2998
// Deprecated: Use locator-based [Locator.Fill] instead. Read more about [locators].
2983
2999
//
@@ -3512,13 +3528,11 @@ type Page interface {
3512
3528
// send fine-grained keyboard events. To fill values in form fields, use [Page.Fill].
3513
3529
// To press a special key, like `Control` or `ArrowDown`, use [Keyboard.Press].
3514
3530
//
3515
-
// Deprecated: Use locator-based [Locator.Type] instead. Read more about [locators].
3531
+
// Deprecated: In most cases, you should use [Locator.Fill] instead. You only need to press keys one by one if there is special keyboard handling on the page - in this case use [Locator.PressSequentially].
3516
3532
//
3517
3533
// 1. selector: A selector to search for an element. If there are multiple elements satisfying the selector, the first will be
3518
3534
// used.
3519
3535
// 2. text: A text to type into a focused element.
0 commit comments