playwright-ruby-client 1.26.0 → 1.28.0
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/api_request_context.md +86 -0
- data/documentation/docs/api/browser_context.md +3 -3
- data/documentation/docs/api/download.md +1 -1
- data/documentation/docs/api/element_handle.md +2 -1
- data/documentation/docs/api/file_chooser.md +1 -1
- data/documentation/docs/api/frame.md +151 -4
- data/documentation/docs/api/frame_locator.md +151 -4
- data/documentation/docs/api/js_handle.md +5 -3
- data/documentation/docs/api/keyboard.md +1 -1
- data/documentation/docs/api/locator.md +191 -6
- data/documentation/docs/api/page.md +166 -9
- data/documentation/docs/api/request.md +1 -1
- data/documentation/docs/api/tracing.md +1 -1
- data/documentation/docs/article/guides/rails_integration.md +1 -0
- data/documentation/docs/article/guides/rails_integration_with_null_driver.md +59 -0
- data/documentation/docs/include/api_coverage.md +32 -0
- data/lib/playwright/channel_owner.rb +41 -0
- data/lib/playwright/channel_owners/browser_context.rb +6 -0
- data/lib/playwright/channel_owners/element_handle.rb +8 -1
- data/lib/playwright/channel_owners/frame.rb +6 -0
- data/lib/playwright/channel_owners/page.rb +25 -28
- data/lib/playwright/channel_owners/selectors.rb +4 -0
- data/lib/playwright/connection.rb +4 -1
- data/lib/playwright/frame_locator_impl.rb +6 -2
- data/lib/playwright/locator_impl.rb +21 -31
- data/lib/playwright/locator_utils.rb +136 -0
- data/lib/playwright/utils.rb +6 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android.rb +12 -6
- data/lib/playwright_api/android_device.rb +6 -6
- data/lib/playwright_api/api_request_context.rb +86 -8
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +9 -9
- 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 +1 -1
- data/lib/playwright_api/element_handle.rb +9 -8
- data/lib/playwright_api/file_chooser.rb +1 -1
- data/lib/playwright_api/frame.rb +119 -11
- data/lib/playwright_api/frame_locator.rb +113 -5
- data/lib/playwright_api/js_handle.rb +7 -7
- data/lib/playwright_api/keyboard.rb +1 -1
- data/lib/playwright_api/locator.rb +145 -6
- data/lib/playwright_api/page.rb +133 -16
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +9 -9
- data/lib/playwright_api/response.rb +8 -8
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/selectors.rb +14 -3
- data/lib/playwright_api/tracing.rb +7 -7
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +8 -8
- metadata +5 -4
@@ -10,7 +10,7 @@ module Playwright
|
|
10
10
|
# > NOTE: HTTP Error responses, such as 404 or 503, are still successful responses from HTTP standpoint, so request will
|
11
11
|
# complete with `'requestfinished'` event.
|
12
12
|
#
|
13
|
-
# If request gets a 'redirect' response, the request is successfully finished with the
|
13
|
+
# If request gets a 'redirect' response, the request is successfully finished with the `requestfinished` event, and a new
|
14
14
|
# request is issued to a redirected url.
|
15
15
|
class Request < PlaywrightApi
|
16
16
|
|
@@ -151,20 +151,14 @@ module Playwright
|
|
151
151
|
wrap_impl(@impl.url)
|
152
152
|
end
|
153
153
|
|
154
|
-
# @nodoc
|
155
|
-
def apply_fallback_overrides(overrides)
|
156
|
-
wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
|
157
|
-
end
|
158
|
-
|
159
154
|
# @nodoc
|
160
155
|
def header_values(name)
|
161
156
|
wrap_impl(@impl.header_values(unwrap_impl(name)))
|
162
157
|
end
|
163
158
|
|
164
|
-
# -- inherited from EventEmitter --
|
165
159
|
# @nodoc
|
166
|
-
def
|
167
|
-
|
160
|
+
def apply_fallback_overrides(overrides)
|
161
|
+
wrap_impl(@impl.apply_fallback_overrides(unwrap_impl(overrides)))
|
168
162
|
end
|
169
163
|
|
170
164
|
# -- inherited from EventEmitter --
|
@@ -179,6 +173,12 @@ module Playwright
|
|
179
173
|
event_emitter_proxy.on(event, callback)
|
180
174
|
end
|
181
175
|
|
176
|
+
# -- inherited from EventEmitter --
|
177
|
+
# @nodoc
|
178
|
+
def off(event, callback)
|
179
|
+
event_emitter_proxy.off(event, callback)
|
180
|
+
end
|
181
|
+
|
182
182
|
private def event_emitter_proxy
|
183
183
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
184
184
|
end
|
@@ -100,20 +100,14 @@ module Playwright
|
|
100
100
|
wrap_impl(@impl.url)
|
101
101
|
end
|
102
102
|
|
103
|
-
# @nodoc
|
104
|
-
def from_service_worker?
|
105
|
-
wrap_impl(@impl.from_service_worker?)
|
106
|
-
end
|
107
|
-
|
108
103
|
# @nodoc
|
109
104
|
def ok?
|
110
105
|
wrap_impl(@impl.ok?)
|
111
106
|
end
|
112
107
|
|
113
|
-
# -- inherited from EventEmitter --
|
114
108
|
# @nodoc
|
115
|
-
def
|
116
|
-
|
109
|
+
def from_service_worker?
|
110
|
+
wrap_impl(@impl.from_service_worker?)
|
117
111
|
end
|
118
112
|
|
119
113
|
# -- inherited from EventEmitter --
|
@@ -128,6 +122,12 @@ module Playwright
|
|
128
122
|
event_emitter_proxy.on(event, callback)
|
129
123
|
end
|
130
124
|
|
125
|
+
# -- inherited from EventEmitter --
|
126
|
+
# @nodoc
|
127
|
+
def off(event, callback)
|
128
|
+
event_emitter_proxy.off(event, callback)
|
129
|
+
end
|
130
|
+
|
131
131
|
private def event_emitter_proxy
|
132
132
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
133
133
|
end
|
data/lib/playwright_api/route.rb
CHANGED
@@ -118,12 +118,6 @@ module Playwright
|
|
118
118
|
wrap_impl(@impl.redirect_navigation_request(unwrap_impl(url)))
|
119
119
|
end
|
120
120
|
|
121
|
-
# -- inherited from EventEmitter --
|
122
|
-
# @nodoc
|
123
|
-
def off(event, callback)
|
124
|
-
event_emitter_proxy.off(event, callback)
|
125
|
-
end
|
126
|
-
|
127
121
|
# -- inherited from EventEmitter --
|
128
122
|
# @nodoc
|
129
123
|
def once(event, callback)
|
@@ -136,6 +130,12 @@ module Playwright
|
|
136
130
|
event_emitter_proxy.on(event, callback)
|
137
131
|
end
|
138
132
|
|
133
|
+
# -- inherited from EventEmitter --
|
134
|
+
# @nodoc
|
135
|
+
def off(event, callback)
|
136
|
+
event_emitter_proxy.off(event, callback)
|
137
|
+
end
|
138
|
+
|
139
139
|
private def event_emitter_proxy
|
140
140
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
141
141
|
end
|
@@ -43,10 +43,15 @@ module Playwright
|
|
43
43
|
wrap_impl(@impl.register(unwrap_impl(name), contentScript: unwrap_impl(contentScript), path: unwrap_impl(path), script: unwrap_impl(script)))
|
44
44
|
end
|
45
45
|
|
46
|
-
#
|
46
|
+
# Defines custom attribute name to be used in [`method: Page.getByTestId`]. `data-testid` is used by default.
|
47
|
+
def set_test_id_attribute(attributeName)
|
48
|
+
raise NotImplementedError.new('set_test_id_attribute is not implemented yet.')
|
49
|
+
end
|
50
|
+
alias_method :test_id_attribute=, :set_test_id_attribute
|
51
|
+
|
47
52
|
# @nodoc
|
48
|
-
def
|
49
|
-
|
53
|
+
def text_id_attribute=(attribute_name)
|
54
|
+
wrap_impl(@impl.text_id_attribute=(unwrap_impl(attribute_name)))
|
50
55
|
end
|
51
56
|
|
52
57
|
# -- inherited from EventEmitter --
|
@@ -61,6 +66,12 @@ module Playwright
|
|
61
66
|
event_emitter_proxy.on(event, callback)
|
62
67
|
end
|
63
68
|
|
69
|
+
# -- inherited from EventEmitter --
|
70
|
+
# @nodoc
|
71
|
+
def off(event, callback)
|
72
|
+
event_emitter_proxy.off(event, callback)
|
73
|
+
end
|
74
|
+
|
64
75
|
private def event_emitter_proxy
|
65
76
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
66
77
|
end
|
@@ -41,7 +41,7 @@ module Playwright
|
|
41
41
|
# page.goto("https://playwright.dev")
|
42
42
|
#
|
43
43
|
# context.tracing.start_chunk()
|
44
|
-
# page.
|
44
|
+
# page.get_by_text("Get Started").click()
|
45
45
|
# # Everything between start_chunk and stop_chunk will be recorded in the trace.
|
46
46
|
# context.tracing.stop_chunk(path = "trace1.zip")
|
47
47
|
#
|
@@ -64,12 +64,6 @@ module Playwright
|
|
64
64
|
wrap_impl(@impl.stop_chunk(path: unwrap_impl(path)))
|
65
65
|
end
|
66
66
|
|
67
|
-
# -- inherited from EventEmitter --
|
68
|
-
# @nodoc
|
69
|
-
def off(event, callback)
|
70
|
-
event_emitter_proxy.off(event, callback)
|
71
|
-
end
|
72
|
-
|
73
67
|
# -- inherited from EventEmitter --
|
74
68
|
# @nodoc
|
75
69
|
def once(event, callback)
|
@@ -82,6 +76,12 @@ module Playwright
|
|
82
76
|
event_emitter_proxy.on(event, callback)
|
83
77
|
end
|
84
78
|
|
79
|
+
# -- inherited from EventEmitter --
|
80
|
+
# @nodoc
|
81
|
+
def off(event, callback)
|
82
|
+
event_emitter_proxy.off(event, callback)
|
83
|
+
end
|
84
|
+
|
85
85
|
private def event_emitter_proxy
|
86
86
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
87
87
|
end
|
@@ -27,12 +27,6 @@ module Playwright
|
|
27
27
|
wrap_impl(@impl.wait_for_event(unwrap_impl(event), predicate: unwrap_impl(predicate), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
|
28
28
|
end
|
29
29
|
|
30
|
-
# -- inherited from EventEmitter --
|
31
|
-
# @nodoc
|
32
|
-
def off(event, callback)
|
33
|
-
event_emitter_proxy.off(event, callback)
|
34
|
-
end
|
35
|
-
|
36
30
|
# -- inherited from EventEmitter --
|
37
31
|
# @nodoc
|
38
32
|
def once(event, callback)
|
@@ -45,6 +39,12 @@ module Playwright
|
|
45
39
|
event_emitter_proxy.on(event, callback)
|
46
40
|
end
|
47
41
|
|
42
|
+
# -- inherited from EventEmitter --
|
43
|
+
# @nodoc
|
44
|
+
def off(event, callback)
|
45
|
+
event_emitter_proxy.off(event, callback)
|
46
|
+
end
|
47
|
+
|
48
48
|
private def event_emitter_proxy
|
49
49
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
50
50
|
end
|
@@ -43,20 +43,14 @@ module Playwright
|
|
43
43
|
wrap_impl(@impl.url)
|
44
44
|
end
|
45
45
|
|
46
|
-
# @nodoc
|
47
|
-
def page=(req)
|
48
|
-
wrap_impl(@impl.page=(unwrap_impl(req)))
|
49
|
-
end
|
50
|
-
|
51
46
|
# @nodoc
|
52
47
|
def context=(req)
|
53
48
|
wrap_impl(@impl.context=(unwrap_impl(req)))
|
54
49
|
end
|
55
50
|
|
56
|
-
# -- inherited from EventEmitter --
|
57
51
|
# @nodoc
|
58
|
-
def
|
59
|
-
|
52
|
+
def page=(req)
|
53
|
+
wrap_impl(@impl.page=(unwrap_impl(req)))
|
60
54
|
end
|
61
55
|
|
62
56
|
# -- inherited from EventEmitter --
|
@@ -71,6 +65,12 @@ module Playwright
|
|
71
65
|
event_emitter_proxy.on(event, callback)
|
72
66
|
end
|
73
67
|
|
68
|
+
# -- inherited from EventEmitter --
|
69
|
+
# @nodoc
|
70
|
+
def off(event, callback)
|
71
|
+
event_emitter_proxy.off(event, callback)
|
72
|
+
end
|
73
|
+
|
74
74
|
private def event_emitter_proxy
|
75
75
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
76
76
|
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: 1.
|
4
|
+
version: 1.28.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -327,6 +327,7 @@ files:
|
|
327
327
|
- lib/playwright/javascript/visitor_info.rb
|
328
328
|
- lib/playwright/keyboard_impl.rb
|
329
329
|
- lib/playwright/locator_impl.rb
|
330
|
+
- lib/playwright/locator_utils.rb
|
330
331
|
- lib/playwright/mouse_impl.rb
|
331
332
|
- lib/playwright/playwright_api.rb
|
332
333
|
- lib/playwright/raw_headers.rb
|
@@ -396,8 +397,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
396
397
|
- !ruby/object:Gem::Version
|
397
398
|
version: '0'
|
398
399
|
requirements: []
|
399
|
-
rubygems_version: 3.3.
|
400
|
+
rubygems_version: 3.3.26
|
400
401
|
signing_key:
|
401
402
|
specification_version: 4
|
402
|
-
summary: The Ruby binding of playwright driver 1.
|
403
|
+
summary: The Ruby binding of playwright driver 1.28.1
|
403
404
|
test_files: []
|