playwright-ruby-client 1.61.0 → 1.63.0
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.
- checksums.yaml +4 -4
- data/README.md +12 -17
- data/documentation/docs/api/api_request_context.md +3 -0
- data/documentation/docs/api/api_response.md +12 -0
- data/documentation/docs/api/browser_context.md +5 -3
- data/documentation/docs/api/browser_type.md +2 -0
- data/documentation/docs/api/credentials.md +6 -2
- data/documentation/docs/api/element_handle.md +7 -0
- data/documentation/docs/api/frame.md +20 -1
- data/documentation/docs/api/frame_locator.md +20 -0
- data/documentation/docs/api/locator.md +57 -0
- data/documentation/docs/api/locator_assertions.md +4 -2
- data/documentation/docs/api/page.md +26 -1
- data/documentation/docs/api/playwright.md +2 -2
- data/documentation/docs/api/tracing.md +3 -1
- data/documentation/docs/article/getting_started.md +12 -11
- data/documentation/docs/article/guides/download_playwright_driver.md +11 -32
- data/documentation/docs/article/guides/launch_browser.md +5 -4
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +6 -5
- data/documentation/docs/article/guides/rails_integration.md +72 -4
- data/documentation/docs/article/guides/rails_integration_with_null_driver.md +4 -3
- data/documentation/docs/article/guides/semi_automation.md +1 -1
- data/documentation/docs/article/guides/use_storage_state.md +1 -1
- data/documentation/docs/include/api_coverage.md +3 -0
- data/documentation/docusaurus.config.js +31 -0
- data/documentation/package.json +3 -0
- data/documentation/yarn.lock +159 -174
- data/lib/playwright/api_request_impl.rb +3 -1
- data/lib/playwright/api_response_impl.rb +16 -0
- data/lib/playwright/channel.rb +2 -1
- data/lib/playwright/channel_owners/browser.rb +1 -0
- data/lib/playwright/channel_owners/browser_context.rb +22 -3
- data/lib/playwright/channel_owners/element_handle.rb +14 -4
- data/lib/playwright/channel_owners/frame.rb +16 -2
- data/lib/playwright/channel_owners/page.rb +21 -9
- data/lib/playwright/channel_owners/tracing.rb +43 -13
- data/lib/playwright/connection.rb +9 -1
- data/lib/playwright/events.rb +2 -0
- data/lib/playwright/frame_locator_impl.rb +20 -5
- data/lib/playwright/locator_assertions_impl.rb +14 -1
- data/lib/playwright/locator_impl.rb +32 -5
- data/lib/playwright/screencast.rb +20 -6
- data/lib/playwright/screenshot_utils.rb +24 -0
- data/lib/playwright/test.rb +12 -2
- data/lib/playwright/url_matcher.rb +120 -4
- data/lib/playwright/utils.rb +12 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright.rb +2 -2
- data/lib/playwright_api/api_request_context.rb +3 -1
- data/lib/playwright_api/api_response.rb +9 -0
- data/lib/playwright_api/browser_context.rb +16 -14
- data/lib/playwright_api/browser_type.rb +2 -0
- data/lib/playwright_api/credentials.rb +6 -2
- data/lib/playwright_api/element_handle.rb +14 -7
- data/lib/playwright_api/frame.rb +28 -9
- data/lib/playwright_api/frame_locator.rb +20 -0
- data/lib/playwright_api/locator.rb +64 -13
- data/lib/playwright_api/locator_assertions.rb +6 -4
- data/lib/playwright_api/page.rb +46 -21
- data/lib/playwright_api/tracing.rb +4 -2
- data/playwright.gemspec +5 -0
- data/sig/playwright.rbs +49 -46
- metadata +7 -3
|
@@ -76,9 +76,10 @@ module Playwright
|
|
|
76
76
|
force: nil,
|
|
77
77
|
noWaitAfter: nil,
|
|
78
78
|
position: nil,
|
|
79
|
+
scroll: nil,
|
|
79
80
|
timeout: nil,
|
|
80
81
|
trial: nil)
|
|
81
|
-
wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
82
|
+
wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
82
83
|
end
|
|
83
84
|
|
|
84
85
|
#
|
|
@@ -100,10 +101,11 @@ module Playwright
|
|
|
100
101
|
modifiers: nil,
|
|
101
102
|
noWaitAfter: nil,
|
|
102
103
|
position: nil,
|
|
104
|
+
scroll: nil,
|
|
103
105
|
steps: nil,
|
|
104
106
|
timeout: nil,
|
|
105
107
|
trial: nil)
|
|
106
|
-
wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
108
|
+
wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
107
109
|
end
|
|
108
110
|
|
|
109
111
|
#
|
|
@@ -131,10 +133,11 @@ module Playwright
|
|
|
131
133
|
modifiers: nil,
|
|
132
134
|
noWaitAfter: nil,
|
|
133
135
|
position: nil,
|
|
136
|
+
scroll: nil,
|
|
134
137
|
steps: nil,
|
|
135
138
|
timeout: nil,
|
|
136
139
|
trial: nil)
|
|
137
|
-
wrap_impl(@impl.dblclick(button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
140
|
+
wrap_impl(@impl.dblclick(button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
138
141
|
end
|
|
139
142
|
|
|
140
143
|
#
|
|
@@ -260,9 +263,10 @@ module Playwright
|
|
|
260
263
|
modifiers: nil,
|
|
261
264
|
noWaitAfter: nil,
|
|
262
265
|
position: nil,
|
|
266
|
+
scroll: nil,
|
|
263
267
|
timeout: nil,
|
|
264
268
|
trial: nil)
|
|
265
|
-
wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
269
|
+
wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
266
270
|
end
|
|
267
271
|
|
|
268
272
|
#
|
|
@@ -455,9 +459,10 @@ module Playwright
|
|
|
455
459
|
force: nil,
|
|
456
460
|
noWaitAfter: nil,
|
|
457
461
|
position: nil,
|
|
462
|
+
scroll: nil,
|
|
458
463
|
timeout: nil,
|
|
459
464
|
trial: nil)
|
|
460
|
-
wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
465
|
+
wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
461
466
|
end
|
|
462
467
|
alias_method :checked=, :set_checked
|
|
463
468
|
|
|
@@ -490,9 +495,10 @@ module Playwright
|
|
|
490
495
|
modifiers: nil,
|
|
491
496
|
noWaitAfter: nil,
|
|
492
497
|
position: nil,
|
|
498
|
+
scroll: nil,
|
|
493
499
|
timeout: nil,
|
|
494
500
|
trial: nil)
|
|
495
|
-
wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
501
|
+
wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
496
502
|
end
|
|
497
503
|
|
|
498
504
|
#
|
|
@@ -529,9 +535,10 @@ module Playwright
|
|
|
529
535
|
force: nil,
|
|
530
536
|
noWaitAfter: nil,
|
|
531
537
|
position: nil,
|
|
538
|
+
scroll: nil,
|
|
532
539
|
timeout: nil,
|
|
533
540
|
trial: nil)
|
|
534
|
-
wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
541
|
+
wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
535
542
|
end
|
|
536
543
|
|
|
537
544
|
#
|
data/lib/playwright_api/frame.rb
CHANGED
|
@@ -64,10 +64,11 @@ module Playwright
|
|
|
64
64
|
force: nil,
|
|
65
65
|
noWaitAfter: nil,
|
|
66
66
|
position: nil,
|
|
67
|
+
scroll: nil,
|
|
67
68
|
strict: nil,
|
|
68
69
|
timeout: nil,
|
|
69
70
|
trial: nil)
|
|
70
|
-
wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
71
|
+
wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
71
72
|
end
|
|
72
73
|
|
|
73
74
|
def child_frames
|
|
@@ -93,10 +94,11 @@ module Playwright
|
|
|
93
94
|
modifiers: nil,
|
|
94
95
|
noWaitAfter: nil,
|
|
95
96
|
position: nil,
|
|
97
|
+
scroll: nil,
|
|
96
98
|
strict: nil,
|
|
97
99
|
timeout: nil,
|
|
98
100
|
trial: nil)
|
|
99
|
-
wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
101
|
+
wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
100
102
|
end
|
|
101
103
|
|
|
102
104
|
#
|
|
@@ -124,10 +126,11 @@ module Playwright
|
|
|
124
126
|
modifiers: nil,
|
|
125
127
|
noWaitAfter: nil,
|
|
126
128
|
position: nil,
|
|
129
|
+
scroll: nil,
|
|
127
130
|
strict: nil,
|
|
128
131
|
timeout: nil,
|
|
129
132
|
trial: nil)
|
|
130
|
-
wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
133
|
+
wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
131
134
|
end
|
|
132
135
|
|
|
133
136
|
#
|
|
@@ -179,13 +182,14 @@ module Playwright
|
|
|
179
182
|
target,
|
|
180
183
|
force: nil,
|
|
181
184
|
noWaitAfter: nil,
|
|
185
|
+
scroll: nil,
|
|
182
186
|
sourcePosition: nil,
|
|
183
187
|
steps: nil,
|
|
184
188
|
strict: nil,
|
|
185
189
|
targetPosition: nil,
|
|
186
190
|
timeout: nil,
|
|
187
191
|
trial: nil)
|
|
188
|
-
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
192
|
+
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), scroll: unwrap_impl(scroll), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
189
193
|
end
|
|
190
194
|
|
|
191
195
|
#
|
|
@@ -343,6 +347,10 @@ module Playwright
|
|
|
343
347
|
# When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
|
|
344
348
|
# in that iframe.
|
|
345
349
|
#
|
|
350
|
+
# When called without `selector`, the search starts in this frame or in any of the iframes inside it,
|
|
351
|
+
# so that you don't need to locate each iframe first. Note that the rest of the locator is resolved inside a single
|
|
352
|
+
# frame, just like any other locator. If it matches elements inside multiple frames, an error is thrown.
|
|
353
|
+
#
|
|
346
354
|
# **Usage**
|
|
347
355
|
#
|
|
348
356
|
# Following snippet locates element with text "Submit" in the iframe with id `my-frame`, like `<iframe id="my-frame">`:
|
|
@@ -351,7 +359,14 @@ module Playwright
|
|
|
351
359
|
# locator = frame.frame_locator("#my-iframe").get_by_text("Submit")
|
|
352
360
|
# locator.click()
|
|
353
361
|
# ```
|
|
354
|
-
|
|
362
|
+
#
|
|
363
|
+
# Following snippet locates a button, either in the frame or in one of the iframes inside it:
|
|
364
|
+
#
|
|
365
|
+
# ```python sync
|
|
366
|
+
# locator = frame.frame_locator().get_by_role("button")
|
|
367
|
+
# locator.click()
|
|
368
|
+
# ```
|
|
369
|
+
def frame_locator(selector = nil)
|
|
355
370
|
wrap_impl(@impl.frame_locator(unwrap_impl(selector)))
|
|
356
371
|
end
|
|
357
372
|
|
|
@@ -592,10 +607,11 @@ module Playwright
|
|
|
592
607
|
modifiers: nil,
|
|
593
608
|
noWaitAfter: nil,
|
|
594
609
|
position: nil,
|
|
610
|
+
scroll: nil,
|
|
595
611
|
strict: nil,
|
|
596
612
|
timeout: nil,
|
|
597
613
|
trial: nil)
|
|
598
|
-
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
614
|
+
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
599
615
|
end
|
|
600
616
|
|
|
601
617
|
#
|
|
@@ -799,10 +815,11 @@ module Playwright
|
|
|
799
815
|
force: nil,
|
|
800
816
|
noWaitAfter: nil,
|
|
801
817
|
position: nil,
|
|
818
|
+
scroll: nil,
|
|
802
819
|
strict: nil,
|
|
803
820
|
timeout: nil,
|
|
804
821
|
trial: nil)
|
|
805
|
-
wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
822
|
+
wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
806
823
|
end
|
|
807
824
|
|
|
808
825
|
#
|
|
@@ -844,10 +861,11 @@ module Playwright
|
|
|
844
861
|
modifiers: nil,
|
|
845
862
|
noWaitAfter: nil,
|
|
846
863
|
position: nil,
|
|
864
|
+
scroll: nil,
|
|
847
865
|
strict: nil,
|
|
848
866
|
timeout: nil,
|
|
849
867
|
trial: nil)
|
|
850
|
-
wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
868
|
+
wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
851
869
|
end
|
|
852
870
|
|
|
853
871
|
#
|
|
@@ -897,10 +915,11 @@ module Playwright
|
|
|
897
915
|
force: nil,
|
|
898
916
|
noWaitAfter: nil,
|
|
899
917
|
position: nil,
|
|
918
|
+
scroll: nil,
|
|
900
919
|
strict: nil,
|
|
901
920
|
timeout: nil,
|
|
902
921
|
trial: nil)
|
|
903
|
-
wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
922
|
+
wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
904
923
|
end
|
|
905
924
|
|
|
906
925
|
#
|
|
@@ -19,6 +19,26 @@ module Playwright
|
|
|
19
19
|
# page.locator('.result-frame').first.content_frame.get_by_role('button').click()
|
|
20
20
|
# ```
|
|
21
21
|
#
|
|
22
|
+
# **Any frame**
|
|
23
|
+
#
|
|
24
|
+
# Calling [`method: Page.frameLocator`] or [`method: Frame.frameLocator`] without a selector creates a frame locator that
|
|
25
|
+
# starts the search in any frame of the subtree - so that you don't
|
|
26
|
+
# need to locate the iframe first.
|
|
27
|
+
#
|
|
28
|
+
# ```python sync
|
|
29
|
+
# # Finds the button in any frame on the page:
|
|
30
|
+
# page.frame_locator().get_by_role("button").click()
|
|
31
|
+
#
|
|
32
|
+
# # Finds the iframe with id "my-frame" anywhere on the page, and clicks the button inside it:
|
|
33
|
+
# page.frame_locator().locator("#my-frame").content_frame.get_by_role("button").click()
|
|
34
|
+
# ```
|
|
35
|
+
#
|
|
36
|
+
# Only the start of the search is affected - the rest of the locator is resolved inside a single frame, just like any
|
|
37
|
+
# other locator. Following the strictness rules above, an error is thrown when elements are matched in multiple frames.
|
|
38
|
+
#
|
|
39
|
+
# Such a frame locator does not point to a particular `iframe`, so [`method: FrameLocator.owner`],
|
|
40
|
+
# [`method: FrameLocator.first`], [`method: FrameLocator.last`] and [`method: FrameLocator.nth`] are not supported on it.
|
|
41
|
+
#
|
|
22
42
|
# **Converting Locator to FrameLocator**
|
|
23
43
|
#
|
|
24
44
|
# If you have a `Locator` object pointing to an `iframe` it can be converted to `FrameLocator` using [`method: Locator.contentFrame`].
|
|
@@ -168,9 +168,10 @@ module Playwright
|
|
|
168
168
|
force: nil,
|
|
169
169
|
noWaitAfter: nil,
|
|
170
170
|
position: nil,
|
|
171
|
+
scroll: nil,
|
|
171
172
|
timeout: nil,
|
|
172
173
|
trial: nil)
|
|
173
|
-
wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
174
|
+
wrap_impl(@impl.check(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
174
175
|
end
|
|
175
176
|
|
|
176
177
|
#
|
|
@@ -230,10 +231,11 @@ module Playwright
|
|
|
230
231
|
modifiers: nil,
|
|
231
232
|
noWaitAfter: nil,
|
|
232
233
|
position: nil,
|
|
234
|
+
scroll: nil,
|
|
233
235
|
steps: nil,
|
|
234
236
|
timeout: nil,
|
|
235
237
|
trial: nil)
|
|
236
|
-
wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
238
|
+
wrap_impl(@impl.click(button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
237
239
|
end
|
|
238
240
|
|
|
239
241
|
#
|
|
@@ -273,10 +275,11 @@ module Playwright
|
|
|
273
275
|
modifiers: nil,
|
|
274
276
|
noWaitAfter: nil,
|
|
275
277
|
position: nil,
|
|
278
|
+
scroll: nil,
|
|
276
279
|
steps: nil,
|
|
277
280
|
timeout: nil,
|
|
278
281
|
trial: nil)
|
|
279
|
-
wrap_impl(@impl.dblclick(button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
282
|
+
wrap_impl(@impl.dblclick(button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), steps: unwrap_impl(steps), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
280
283
|
end
|
|
281
284
|
|
|
282
285
|
#
|
|
@@ -378,12 +381,13 @@ module Playwright
|
|
|
378
381
|
target,
|
|
379
382
|
force: nil,
|
|
380
383
|
noWaitAfter: nil,
|
|
384
|
+
scroll: nil,
|
|
381
385
|
sourcePosition: nil,
|
|
382
386
|
steps: nil,
|
|
383
387
|
targetPosition: nil,
|
|
384
388
|
timeout: nil,
|
|
385
389
|
trial: nil)
|
|
386
|
-
wrap_impl(@impl.drag_to(unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
390
|
+
wrap_impl(@impl.drag_to(unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), scroll: unwrap_impl(scroll), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
387
391
|
end
|
|
388
392
|
|
|
389
393
|
#
|
|
@@ -807,9 +811,10 @@ module Playwright
|
|
|
807
811
|
modifiers: nil,
|
|
808
812
|
noWaitAfter: nil,
|
|
809
813
|
position: nil,
|
|
814
|
+
scroll: nil,
|
|
810
815
|
timeout: nil,
|
|
811
816
|
trial: nil)
|
|
812
|
-
wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
817
|
+
wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
813
818
|
end
|
|
814
819
|
|
|
815
820
|
#
|
|
@@ -1187,9 +1192,10 @@ module Playwright
|
|
|
1187
1192
|
force: nil,
|
|
1188
1193
|
noWaitAfter: nil,
|
|
1189
1194
|
position: nil,
|
|
1195
|
+
scroll: nil,
|
|
1190
1196
|
timeout: nil,
|
|
1191
1197
|
trial: nil)
|
|
1192
|
-
wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1198
|
+
wrap_impl(@impl.set_checked(unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1193
1199
|
end
|
|
1194
1200
|
alias_method :checked=, :set_checked
|
|
1195
1201
|
|
|
@@ -1253,9 +1259,10 @@ module Playwright
|
|
|
1253
1259
|
modifiers: nil,
|
|
1254
1260
|
noWaitAfter: nil,
|
|
1255
1261
|
position: nil,
|
|
1262
|
+
scroll: nil,
|
|
1256
1263
|
timeout: nil,
|
|
1257
1264
|
trial: nil)
|
|
1258
|
-
wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1265
|
+
wrap_impl(@impl.tap_point(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1259
1266
|
end
|
|
1260
1267
|
|
|
1261
1268
|
#
|
|
@@ -1304,9 +1311,35 @@ module Playwright
|
|
|
1304
1311
|
force: nil,
|
|
1305
1312
|
noWaitAfter: nil,
|
|
1306
1313
|
position: nil,
|
|
1314
|
+
scroll: nil,
|
|
1307
1315
|
timeout: nil,
|
|
1308
1316
|
trial: nil)
|
|
1309
|
-
wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1317
|
+
wrap_impl(@impl.uncheck(force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1318
|
+
end
|
|
1319
|
+
|
|
1320
|
+
#
|
|
1321
|
+
# Returns a locator that matches only [visible](../actionability.md#visible) elements, ignoring the invisible ones. This is the recommended way to distinguish elements by visibility, as opposed to the `:visible` CSS pseudo-class.
|
|
1322
|
+
#
|
|
1323
|
+
# Note that visibility is checked every time the locator is used, and not at the moment of the [`method: Locator.visible`] call.
|
|
1324
|
+
#
|
|
1325
|
+
# **Usage**
|
|
1326
|
+
#
|
|
1327
|
+
# Consider a page with two buttons, the first invisible and the second visible.
|
|
1328
|
+
#
|
|
1329
|
+
# ```html
|
|
1330
|
+
# <button style='display: none'>Invisible</button>
|
|
1331
|
+
# <button>Visible</button>
|
|
1332
|
+
# ```
|
|
1333
|
+
#
|
|
1334
|
+
# This will only find the second button, because it is visible, and then click it.
|
|
1335
|
+
#
|
|
1336
|
+
# ```python sync
|
|
1337
|
+
# page.locator("button").visible.click()
|
|
1338
|
+
# ```
|
|
1339
|
+
#
|
|
1340
|
+
# To match invisible elements instead, use [`method: Locator.filter`] with the `visible` option set to `false`.
|
|
1341
|
+
def visible
|
|
1342
|
+
wrap_impl(@impl.visible)
|
|
1310
1343
|
end
|
|
1311
1344
|
|
|
1312
1345
|
#
|
|
@@ -1325,6 +1358,29 @@ module Playwright
|
|
|
1325
1358
|
wrap_impl(@impl.wait_for(state: unwrap_impl(state), timeout: unwrap_impl(timeout)))
|
|
1326
1359
|
end
|
|
1327
1360
|
|
|
1361
|
+
#
|
|
1362
|
+
# Returns when `expression` returns a truthy value, called with the matching element as a first argument, and `arg` as a second argument.
|
|
1363
|
+
#
|
|
1364
|
+
# This is a generic way to wait for an element to reach a custom condition without asserting it. The locator is re-resolved on each retry, so it tolerates the element being re-rendered while waiting.
|
|
1365
|
+
#
|
|
1366
|
+
# If `expression` returns a [Promise], this method will wait for the promise to resolve before checking its value.
|
|
1367
|
+
#
|
|
1368
|
+
# If `expression` throws or rejects, this method throws.
|
|
1369
|
+
#
|
|
1370
|
+
# **Usage**
|
|
1371
|
+
#
|
|
1372
|
+
# Wait for an attribute to appear:
|
|
1373
|
+
#
|
|
1374
|
+
# Passing argument to `expression`:
|
|
1375
|
+
def wait_for_function(expression, arg: nil, timeout: nil)
|
|
1376
|
+
wrap_impl(@impl.wait_for_function(unwrap_impl(expression), arg: unwrap_impl(arg), timeout: unwrap_impl(timeout)))
|
|
1377
|
+
end
|
|
1378
|
+
|
|
1379
|
+
# @nodoc
|
|
1380
|
+
def expect(expression, options, title)
|
|
1381
|
+
wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
|
|
1382
|
+
end
|
|
1383
|
+
|
|
1328
1384
|
# @nodoc
|
|
1329
1385
|
def _assertions(timeout, is_not, message)
|
|
1330
1386
|
wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
|
|
@@ -1335,11 +1391,6 @@ module Playwright
|
|
|
1335
1391
|
wrap_impl(@impl.resolve_selector)
|
|
1336
1392
|
end
|
|
1337
1393
|
|
|
1338
|
-
# @nodoc
|
|
1339
|
-
def expect(expression, options, title)
|
|
1340
|
-
wrap_impl(@impl.expect(unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
|
|
1341
|
-
end
|
|
1342
|
-
|
|
1343
1394
|
# @nodoc
|
|
1344
1395
|
def to_s
|
|
1345
1396
|
wrap_impl(@impl.to_s)
|
|
@@ -104,8 +104,8 @@ module Playwright
|
|
|
104
104
|
|
|
105
105
|
#
|
|
106
106
|
# The opposite of [`method: LocatorAssertions.toHaveAttribute`].
|
|
107
|
-
def not_to_have_attribute(name, value, ignoreCase: nil, timeout: nil)
|
|
108
|
-
wrap_impl(@impl.not_to_have_attribute(unwrap_impl(name), unwrap_impl(value), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
|
|
107
|
+
def not_to_have_attribute(name, value: nil, ignoreCase: nil, timeout: nil)
|
|
108
|
+
wrap_impl(@impl.not_to_have_attribute(unwrap_impl(name), value: unwrap_impl(value), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
|
|
109
109
|
end
|
|
110
110
|
|
|
111
111
|
#
|
|
@@ -477,9 +477,11 @@ module Playwright
|
|
|
477
477
|
#
|
|
478
478
|
# locator = page.locator("input")
|
|
479
479
|
# expect(locator).to_have_attribute("type", "text")
|
|
480
|
+
# expect(locator).to_have_attribute("disabled")
|
|
481
|
+
# expect(locator).not_to_have_attribute("readonly")
|
|
480
482
|
# ```
|
|
481
|
-
def to_have_attribute(name, value, ignoreCase: nil, timeout: nil)
|
|
482
|
-
wrap_impl(@impl.to_have_attribute(unwrap_impl(name), unwrap_impl(value), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
|
|
483
|
+
def to_have_attribute(name, value: nil, ignoreCase: nil, timeout: nil)
|
|
484
|
+
wrap_impl(@impl.to_have_attribute(unwrap_impl(name), value: unwrap_impl(value), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
|
|
483
485
|
end
|
|
484
486
|
|
|
485
487
|
#
|
data/lib/playwright_api/page.rb
CHANGED
|
@@ -154,10 +154,11 @@ module Playwright
|
|
|
154
154
|
force: nil,
|
|
155
155
|
noWaitAfter: nil,
|
|
156
156
|
position: nil,
|
|
157
|
+
scroll: nil,
|
|
157
158
|
strict: nil,
|
|
158
159
|
timeout: nil,
|
|
159
160
|
trial: nil)
|
|
160
|
-
wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
161
|
+
wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
161
162
|
end
|
|
162
163
|
|
|
163
164
|
#
|
|
@@ -179,10 +180,11 @@ module Playwright
|
|
|
179
180
|
modifiers: nil,
|
|
180
181
|
noWaitAfter: nil,
|
|
181
182
|
position: nil,
|
|
183
|
+
scroll: nil,
|
|
182
184
|
strict: nil,
|
|
183
185
|
timeout: nil,
|
|
184
186
|
trial: nil)
|
|
185
|
-
wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
187
|
+
wrap_impl(@impl.click(unwrap_impl(selector), button: unwrap_impl(button), clickCount: unwrap_impl(clickCount), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
186
188
|
end
|
|
187
189
|
|
|
188
190
|
#
|
|
@@ -228,10 +230,11 @@ module Playwright
|
|
|
228
230
|
modifiers: nil,
|
|
229
231
|
noWaitAfter: nil,
|
|
230
232
|
position: nil,
|
|
233
|
+
scroll: nil,
|
|
231
234
|
strict: nil,
|
|
232
235
|
timeout: nil,
|
|
233
236
|
trial: nil)
|
|
234
|
-
wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
237
|
+
wrap_impl(@impl.dblclick(unwrap_impl(selector), button: unwrap_impl(button), delay: unwrap_impl(delay), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
235
238
|
end
|
|
236
239
|
|
|
237
240
|
#
|
|
@@ -300,13 +303,14 @@ module Playwright
|
|
|
300
303
|
target,
|
|
301
304
|
force: nil,
|
|
302
305
|
noWaitAfter: nil,
|
|
306
|
+
scroll: nil,
|
|
303
307
|
sourcePosition: nil,
|
|
304
308
|
steps: nil,
|
|
305
309
|
strict: nil,
|
|
306
310
|
targetPosition: nil,
|
|
307
311
|
timeout: nil,
|
|
308
312
|
trial: nil)
|
|
309
|
-
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
313
|
+
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), scroll: unwrap_impl(scroll), sourcePosition: unwrap_impl(sourcePosition), steps: unwrap_impl(steps), strict: unwrap_impl(strict), targetPosition: unwrap_impl(targetPosition), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
310
314
|
end
|
|
311
315
|
|
|
312
316
|
#
|
|
@@ -588,6 +592,10 @@ module Playwright
|
|
|
588
592
|
# When working with iframes, you can create a frame locator that will enter the iframe and allow selecting elements
|
|
589
593
|
# in that iframe.
|
|
590
594
|
#
|
|
595
|
+
# When called without `selector`, the search starts in any frame on the page - the main frame or any of
|
|
596
|
+
# the iframes - so that you don't need to locate each iframe first. Note that the rest of the locator is resolved
|
|
597
|
+
# inside a single frame, just like any other locator. If it matches elements inside multiple frames, an error is thrown.
|
|
598
|
+
#
|
|
591
599
|
# **Usage**
|
|
592
600
|
#
|
|
593
601
|
# Following snippet locates element with text "Submit" in the iframe with id `my-frame`,
|
|
@@ -597,7 +605,14 @@ module Playwright
|
|
|
597
605
|
# locator = page.frame_locator("#my-iframe").get_by_text("Submit")
|
|
598
606
|
# locator.click()
|
|
599
607
|
# ```
|
|
600
|
-
|
|
608
|
+
#
|
|
609
|
+
# Following snippet locates a button, either in the main frame or in one of the iframes:
|
|
610
|
+
#
|
|
611
|
+
# ```python sync
|
|
612
|
+
# locator = page.frame_locator().get_by_role("button")
|
|
613
|
+
# locator.click()
|
|
614
|
+
# ```
|
|
615
|
+
def frame_locator(selector = nil)
|
|
601
616
|
wrap_impl(@impl.frame_locator(unwrap_impl(selector)))
|
|
602
617
|
end
|
|
603
618
|
|
|
@@ -810,6 +825,9 @@ module Playwright
|
|
|
810
825
|
# last redirect. If cannot go back, returns `null`.
|
|
811
826
|
#
|
|
812
827
|
# Navigate to the previous page in history.
|
|
828
|
+
#
|
|
829
|
+
# **NOTE**: **Testing Back/Forward Cache (BFCache) is not supported.**
|
|
830
|
+
# By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
|
|
813
831
|
def go_back(timeout: nil, waitUntil: nil)
|
|
814
832
|
wrap_impl(@impl.go_back(timeout: unwrap_impl(timeout), waitUntil: unwrap_impl(waitUntil)))
|
|
815
833
|
end
|
|
@@ -819,6 +837,9 @@ module Playwright
|
|
|
819
837
|
# last redirect. If cannot go forward, returns `null`.
|
|
820
838
|
#
|
|
821
839
|
# Navigate to the next page in history.
|
|
840
|
+
#
|
|
841
|
+
# **NOTE**: **Testing Back/Forward Cache (BFCache) is not supported.**
|
|
842
|
+
# By default, Playwright disables the Back/Forward Cache across all browsers. Even if explicitly enabled, Playwright's internal state relies on network-level navigation events. Because BFCache restores unfreeze the DOM without firing these events, using `page.goBack()` or `page.goForward()` to trigger a BFCache restore will result in timeouts and a desynchronized `Page` state.
|
|
822
843
|
def go_forward(timeout: nil, waitUntil: nil)
|
|
823
844
|
wrap_impl(@impl.go_forward(timeout: unwrap_impl(timeout), waitUntil: unwrap_impl(waitUntil)))
|
|
824
845
|
end
|
|
@@ -885,10 +906,11 @@ module Playwright
|
|
|
885
906
|
modifiers: nil,
|
|
886
907
|
noWaitAfter: nil,
|
|
887
908
|
position: nil,
|
|
909
|
+
scroll: nil,
|
|
888
910
|
strict: nil,
|
|
889
911
|
timeout: nil,
|
|
890
912
|
trial: nil)
|
|
891
|
-
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
913
|
+
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
892
914
|
end
|
|
893
915
|
|
|
894
916
|
#
|
|
@@ -1408,10 +1430,11 @@ module Playwright
|
|
|
1408
1430
|
force: nil,
|
|
1409
1431
|
noWaitAfter: nil,
|
|
1410
1432
|
position: nil,
|
|
1433
|
+
scroll: nil,
|
|
1411
1434
|
strict: nil,
|
|
1412
1435
|
timeout: nil,
|
|
1413
1436
|
trial: nil)
|
|
1414
|
-
wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1437
|
+
wrap_impl(@impl.set_checked(unwrap_impl(selector), unwrap_impl(checked), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1415
1438
|
end
|
|
1416
1439
|
|
|
1417
1440
|
#
|
|
@@ -1514,10 +1537,11 @@ module Playwright
|
|
|
1514
1537
|
modifiers: nil,
|
|
1515
1538
|
noWaitAfter: nil,
|
|
1516
1539
|
position: nil,
|
|
1540
|
+
scroll: nil,
|
|
1517
1541
|
strict: nil,
|
|
1518
1542
|
timeout: nil,
|
|
1519
1543
|
trial: nil)
|
|
1520
|
-
wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1544
|
+
wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1521
1545
|
end
|
|
1522
1546
|
|
|
1523
1547
|
#
|
|
@@ -1567,10 +1591,11 @@ module Playwright
|
|
|
1567
1591
|
force: nil,
|
|
1568
1592
|
noWaitAfter: nil,
|
|
1569
1593
|
position: nil,
|
|
1594
|
+
scroll: nil,
|
|
1570
1595
|
strict: nil,
|
|
1571
1596
|
timeout: nil,
|
|
1572
1597
|
trial: nil)
|
|
1573
|
-
wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1598
|
+
wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), scroll: unwrap_impl(scroll), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
|
1574
1599
|
end
|
|
1575
1600
|
|
|
1576
1601
|
#
|
|
@@ -1881,33 +1906,33 @@ module Playwright
|
|
|
1881
1906
|
end
|
|
1882
1907
|
|
|
1883
1908
|
# @nodoc
|
|
1884
|
-
def
|
|
1885
|
-
wrap_impl(@impl.
|
|
1909
|
+
def stop_js_coverage
|
|
1910
|
+
wrap_impl(@impl.stop_js_coverage)
|
|
1886
1911
|
end
|
|
1887
1912
|
|
|
1888
1913
|
# @nodoc
|
|
1889
|
-
def
|
|
1890
|
-
wrap_impl(@impl.
|
|
1914
|
+
def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
|
1915
|
+
wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
|
1891
1916
|
end
|
|
1892
1917
|
|
|
1893
1918
|
# @nodoc
|
|
1894
|
-
def
|
|
1895
|
-
wrap_impl(@impl.
|
|
1919
|
+
def start_css_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
|
|
1920
|
+
wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
|
1896
1921
|
end
|
|
1897
1922
|
|
|
1898
1923
|
# @nodoc
|
|
1899
|
-
def
|
|
1900
|
-
wrap_impl(@impl.
|
|
1924
|
+
def snapshot_for_ai(timeout: nil, depth: nil, boxes: nil)
|
|
1925
|
+
wrap_impl(@impl.snapshot_for_ai(timeout: unwrap_impl(timeout), depth: unwrap_impl(depth), boxes: unwrap_impl(boxes)))
|
|
1901
1926
|
end
|
|
1902
1927
|
|
|
1903
1928
|
# @nodoc
|
|
1904
|
-
def
|
|
1905
|
-
wrap_impl(@impl.
|
|
1929
|
+
def stop_css_coverage
|
|
1930
|
+
wrap_impl(@impl.stop_css_coverage)
|
|
1906
1931
|
end
|
|
1907
1932
|
|
|
1908
1933
|
# @nodoc
|
|
1909
|
-
def
|
|
1910
|
-
wrap_impl(@impl.
|
|
1934
|
+
def _assertions(timeout, is_not, message)
|
|
1935
|
+
wrap_impl(@impl._assertions(unwrap_impl(timeout), unwrap_impl(is_not), unwrap_impl(message)))
|
|
1911
1936
|
end
|
|
1912
1937
|
|
|
1913
1938
|
# @nodoc
|
|
@@ -34,13 +34,15 @@ module Playwright
|
|
|
34
34
|
# context.tracing.stop(path = "trace.zip")
|
|
35
35
|
# ```
|
|
36
36
|
def start(
|
|
37
|
+
ariaSnapshots: nil,
|
|
37
38
|
live: nil,
|
|
38
39
|
name: nil,
|
|
39
40
|
screenshots: nil,
|
|
41
|
+
screenSnapshots: nil,
|
|
40
42
|
snapshots: nil,
|
|
41
43
|
sources: nil,
|
|
42
44
|
title: nil)
|
|
43
|
-
wrap_impl(@impl.start(live: unwrap_impl(live), name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
|
|
45
|
+
wrap_impl(@impl.start(ariaSnapshots: unwrap_impl(ariaSnapshots), live: unwrap_impl(live), name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), screenSnapshots: unwrap_impl(screenSnapshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
|
|
44
46
|
end
|
|
45
47
|
|
|
46
48
|
#
|
|
@@ -70,7 +72,7 @@ module Playwright
|
|
|
70
72
|
#
|
|
71
73
|
# Start recording a HAR (HTTP Archive) of network activity in this context. The HAR file is written to disk when [`method: Tracing.stopHar`] is called, or when the returned `Disposable` is disposed.
|
|
72
74
|
#
|
|
73
|
-
# Only one HAR recording can be active at a time per `
|
|
75
|
+
# Only one HAR recording can be active at a time per `Tracing` instance.
|
|
74
76
|
#
|
|
75
77
|
# **Usage**
|
|
76
78
|
#
|