playwright-ruby-client 0.6.1 → 0.6.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/documentation/docs/api/browser.md +4 -1
- data/documentation/docs/api/browser_context.md +3 -4
- data/documentation/docs/api/browser_type.md +54 -1
- data/documentation/docs/api/dialog.md +15 -18
- data/documentation/docs/api/element_handle.md +28 -50
- data/documentation/docs/api/experimental/android.md +3 -2
- data/documentation/docs/api/experimental/android_device.md +1 -0
- data/documentation/docs/api/file_chooser.md +4 -5
- data/documentation/docs/api/frame.md +3 -4
- data/documentation/docs/api/js_handle.md +11 -14
- data/documentation/docs/api/page.md +163 -230
- data/documentation/docs/api/route.md +20 -21
- data/documentation/docs/api/tracing.md +8 -15
- data/documentation/docs/api/web_socket.md +1 -1
- data/documentation/docs/api/worker.md +18 -1
- data/documentation/docs/article/guides/rails_integration.md +156 -2
- data/documentation/docs/article/guides/recording_video.md +79 -0
- data/documentation/docs/include/api_coverage.md +5 -4
- data/documentation/package.json +1 -1
- data/documentation/yarn.lock +478 -498
- data/lib/playwright/channel_owners/binding_call.rb +1 -1
- data/lib/playwright/channel_owners/browser.rb +15 -27
- data/lib/playwright/channel_owners/browser_context.rb +13 -5
- data/lib/playwright/channel_owners/browser_type.rb +23 -8
- data/lib/playwright/channel_owners/page.rb +8 -7
- data/lib/playwright/channel_owners/web_socket.rb +4 -0
- data/lib/playwright/channel_owners/worker.rb +4 -0
- data/lib/playwright/playwright_api.rb +16 -1
- data/lib/playwright/tracing_impl.rb +9 -9
- data/lib/playwright/version.rb +1 -1
- data/lib/playwright_api/android.rb +9 -8
- data/lib/playwright_api/android_device.rb +8 -7
- data/lib/playwright_api/browser.rb +12 -9
- data/lib/playwright_api/browser_context.rb +13 -14
- data/lib/playwright_api/browser_type.rb +13 -11
- data/lib/playwright_api/console_message.rb +6 -6
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/element_handle.rb +6 -6
- data/lib/playwright_api/frame.rb +6 -6
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/page.rb +38 -24
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +6 -6
- data/lib/playwright_api/response.rb +8 -8
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/selectors.rb +6 -6
- data/lib/playwright_api/tracing.rb +6 -12
- data/lib/playwright_api/web_socket.rb +22 -0
- data/lib/playwright_api/worker.rb +22 -0
- metadata +5 -2
@@ -59,14 +59,20 @@ module Playwright
|
|
59
59
|
wrap_impl(@impl.url)
|
60
60
|
end
|
61
61
|
|
62
|
+
# @nodoc
|
63
|
+
def after_initialize
|
64
|
+
wrap_impl(@impl.after_initialize)
|
65
|
+
end
|
66
|
+
|
62
67
|
# @nodoc
|
63
68
|
def ok?
|
64
69
|
wrap_impl(@impl.ok?)
|
65
70
|
end
|
66
71
|
|
72
|
+
# -- inherited from EventEmitter --
|
67
73
|
# @nodoc
|
68
|
-
def
|
69
|
-
|
74
|
+
def once(event, callback)
|
75
|
+
event_emitter_proxy.once(event, callback)
|
70
76
|
end
|
71
77
|
|
72
78
|
# -- inherited from EventEmitter --
|
@@ -81,12 +87,6 @@ module Playwright
|
|
81
87
|
event_emitter_proxy.off(event, callback)
|
82
88
|
end
|
83
89
|
|
84
|
-
# -- inherited from EventEmitter --
|
85
|
-
# @nodoc
|
86
|
-
def once(event, callback)
|
87
|
-
event_emitter_proxy.once(event, callback)
|
88
|
-
end
|
89
|
-
|
90
90
|
private def event_emitter_proxy
|
91
91
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
92
92
|
end
|
data/lib/playwright_api/route.rb
CHANGED
@@ -58,20 +58,20 @@ module Playwright
|
|
58
58
|
|
59
59
|
# -- inherited from EventEmitter --
|
60
60
|
# @nodoc
|
61
|
-
def
|
62
|
-
event_emitter_proxy.
|
61
|
+
def once(event, callback)
|
62
|
+
event_emitter_proxy.once(event, callback)
|
63
63
|
end
|
64
64
|
|
65
65
|
# -- inherited from EventEmitter --
|
66
66
|
# @nodoc
|
67
|
-
def
|
68
|
-
event_emitter_proxy.
|
67
|
+
def on(event, callback)
|
68
|
+
event_emitter_proxy.on(event, callback)
|
69
69
|
end
|
70
70
|
|
71
71
|
# -- inherited from EventEmitter --
|
72
72
|
# @nodoc
|
73
|
-
def
|
74
|
-
event_emitter_proxy.
|
73
|
+
def off(event, callback)
|
74
|
+
event_emitter_proxy.off(event, callback)
|
75
75
|
end
|
76
76
|
|
77
77
|
private def event_emitter_proxy
|
@@ -14,20 +14,20 @@ module Playwright
|
|
14
14
|
|
15
15
|
# -- inherited from EventEmitter --
|
16
16
|
# @nodoc
|
17
|
-
def
|
18
|
-
event_emitter_proxy.
|
17
|
+
def once(event, callback)
|
18
|
+
event_emitter_proxy.once(event, callback)
|
19
19
|
end
|
20
20
|
|
21
21
|
# -- inherited from EventEmitter --
|
22
22
|
# @nodoc
|
23
|
-
def
|
24
|
-
event_emitter_proxy.
|
23
|
+
def on(event, callback)
|
24
|
+
event_emitter_proxy.on(event, callback)
|
25
25
|
end
|
26
26
|
|
27
27
|
# -- inherited from EventEmitter --
|
28
28
|
# @nodoc
|
29
|
-
def
|
30
|
-
event_emitter_proxy.
|
29
|
+
def off(event, callback)
|
30
|
+
event_emitter_proxy.off(event, callback)
|
31
31
|
end
|
32
32
|
|
33
33
|
private def event_emitter_proxy
|
@@ -5,35 +5,29 @@ module Playwright
|
|
5
5
|
# Start with specifying the folder traces will be stored in:
|
6
6
|
#
|
7
7
|
# ```python sync
|
8
|
-
# browser = chromium.launch(
|
8
|
+
# browser = chromium.launch()
|
9
9
|
# context = browser.new_context()
|
10
|
-
# context.tracing.start(
|
10
|
+
# context.tracing.start(screenshots=True, snapshots=True)
|
11
11
|
# page.goto("https://playwright.dev")
|
12
|
-
# context.tracing.stop()
|
13
|
-
# context.tracing.export("trace.zip")
|
12
|
+
# context.tracing.stop(path = "trace.zip")
|
14
13
|
# ```
|
15
14
|
class Tracing < PlaywrightApi
|
16
15
|
|
17
|
-
# Export trace into the file with the given name. Should be called after the tracing has stopped.
|
18
|
-
def export(path)
|
19
|
-
wrap_impl(@impl.export(unwrap_impl(path)))
|
20
|
-
end
|
21
|
-
|
22
16
|
# Start tracing.
|
23
17
|
#
|
24
18
|
# ```python sync
|
25
19
|
# context.tracing.start(name="trace", screenshots=True, snapshots=True)
|
26
20
|
# page.goto("https://playwright.dev")
|
27
21
|
# context.tracing.stop()
|
28
|
-
# context.tracing.
|
22
|
+
# context.tracing.stop(path = "trace.zip")
|
29
23
|
# ```
|
30
24
|
def start(name: nil, screenshots: nil, snapshots: nil)
|
31
25
|
wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots)))
|
32
26
|
end
|
33
27
|
|
34
28
|
# Stop tracing.
|
35
|
-
def stop
|
36
|
-
wrap_impl(@impl.stop)
|
29
|
+
def stop(path: nil)
|
30
|
+
wrap_impl(@impl.stop(path: unwrap_impl(path)))
|
37
31
|
end
|
38
32
|
end
|
39
33
|
end
|
@@ -26,5 +26,27 @@ module Playwright
|
|
26
26
|
def wait_for_event(event, predicate: nil, timeout: nil)
|
27
27
|
raise NotImplementedError.new('wait_for_event is not implemented yet.')
|
28
28
|
end
|
29
|
+
|
30
|
+
# -- inherited from EventEmitter --
|
31
|
+
# @nodoc
|
32
|
+
def once(event, callback)
|
33
|
+
event_emitter_proxy.once(event, callback)
|
34
|
+
end
|
35
|
+
|
36
|
+
# -- inherited from EventEmitter --
|
37
|
+
# @nodoc
|
38
|
+
def on(event, callback)
|
39
|
+
event_emitter_proxy.on(event, callback)
|
40
|
+
end
|
41
|
+
|
42
|
+
# -- inherited from EventEmitter --
|
43
|
+
# @nodoc
|
44
|
+
def off(event, callback)
|
45
|
+
event_emitter_proxy.off(event, callback)
|
46
|
+
end
|
47
|
+
|
48
|
+
private def event_emitter_proxy
|
49
|
+
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
50
|
+
end
|
29
51
|
end
|
30
52
|
end
|
@@ -42,5 +42,27 @@ module Playwright
|
|
42
42
|
def url
|
43
43
|
raise NotImplementedError.new('url is not implemented yet.')
|
44
44
|
end
|
45
|
+
|
46
|
+
# -- inherited from EventEmitter --
|
47
|
+
# @nodoc
|
48
|
+
def once(event, callback)
|
49
|
+
event_emitter_proxy.once(event, callback)
|
50
|
+
end
|
51
|
+
|
52
|
+
# -- inherited from EventEmitter --
|
53
|
+
# @nodoc
|
54
|
+
def on(event, callback)
|
55
|
+
event_emitter_proxy.on(event, callback)
|
56
|
+
end
|
57
|
+
|
58
|
+
# -- inherited from EventEmitter --
|
59
|
+
# @nodoc
|
60
|
+
def off(event, callback)
|
61
|
+
event_emitter_proxy.off(event, callback)
|
62
|
+
end
|
63
|
+
|
64
|
+
private def event_emitter_proxy
|
65
|
+
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
66
|
+
end
|
45
67
|
end
|
46
68
|
end
|
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.6.
|
4
|
+
version: 0.6.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-06-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -230,6 +230,7 @@ files:
|
|
230
230
|
- documentation/docs/article/guides/download_playwright_driver.md
|
231
231
|
- documentation/docs/article/guides/launch_browser.md
|
232
232
|
- documentation/docs/article/guides/rails_integration.md
|
233
|
+
- documentation/docs/article/guides/recording_video.md
|
233
234
|
- documentation/docs/include/api_coverage.md
|
234
235
|
- documentation/docusaurus.config.js
|
235
236
|
- documentation/package.json
|
@@ -271,6 +272,8 @@ files:
|
|
271
272
|
- lib/playwright/channel_owners/route.rb
|
272
273
|
- lib/playwright/channel_owners/selectors.rb
|
273
274
|
- lib/playwright/channel_owners/stream.rb
|
275
|
+
- lib/playwright/channel_owners/web_socket.rb
|
276
|
+
- lib/playwright/channel_owners/worker.rb
|
274
277
|
- lib/playwright/connection.rb
|
275
278
|
- lib/playwright/download.rb
|
276
279
|
- lib/playwright/errors.rb
|