playwright-ruby-client 0.8.1 → 0.9.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/documentation/docs/api/download.md +97 -0
- data/documentation/docs/api/element_handle.md +27 -2
- data/documentation/docs/api/frame.md +50 -17
- data/documentation/docs/api/locator.md +650 -0
- data/documentation/docs/api/page.md +68 -18
- data/documentation/docs/article/guides/inspector.md +31 -0
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
- data/documentation/docs/article/guides/semi_automation.md +1 -1
- data/documentation/docs/include/api_coverage.md +57 -1
- data/lib/playwright.rb +0 -1
- data/lib/playwright/channel_owners/browser_context.rb +25 -0
- data/lib/playwright/channel_owners/frame.rb +70 -33
- data/lib/playwright/channel_owners/page.rb +102 -40
- data/lib/playwright/{download.rb → download_impl.rb} +1 -1
- data/lib/playwright/javascript/expression.rb +5 -4
- data/lib/playwright/locator_impl.rb +314 -0
- data/lib/playwright/timeout_settings.rb +4 -4
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android.rb +6 -6
- data/lib/playwright_api/android_device.rb +6 -6
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +16 -11
- data/lib/playwright_api/browser_type.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/console_message.rb +6 -6
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/download.rb +70 -0
- data/lib/playwright_api/element_handle.rb +33 -19
- data/lib/playwright_api/frame.rb +81 -51
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +509 -0
- data/lib/playwright_api/page.rb +84 -52
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +6 -6
- data/lib/playwright_api/response.rb +6 -6
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/selectors.rb +6 -6
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +6 -6
- metadata +10 -4
data/lib/playwright_api/page.rb
CHANGED
@@ -122,9 +122,10 @@ module Playwright
|
|
122
122
|
force: nil,
|
123
123
|
noWaitAfter: nil,
|
124
124
|
position: nil,
|
125
|
+
strict: nil,
|
125
126
|
timeout: nil,
|
126
127
|
trial: nil)
|
127
|
-
wrap_impl(@impl.check(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
128
|
+
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)))
|
128
129
|
end
|
129
130
|
|
130
131
|
# This method clicks an element matching `selector` by performing the following steps:
|
@@ -148,9 +149,10 @@ module Playwright
|
|
148
149
|
modifiers: nil,
|
149
150
|
noWaitAfter: nil,
|
150
151
|
position: nil,
|
152
|
+
strict: nil,
|
151
153
|
timeout: nil,
|
152
154
|
trial: nil)
|
153
|
-
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), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
155
|
+
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)))
|
154
156
|
end
|
155
157
|
|
156
158
|
# If `runBeforeUnload` is `false`, does not run any unload handlers and waits for the page to be closed. If
|
@@ -197,9 +199,10 @@ module Playwright
|
|
197
199
|
modifiers: nil,
|
198
200
|
noWaitAfter: nil,
|
199
201
|
position: nil,
|
202
|
+
strict: nil,
|
200
203
|
timeout: nil,
|
201
204
|
trial: nil)
|
202
|
-
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), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
205
|
+
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)))
|
203
206
|
end
|
204
207
|
|
205
208
|
# The snippet below dispatches the `click` event on the element. Regardless of the visibility state of the element,
|
@@ -229,8 +232,13 @@ module Playwright
|
|
229
232
|
# data_transfer = page.evaluate_handle("new DataTransfer()")
|
230
233
|
# page.dispatch_event("#source", "dragstart", { "dataTransfer": data_transfer })
|
231
234
|
# ```
|
232
|
-
def dispatch_event(
|
233
|
-
|
235
|
+
def dispatch_event(
|
236
|
+
selector,
|
237
|
+
type,
|
238
|
+
eventInit: nil,
|
239
|
+
strict: nil,
|
240
|
+
timeout: nil)
|
241
|
+
wrap_impl(@impl.dispatch_event(unwrap_impl(selector), unwrap_impl(type), eventInit: unwrap_impl(eventInit), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
234
242
|
end
|
235
243
|
|
236
244
|
def drag_and_drop(
|
@@ -238,9 +246,10 @@ module Playwright
|
|
238
246
|
target,
|
239
247
|
force: nil,
|
240
248
|
noWaitAfter: nil,
|
249
|
+
strict: nil,
|
241
250
|
timeout: nil,
|
242
251
|
trial: nil)
|
243
|
-
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
252
|
+
wrap_impl(@impl.drag_and_drop(unwrap_impl(source), unwrap_impl(target), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
244
253
|
end
|
245
254
|
|
246
255
|
# This method changes the `CSS media type` through the `media` argument, and/or the `'prefers-colors-scheme'` media
|
@@ -292,8 +301,8 @@ module Playwright
|
|
292
301
|
# ```
|
293
302
|
#
|
294
303
|
# Shortcut for main frame's [`method: Frame.evalOnSelector`].
|
295
|
-
def eval_on_selector(selector, expression, arg: nil)
|
296
|
-
wrap_impl(@impl.eval_on_selector(unwrap_impl(selector), unwrap_impl(expression), arg: unwrap_impl(arg)))
|
304
|
+
def eval_on_selector(selector, expression, arg: nil, strict: nil)
|
305
|
+
wrap_impl(@impl.eval_on_selector(unwrap_impl(selector), unwrap_impl(expression), arg: unwrap_impl(arg), strict: unwrap_impl(strict)))
|
297
306
|
end
|
298
307
|
|
299
308
|
# The method finds all elements matching the specified selector within the page and passes an array of matched elements as
|
@@ -496,16 +505,17 @@ module Playwright
|
|
496
505
|
value,
|
497
506
|
force: nil,
|
498
507
|
noWaitAfter: nil,
|
508
|
+
strict: nil,
|
499
509
|
timeout: nil)
|
500
|
-
wrap_impl(@impl.fill(unwrap_impl(selector), unwrap_impl(value), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
510
|
+
wrap_impl(@impl.fill(unwrap_impl(selector), unwrap_impl(value), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
501
511
|
end
|
502
512
|
|
503
513
|
# This method fetches an element with `selector` and focuses it. If there's no element matching `selector`, the method
|
504
514
|
# waits until a matching element appears in the DOM.
|
505
515
|
#
|
506
516
|
# Shortcut for main frame's [`method: Frame.focus`].
|
507
|
-
def focus(selector, timeout: nil)
|
508
|
-
wrap_impl(@impl.focus(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
517
|
+
def focus(selector, strict: nil, timeout: nil)
|
518
|
+
wrap_impl(@impl.focus(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
509
519
|
end
|
510
520
|
|
511
521
|
# Returns frame matching the specified criteria. Either `name` or `url` must be specified.
|
@@ -527,8 +537,8 @@ module Playwright
|
|
527
537
|
end
|
528
538
|
|
529
539
|
# Returns element attribute value.
|
530
|
-
def get_attribute(selector, name, timeout: nil)
|
531
|
-
wrap_impl(@impl.get_attribute(unwrap_impl(selector), unwrap_impl(name), timeout: unwrap_impl(timeout)))
|
540
|
+
def get_attribute(selector, name, strict: nil, timeout: nil)
|
541
|
+
wrap_impl(@impl.get_attribute(unwrap_impl(selector), unwrap_impl(name), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
532
542
|
end
|
533
543
|
|
534
544
|
# Returns the main resource response. In case of multiple redirects, the navigation will resolve with the response of the
|
@@ -588,29 +598,30 @@ module Playwright
|
|
588
598
|
force: nil,
|
589
599
|
modifiers: nil,
|
590
600
|
position: nil,
|
601
|
+
strict: nil,
|
591
602
|
timeout: nil,
|
592
603
|
trial: nil)
|
593
|
-
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
604
|
+
wrap_impl(@impl.hover(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
594
605
|
end
|
595
606
|
|
596
607
|
# Returns `element.innerHTML`.
|
597
|
-
def inner_html(selector, timeout: nil)
|
598
|
-
wrap_impl(@impl.inner_html(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
608
|
+
def inner_html(selector, strict: nil, timeout: nil)
|
609
|
+
wrap_impl(@impl.inner_html(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
599
610
|
end
|
600
611
|
|
601
612
|
# Returns `element.innerText`.
|
602
|
-
def inner_text(selector, timeout: nil)
|
603
|
-
wrap_impl(@impl.inner_text(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
613
|
+
def inner_text(selector, strict: nil, timeout: nil)
|
614
|
+
wrap_impl(@impl.inner_text(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
604
615
|
end
|
605
616
|
|
606
617
|
# Returns `input.value` for the selected `<input>` or `<textarea>` element. Throws for non-input elements.
|
607
|
-
def input_value(selector, timeout: nil)
|
608
|
-
wrap_impl(@impl.input_value(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
618
|
+
def input_value(selector, strict: nil, timeout: nil)
|
619
|
+
wrap_impl(@impl.input_value(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
609
620
|
end
|
610
621
|
|
611
622
|
# Returns whether the element is checked. Throws if the element is not a checkbox or radio input.
|
612
|
-
def checked?(selector, timeout: nil)
|
613
|
-
wrap_impl(@impl.checked?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
623
|
+
def checked?(selector, strict: nil, timeout: nil)
|
624
|
+
wrap_impl(@impl.checked?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
614
625
|
end
|
615
626
|
|
616
627
|
# Indicates that the page has been closed.
|
@@ -619,30 +630,41 @@ module Playwright
|
|
619
630
|
end
|
620
631
|
|
621
632
|
# Returns whether the element is disabled, the opposite of [enabled](./actionability.md#enabled).
|
622
|
-
def disabled?(selector, timeout: nil)
|
623
|
-
wrap_impl(@impl.disabled?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
633
|
+
def disabled?(selector, strict: nil, timeout: nil)
|
634
|
+
wrap_impl(@impl.disabled?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
624
635
|
end
|
625
636
|
|
626
637
|
# Returns whether the element is [editable](./actionability.md#editable).
|
627
|
-
def editable?(selector, timeout: nil)
|
628
|
-
wrap_impl(@impl.editable?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
638
|
+
def editable?(selector, strict: nil, timeout: nil)
|
639
|
+
wrap_impl(@impl.editable?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
629
640
|
end
|
630
641
|
|
631
642
|
# Returns whether the element is [enabled](./actionability.md#enabled).
|
632
|
-
def enabled?(selector, timeout: nil)
|
633
|
-
wrap_impl(@impl.enabled?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
643
|
+
def enabled?(selector, strict: nil, timeout: nil)
|
644
|
+
wrap_impl(@impl.enabled?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
634
645
|
end
|
635
646
|
|
636
647
|
# Returns whether the element is hidden, the opposite of [visible](./actionability.md#visible). `selector` that does not
|
637
648
|
# match any elements is considered hidden.
|
638
|
-
def hidden?(selector, timeout: nil)
|
639
|
-
wrap_impl(@impl.hidden?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
649
|
+
def hidden?(selector, strict: nil, timeout: nil)
|
650
|
+
wrap_impl(@impl.hidden?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
640
651
|
end
|
641
652
|
|
642
653
|
# Returns whether the element is [visible](./actionability.md#visible). `selector` that does not match any elements is
|
643
654
|
# considered not visible.
|
644
|
-
def visible?(selector, timeout: nil)
|
645
|
-
wrap_impl(@impl.visible?(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
655
|
+
def visible?(selector, strict: nil, timeout: nil)
|
656
|
+
wrap_impl(@impl.visible?(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
657
|
+
end
|
658
|
+
|
659
|
+
# The method returns an element locator that can be used to perform actions on the page. Locator is resolved to the
|
660
|
+
# element immediately before performing an action, so a series of actions on the same locator can in fact be performed on
|
661
|
+
# different DOM elements. That would happen if the DOM structure between those actions has changed.
|
662
|
+
#
|
663
|
+
# Note that locator always implies visibility, so it will always be locating visible elements.
|
664
|
+
#
|
665
|
+
# Shortcut for main frame's [`method: Frame.locator`].
|
666
|
+
def locator(selector)
|
667
|
+
wrap_impl(@impl.locator(unwrap_impl(selector)))
|
646
668
|
end
|
647
669
|
|
648
670
|
# The page's main frame. Page is guaranteed to have a main frame which persists during navigations.
|
@@ -664,7 +686,7 @@ module Playwright
|
|
664
686
|
# > NOTE: This method requires Playwright to be started in a headed mode, with a falsy `headless` value in the
|
665
687
|
# [`method: BrowserType.launch`].
|
666
688
|
def pause
|
667
|
-
|
689
|
+
wrap_impl(@impl.pause)
|
668
690
|
end
|
669
691
|
|
670
692
|
# Returns the PDF buffer.
|
@@ -764,16 +786,17 @@ module Playwright
|
|
764
786
|
key,
|
765
787
|
delay: nil,
|
766
788
|
noWaitAfter: nil,
|
789
|
+
strict: nil,
|
767
790
|
timeout: nil)
|
768
|
-
wrap_impl(@impl.press(unwrap_impl(selector), unwrap_impl(key), delay: unwrap_impl(delay), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
791
|
+
wrap_impl(@impl.press(unwrap_impl(selector), unwrap_impl(key), delay: unwrap_impl(delay), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
769
792
|
end
|
770
793
|
|
771
794
|
# The method finds an element matching the specified selector within the page. If no elements match the selector, the
|
772
795
|
# return value resolves to `null`. To wait for an element on the page, use [`method: Page.waitForSelector`].
|
773
796
|
#
|
774
797
|
# Shortcut for main frame's [`method: Frame.querySelector`].
|
775
|
-
def query_selector(selector)
|
776
|
-
wrap_impl(@impl.query_selector(unwrap_impl(selector)))
|
798
|
+
def query_selector(selector, strict: nil)
|
799
|
+
wrap_impl(@impl.query_selector(unwrap_impl(selector), strict: unwrap_impl(strict)))
|
777
800
|
end
|
778
801
|
|
779
802
|
# The method finds all elements matching the specified selector within the page. If no elements match the selector, the
|
@@ -877,8 +900,9 @@ module Playwright
|
|
877
900
|
label: nil,
|
878
901
|
force: nil,
|
879
902
|
noWaitAfter: nil,
|
903
|
+
strict: nil,
|
880
904
|
timeout: nil)
|
881
|
-
wrap_impl(@impl.select_option(unwrap_impl(selector), element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
905
|
+
wrap_impl(@impl.select_option(unwrap_impl(selector), element: unwrap_impl(element), index: unwrap_impl(index), value: unwrap_impl(value), label: unwrap_impl(label), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
882
906
|
end
|
883
907
|
|
884
908
|
def set_content(html, timeout: nil, waitUntil: nil)
|
@@ -923,8 +947,13 @@ module Playwright
|
|
923
947
|
#
|
924
948
|
# Sets the value of the file input to these file paths or files. If some of the `filePaths` are relative paths, then they
|
925
949
|
# are resolved relative to the the current working directory. For empty array, clears the selected files.
|
926
|
-
def set_input_files(
|
927
|
-
|
950
|
+
def set_input_files(
|
951
|
+
selector,
|
952
|
+
files,
|
953
|
+
noWaitAfter: nil,
|
954
|
+
strict: nil,
|
955
|
+
timeout: nil)
|
956
|
+
wrap_impl(@impl.set_input_files(unwrap_impl(selector), unwrap_impl(files), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
928
957
|
end
|
929
958
|
|
930
959
|
# In the case of multiple pages in a single browser, each page can have its own viewport size. However,
|
@@ -963,14 +992,15 @@ module Playwright
|
|
963
992
|
modifiers: nil,
|
964
993
|
noWaitAfter: nil,
|
965
994
|
position: nil,
|
995
|
+
strict: nil,
|
966
996
|
timeout: nil,
|
967
997
|
trial: nil)
|
968
|
-
wrap_impl(@impl.tap_point(unwrap_impl(selector), force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
998
|
+
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)))
|
969
999
|
end
|
970
1000
|
|
971
1001
|
# Returns `element.textContent`.
|
972
|
-
def text_content(selector, timeout: nil)
|
973
|
-
wrap_impl(@impl.text_content(unwrap_impl(selector), timeout: unwrap_impl(timeout)))
|
1002
|
+
def text_content(selector, strict: nil, timeout: nil)
|
1003
|
+
wrap_impl(@impl.text_content(unwrap_impl(selector), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
974
1004
|
end
|
975
1005
|
|
976
1006
|
# Returns the page's title. Shortcut for main frame's [`method: Frame.title`].
|
@@ -994,8 +1024,9 @@ module Playwright
|
|
994
1024
|
text,
|
995
1025
|
delay: nil,
|
996
1026
|
noWaitAfter: nil,
|
1027
|
+
strict: nil,
|
997
1028
|
timeout: nil)
|
998
|
-
wrap_impl(@impl.type(unwrap_impl(selector), unwrap_impl(text), delay: unwrap_impl(delay), noWaitAfter: unwrap_impl(noWaitAfter), timeout: unwrap_impl(timeout)))
|
1029
|
+
wrap_impl(@impl.type(unwrap_impl(selector), unwrap_impl(text), delay: unwrap_impl(delay), noWaitAfter: unwrap_impl(noWaitAfter), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
999
1030
|
end
|
1000
1031
|
|
1001
1032
|
# This method unchecks an element matching `selector` by performing the following steps:
|
@@ -1018,9 +1049,10 @@ module Playwright
|
|
1018
1049
|
force: nil,
|
1019
1050
|
noWaitAfter: nil,
|
1020
1051
|
position: nil,
|
1052
|
+
strict: nil,
|
1021
1053
|
timeout: nil,
|
1022
1054
|
trial: nil)
|
1023
|
-
wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
1055
|
+
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)))
|
1024
1056
|
end
|
1025
1057
|
|
1026
1058
|
# Removes a route created with [`method: Page.route`]. When `handler` is not specified, removes all routes for the `url`.
|
@@ -1226,8 +1258,8 @@ module Playwright
|
|
1226
1258
|
# with sync_playwright() as playwright:
|
1227
1259
|
# run(playwright)
|
1228
1260
|
# ```
|
1229
|
-
def wait_for_selector(selector, state: nil, timeout: nil)
|
1230
|
-
wrap_impl(@impl.wait_for_selector(unwrap_impl(selector), state: unwrap_impl(state), timeout: unwrap_impl(timeout)))
|
1261
|
+
def wait_for_selector(selector, state: nil, strict: nil, timeout: nil)
|
1262
|
+
wrap_impl(@impl.wait_for_selector(unwrap_impl(selector), state: unwrap_impl(state), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
1231
1263
|
end
|
1232
1264
|
|
1233
1265
|
# Waits for the given `timeout` in milliseconds.
|
@@ -1318,12 +1350,6 @@ module Playwright
|
|
1318
1350
|
wrap_impl(@impl.guid)
|
1319
1351
|
end
|
1320
1352
|
|
1321
|
-
# -- inherited from EventEmitter --
|
1322
|
-
# @nodoc
|
1323
|
-
def off(event, callback)
|
1324
|
-
event_emitter_proxy.off(event, callback)
|
1325
|
-
end
|
1326
|
-
|
1327
1353
|
# -- inherited from EventEmitter --
|
1328
1354
|
# @nodoc
|
1329
1355
|
def once(event, callback)
|
@@ -1336,6 +1362,12 @@ module Playwright
|
|
1336
1362
|
event_emitter_proxy.on(event, callback)
|
1337
1363
|
end
|
1338
1364
|
|
1365
|
+
# -- inherited from EventEmitter --
|
1366
|
+
# @nodoc
|
1367
|
+
def off(event, callback)
|
1368
|
+
event_emitter_proxy.off(event, callback)
|
1369
|
+
end
|
1370
|
+
|
1339
1371
|
private def event_emitter_proxy
|
1340
1372
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
1341
1373
|
end
|
@@ -91,12 +91,6 @@ module Playwright
|
|
91
91
|
wrap_impl(@impl.electron)
|
92
92
|
end
|
93
93
|
|
94
|
-
# -- inherited from EventEmitter --
|
95
|
-
# @nodoc
|
96
|
-
def off(event, callback)
|
97
|
-
event_emitter_proxy.off(event, callback)
|
98
|
-
end
|
99
|
-
|
100
94
|
# -- inherited from EventEmitter --
|
101
95
|
# @nodoc
|
102
96
|
def once(event, callback)
|
@@ -109,6 +103,12 @@ module Playwright
|
|
109
103
|
event_emitter_proxy.on(event, callback)
|
110
104
|
end
|
111
105
|
|
106
|
+
# -- inherited from EventEmitter --
|
107
|
+
# @nodoc
|
108
|
+
def off(event, callback)
|
109
|
+
event_emitter_proxy.off(event, callback)
|
110
|
+
end
|
111
|
+
|
112
112
|
private def event_emitter_proxy
|
113
113
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
114
114
|
end
|
@@ -128,12 +128,6 @@ module Playwright
|
|
128
128
|
wrap_impl(@impl.url)
|
129
129
|
end
|
130
130
|
|
131
|
-
# -- inherited from EventEmitter --
|
132
|
-
# @nodoc
|
133
|
-
def off(event, callback)
|
134
|
-
event_emitter_proxy.off(event, callback)
|
135
|
-
end
|
136
|
-
|
137
131
|
# -- inherited from EventEmitter --
|
138
132
|
# @nodoc
|
139
133
|
def once(event, callback)
|
@@ -146,6 +140,12 @@ module Playwright
|
|
146
140
|
event_emitter_proxy.on(event, callback)
|
147
141
|
end
|
148
142
|
|
143
|
+
# -- inherited from EventEmitter --
|
144
|
+
# @nodoc
|
145
|
+
def off(event, callback)
|
146
|
+
event_emitter_proxy.off(event, callback)
|
147
|
+
end
|
148
|
+
|
149
149
|
private def event_emitter_proxy
|
150
150
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
151
151
|
end
|
@@ -74,12 +74,6 @@ module Playwright
|
|
74
74
|
wrap_impl(@impl.ok?)
|
75
75
|
end
|
76
76
|
|
77
|
-
# -- inherited from EventEmitter --
|
78
|
-
# @nodoc
|
79
|
-
def off(event, callback)
|
80
|
-
event_emitter_proxy.off(event, callback)
|
81
|
-
end
|
82
|
-
|
83
77
|
# -- inherited from EventEmitter --
|
84
78
|
# @nodoc
|
85
79
|
def once(event, callback)
|
@@ -92,6 +86,12 @@ module Playwright
|
|
92
86
|
event_emitter_proxy.on(event, callback)
|
93
87
|
end
|
94
88
|
|
89
|
+
# -- inherited from EventEmitter --
|
90
|
+
# @nodoc
|
91
|
+
def off(event, callback)
|
92
|
+
event_emitter_proxy.off(event, callback)
|
93
|
+
end
|
94
|
+
|
95
95
|
private def event_emitter_proxy
|
96
96
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
97
97
|
end
|
data/lib/playwright_api/route.rb
CHANGED
@@ -56,12 +56,6 @@ module Playwright
|
|
56
56
|
wrap_impl(@impl.request)
|
57
57
|
end
|
58
58
|
|
59
|
-
# -- inherited from EventEmitter --
|
60
|
-
# @nodoc
|
61
|
-
def off(event, callback)
|
62
|
-
event_emitter_proxy.off(event, callback)
|
63
|
-
end
|
64
|
-
|
65
59
|
# -- inherited from EventEmitter --
|
66
60
|
# @nodoc
|
67
61
|
def once(event, callback)
|
@@ -74,6 +68,12 @@ module Playwright
|
|
74
68
|
event_emitter_proxy.on(event, callback)
|
75
69
|
end
|
76
70
|
|
71
|
+
# -- inherited from EventEmitter --
|
72
|
+
# @nodoc
|
73
|
+
def off(event, callback)
|
74
|
+
event_emitter_proxy.off(event, callback)
|
75
|
+
end
|
76
|
+
|
77
77
|
private def event_emitter_proxy
|
78
78
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
79
79
|
end
|
@@ -12,12 +12,6 @@ module Playwright
|
|
12
12
|
wrap_impl(@impl.register(unwrap_impl(name), contentScript: unwrap_impl(contentScript), path: unwrap_impl(path), script: unwrap_impl(script)))
|
13
13
|
end
|
14
14
|
|
15
|
-
# -- inherited from EventEmitter --
|
16
|
-
# @nodoc
|
17
|
-
def off(event, callback)
|
18
|
-
event_emitter_proxy.off(event, callback)
|
19
|
-
end
|
20
|
-
|
21
15
|
# -- inherited from EventEmitter --
|
22
16
|
# @nodoc
|
23
17
|
def once(event, callback)
|
@@ -30,6 +24,12 @@ module Playwright
|
|
30
24
|
event_emitter_proxy.on(event, callback)
|
31
25
|
end
|
32
26
|
|
27
|
+
# -- inherited from EventEmitter --
|
28
|
+
# @nodoc
|
29
|
+
def off(event, callback)
|
30
|
+
event_emitter_proxy.off(event, callback)
|
31
|
+
end
|
32
|
+
|
33
33
|
private def event_emitter_proxy
|
34
34
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
35
35
|
end
|