playwright-ruby-client 1.28.1 → 1.29.1.alpha1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/accessibility.md +9 -14
  3. data/documentation/docs/api/api_request_context.md +44 -41
  4. data/documentation/docs/api/api_response.md +13 -3
  5. data/documentation/docs/api/browser.md +24 -23
  6. data/documentation/docs/api/browser_context.md +71 -45
  7. data/documentation/docs/api/browser_type.md +21 -14
  8. data/documentation/docs/api/cdp_session.md +3 -5
  9. data/documentation/docs/api/console_message.md +7 -4
  10. data/documentation/docs/api/dialog.md +9 -5
  11. data/documentation/docs/api/download.md +19 -11
  12. data/documentation/docs/api/element_handle.md +125 -116
  13. data/documentation/docs/api/experimental/android.md +4 -5
  14. data/documentation/docs/api/experimental/android_device.md +11 -2
  15. data/documentation/docs/api/experimental/android_input.md +5 -0
  16. data/documentation/docs/api/file_chooser.md +6 -3
  17. data/documentation/docs/api/frame.md +182 -171
  18. data/documentation/docs/api/frame_locator.md +27 -38
  19. data/documentation/docs/api/js_handle.md +16 -10
  20. data/documentation/docs/api/keyboard.md +29 -16
  21. data/documentation/docs/api/locator.md +189 -140
  22. data/documentation/docs/api/mouse.md +9 -4
  23. data/documentation/docs/api/page.md +304 -289
  24. data/documentation/docs/api/playwright.md +8 -5
  25. data/documentation/docs/api/request.md +34 -15
  26. data/documentation/docs/api/response.md +27 -10
  27. data/documentation/docs/api/route.md +44 -12
  28. data/documentation/docs/api/selectors.md +5 -3
  29. data/documentation/docs/api/touchscreen.md +2 -0
  30. data/documentation/docs/api/tracing.md +11 -11
  31. data/documentation/docs/api/web_socket.md +9 -4
  32. data/documentation/docs/api/worker.md +12 -11
  33. data/documentation/docs/include/api_coverage.md +2 -0
  34. data/lib/playwright/channel_owners/api_request_context.rb +37 -2
  35. data/lib/playwright/channel_owners/browser_context.rb +22 -26
  36. data/lib/playwright/channel_owners/page.rb +35 -25
  37. data/lib/playwright/channel_owners/route.rb +28 -8
  38. data/lib/playwright/event_emitter.rb +6 -1
  39. data/lib/playwright/locator_impl.rb +8 -0
  40. data/lib/playwright/select_option_values.rb +2 -0
  41. data/lib/playwright/version.rb +2 -2
  42. data/lib/playwright_api/accessibility.rb +9 -13
  43. data/lib/playwright_api/android.rb +14 -12
  44. data/lib/playwright_api/android_device.rb +38 -13
  45. data/lib/playwright_api/android_input.rb +5 -0
  46. data/lib/playwright_api/android_socket.rb +4 -2
  47. data/lib/playwright_api/android_web_view.rb +5 -2
  48. data/lib/playwright_api/api_request.rb +6 -3
  49. data/lib/playwright_api/api_request_context.rb +52 -42
  50. data/lib/playwright_api/api_response.rb +13 -2
  51. data/lib/playwright_api/browser.rb +30 -22
  52. data/lib/playwright_api/browser_context.rb +82 -45
  53. data/lib/playwright_api/browser_type.rb +29 -19
  54. data/lib/playwright_api/cdp_session.rb +9 -10
  55. data/lib/playwright_api/console_message.rb +13 -8
  56. data/lib/playwright_api/dialog.rb +14 -10
  57. data/lib/playwright_api/download.rb +19 -9
  58. data/lib/playwright_api/element_handle.rb +122 -99
  59. data/lib/playwright_api/file_chooser.rb +6 -1
  60. data/lib/playwright_api/frame.rb +186 -141
  61. data/lib/playwright_api/frame_locator.rb +29 -32
  62. data/lib/playwright_api/js_handle.rb +22 -12
  63. data/lib/playwright_api/keyboard.rb +29 -14
  64. data/lib/playwright_api/locator.rb +183 -112
  65. data/lib/playwright_api/mouse.rb +9 -2
  66. data/lib/playwright_api/page.rb +307 -259
  67. data/lib/playwright_api/playwright.rb +17 -10
  68. data/lib/playwright_api/request.rb +40 -13
  69. data/lib/playwright_api/response.rb +33 -16
  70. data/lib/playwright_api/route.rb +50 -17
  71. data/lib/playwright_api/selectors.rb +12 -7
  72. data/lib/playwright_api/touchscreen.rb +2 -0
  73. data/lib/playwright_api/tracing.rb +17 -11
  74. data/lib/playwright_api/web_socket.rb +15 -10
  75. data/lib/playwright_api/worker.rb +20 -17
  76. data/playwright.gemspec +2 -2
  77. data/sig/playwright.rbs +559 -0
  78. metadata +10 -9
@@ -4,9 +4,11 @@ sidebar_position: 10
4
4
 
5
5
  # Download
6
6
 
7
+
7
8
  [Download](./download) objects are dispatched by page via the [`event: Page.download`] event.
8
9
 
9
- All the downloaded files belonging to the browser context are deleted when the browser context is closed.
10
+ All the downloaded files belonging to the browser context are deleted when the
11
+ browser context is closed.
10
12
 
11
13
  Download event is emitted once the download starts. Download path becomes available once download completes:
12
14
 
@@ -19,16 +21,15 @@ end
19
21
  path = download.path
20
22
  ```
21
23
 
22
-
23
-
24
24
  ## cancel
25
25
 
26
26
  ```
27
27
  def cancel
28
28
  ```
29
29
 
30
- Cancels a download. Will not fail if the download is already finished or canceled. Upon successful cancellations,
31
- `download.failure()` would resolve to `'canceled'`.
30
+
31
+ Cancels a download. Will not fail if the download is already finished or canceled.
32
+ Upon successful cancellations, `download.failure()` would resolve to `'canceled'`.
32
33
 
33
34
  ## delete
34
35
 
@@ -36,6 +37,7 @@ Cancels a download. Will not fail if the download is already finished or cancele
36
37
  def delete
37
38
  ```
38
39
 
40
+
39
41
  Deletes the downloaded file. Will wait for the download to finish if necessary.
40
42
 
41
43
  ## failure
@@ -44,6 +46,7 @@ Deletes the downloaded file. Will wait for the download to finish if necessary.
44
46
  def failure
45
47
  ```
46
48
 
49
+
47
50
  Returns download error if any. Will wait for the download to finish if necessary.
48
51
 
49
52
  ## page
@@ -52,6 +55,7 @@ Returns download error if any. Will wait for the download to finish if necessary
52
55
  def page
53
56
  ```
54
57
 
58
+
55
59
  Get the page that the download belongs to.
56
60
 
57
61
  ## path
@@ -60,11 +64,12 @@ Get the page that the download belongs to.
60
64
  def path
61
65
  ```
62
66
 
63
- Returns path to the downloaded file in case of successful download. The method will wait for the download to finish if
64
- necessary. The method throws when connected remotely.
65
67
 
66
- Note that the download's file name is a random GUID, use [Download#suggested_filename](./download#suggested_filename) to get suggested file
67
- name.
68
+ Returns path to the downloaded file in case of successful download. The method will
69
+ wait for the download to finish if necessary. The method throws when connected remotely.
70
+
71
+ Note that the download's file name is a random GUID, use [Download#suggested_filename](./download#suggested_filename)
72
+ to get suggested file name.
68
73
 
69
74
  ## save_as
70
75
 
@@ -72,8 +77,9 @@ name.
72
77
  def save_as(path)
73
78
  ```
74
79
 
75
- Copy the download to a user-specified path. It is safe to call this method while the download is still in progress. Will
76
- wait for the download to finish if necessary.
80
+
81
+ Copy the download to a user-specified path. It is safe to call this method while the download
82
+ is still in progress. Will wait for the download to finish if necessary.
77
83
 
78
84
  ## suggested_filename
79
85
 
@@ -81,6 +87,7 @@ wait for the download to finish if necessary.
81
87
  def suggested_filename
82
88
  ```
83
89
 
90
+
84
91
  Returns suggested filename for this download. It is typically computed by the browser from the
85
92
  [`Content-Disposition`](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Disposition) response header
86
93
  or the `download` attribute. See the spec on [whatwg](https://html.spec.whatwg.org/#downloading-resources). Different
@@ -92,4 +99,5 @@ browsers can use different logic for computing it.
92
99
  def url
93
100
  ```
94
101
 
102
+
95
103
  Returns downloaded url.