playwright-ruby-client 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/docs/api_coverage.md +4 -4
- data/lib/playwright/channel_owners/page.rb +16 -0
- data/lib/playwright/version.rb +1 -1
- data/lib/playwright_api/page.rb +8 -8
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 140f77362280a6874d89ed73fde1e80fa47e2b83f075b6207835f02ab62cb97f
|
4
|
+
data.tar.gz: e715b39c620668eeea1a0dbb022865f759d02f59d2f3d23948c7c20536ca0136
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0315d44031788794eca7f506ba9a20a81dbb6bf77c15efda873a1efc3e25074d46e1629ae07551f2dd8368f8a7609568cd719fd1470fdd3bf2717373168655a2
|
7
|
+
data.tar.gz: a3b6a02b60059ac3ef14c0ca1222e3b88a3aaee588b8510c49ef748fab5f27c354417b1e38cc6adfe98e6b1f38805ed1c0cead8cfb465f4968e449c98dd5a9a5
|
data/docs/api_coverage.md
CHANGED
@@ -285,11 +285,11 @@
|
|
285
285
|
* wait_for_selector
|
286
286
|
* ~~wait_for_timeout~~
|
287
287
|
* ~~workers~~
|
288
|
-
*
|
289
|
-
*
|
288
|
+
* expect_download
|
289
|
+
* expect_popup
|
290
290
|
* ~~expect_worker~~
|
291
|
-
*
|
292
|
-
*
|
291
|
+
* expect_console_message
|
292
|
+
* expect_file_chooser
|
293
293
|
* ~~wait_for_event~~
|
294
294
|
* accessibility
|
295
295
|
* keyboard
|
@@ -634,6 +634,18 @@ module Playwright
|
|
634
634
|
wait_helper.promise.value!
|
635
635
|
end
|
636
636
|
|
637
|
+
def expect_console_message(predicate: nil, timeout: nil, &block)
|
638
|
+
expect_event(Events::Page::Console, predicate: predicate, timeout: timeout, &block)
|
639
|
+
end
|
640
|
+
|
641
|
+
def expect_download(predicate: nil, timeout: nil, &block)
|
642
|
+
expect_event(Events::Page::Download, predicate: predicate, timeout: timeout, &block)
|
643
|
+
end
|
644
|
+
|
645
|
+
def expect_file_chooser(predicate: nil, timeout: nil, &block)
|
646
|
+
expect_event(Events::Page::FileChooser, predicate: predicate, timeout: timeout, &block)
|
647
|
+
end
|
648
|
+
|
637
649
|
def expect_navigation(timeout: nil, url: nil, waitUntil: nil, &block)
|
638
650
|
@main_frame.expect_navigation(
|
639
651
|
timeout: timeout,
|
@@ -642,6 +654,10 @@ module Playwright
|
|
642
654
|
&block)
|
643
655
|
end
|
644
656
|
|
657
|
+
def expect_popup(predicate: nil, timeout: nil, &block)
|
658
|
+
expect_event(Events::Page::Popup, predicate: predicate, timeout: timeout, &block)
|
659
|
+
end
|
660
|
+
|
645
661
|
def expect_request(urlOrPredicate, timeout: nil)
|
646
662
|
predicate =
|
647
663
|
case urlOrPredicate
|
data/lib/playwright/version.rb
CHANGED
data/lib/playwright_api/page.rb
CHANGED
@@ -1837,15 +1837,15 @@ module Playwright
|
|
1837
1837
|
# Performs action and waits for `download` event to fire. If predicate is provided, it passes `Download` value into the
|
1838
1838
|
# `predicate` function and waits for `predicate(event)` to return a truthy value. Will throw an error if the page is
|
1839
1839
|
# closed before the download event is fired.
|
1840
|
-
def expect_download(predicate: nil, timeout: nil)
|
1841
|
-
|
1840
|
+
def expect_download(predicate: nil, timeout: nil, &block)
|
1841
|
+
wrap_impl(@impl.expect_download(predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
1842
1842
|
end
|
1843
1843
|
|
1844
1844
|
# Performs action and waits for `popup` event to fire. If predicate is provided, it passes [Popup] value into the
|
1845
1845
|
# `predicate` function and waits for `predicate(event)` to return a truthy value. Will throw an error if the page is
|
1846
1846
|
# closed before the popup event is fired.
|
1847
|
-
def expect_popup(predicate: nil, timeout: nil)
|
1848
|
-
|
1847
|
+
def expect_popup(predicate: nil, timeout: nil, &block)
|
1848
|
+
wrap_impl(@impl.expect_popup(predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
1849
1849
|
end
|
1850
1850
|
|
1851
1851
|
# Performs action and waits for `worker` event to fire. If predicate is provided, it passes `Worker` value into the
|
@@ -1858,15 +1858,15 @@ module Playwright
|
|
1858
1858
|
# Performs action and waits for `console` event to fire. If predicate is provided, it passes `ConsoleMessage` value into
|
1859
1859
|
# the `predicate` function and waits for `predicate(event)` to return a truthy value. Will throw an error if the page is
|
1860
1860
|
# closed before the worker event is fired.
|
1861
|
-
def expect_console_message(predicate: nil, timeout: nil)
|
1862
|
-
|
1861
|
+
def expect_console_message(predicate: nil, timeout: nil, &block)
|
1862
|
+
wrap_impl(@impl.expect_console_message(predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
1863
1863
|
end
|
1864
1864
|
|
1865
1865
|
# Performs action and waits for `filechooser` event to fire. If predicate is provided, it passes `FileChooser` value into
|
1866
1866
|
# the `predicate` function and waits for `predicate(event)` to return a truthy value. Will throw an error if the page is
|
1867
1867
|
# closed before the worker event is fired.
|
1868
|
-
def expect_file_chooser(predicate: nil, timeout: nil)
|
1869
|
-
|
1868
|
+
def expect_file_chooser(predicate: nil, timeout: nil, &block)
|
1869
|
+
wrap_impl(@impl.expect_file_chooser(predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
1870
1870
|
end
|
1871
1871
|
|
1872
1872
|
# > NOTE: In most cases, you should use [`method: Page.waitForEvent`].
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: playwright-ruby-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-02-
|
11
|
+
date: 2021-02-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|