playwright-ruby-client 1.27.0 → 1.28.1
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/element_handle.md +1 -0
- data/documentation/docs/api/frame.md +51 -3
- data/documentation/docs/api/frame_locator.md +50 -3
- data/documentation/docs/api/js_handle.md +5 -3
- data/documentation/docs/api/keyboard.md +1 -1
- data/documentation/docs/api/locator.md +73 -3
- data/documentation/docs/api/page.md +51 -3
- data/documentation/docs/api/request.md +1 -1
- data/documentation/docs/article/guides/rails_integration.md +1 -0
- data/documentation/docs/include/api_coverage.md +3 -0
- data/lib/playwright/channel_owner.rb +41 -0
- data/lib/playwright/channel_owners/android.rb +2 -2
- data/lib/playwright/channel_owners/android_device.rb +14 -55
- 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 +2 -0
- data/lib/playwright/channel_owners/page.rb +23 -28
- data/lib/playwright/channel_owners/playwright.rb +7 -0
- data/lib/playwright/connection.rb +4 -1
- data/lib/playwright/input_files.rb +3 -1
- data/lib/playwright/locator_impl.rb +16 -2
- data/lib/playwright/locator_utils.rb +13 -19
- data/lib/playwright/utils.rb +6 -0
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright/web_socket_transport.rb +1 -1
- data/lib/playwright.rb +55 -0
- data/lib/playwright_api/android.rb +12 -6
- data/lib/playwright_api/android_device.rb +10 -5
- data/lib/playwright_api/api_request_context.rb +6 -6
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +6 -6
- 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/element_handle.rb +8 -7
- data/lib/playwright_api/frame.rb +45 -11
- data/lib/playwright_api/frame_locator.rb +39 -6
- data/lib/playwright_api/js_handle.rb +7 -7
- data/lib/playwright_api/keyboard.rb +1 -1
- data/lib/playwright_api/locator.rb +55 -5
- data/lib/playwright_api/page.rb +45 -11
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +7 -7
- 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/tracing.rb +6 -6
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +6 -6
- metadata +4 -4
@@ -461,6 +461,7 @@ module Playwright
|
|
461
461
|
selector,
|
462
462
|
force: nil,
|
463
463
|
modifiers: nil,
|
464
|
+
noWaitAfter: nil,
|
464
465
|
position: nil,
|
465
466
|
strict: nil,
|
466
467
|
timeout: nil,
|
@@ -469,6 +470,7 @@ module Playwright
|
|
469
470
|
selector: selector,
|
470
471
|
force: force,
|
471
472
|
modifiers: modifiers,
|
473
|
+
noWaitAfter: noWaitAfter,
|
472
474
|
position: position,
|
473
475
|
strict: strict,
|
474
476
|
timeout: timeout,
|
@@ -8,6 +8,7 @@ module Playwright
|
|
8
8
|
include LocatorUtils
|
9
9
|
attr_writer :owned_context
|
10
10
|
|
11
|
+
|
11
12
|
private def after_initialize
|
12
13
|
@browser_context = @parent
|
13
14
|
@timeout_settings = TimeoutSettings.new(@browser_context.send(:_timeout_settings))
|
@@ -73,6 +74,14 @@ module Playwright
|
|
73
74
|
worker = ChannelOwners::Worker.from(params['worker'])
|
74
75
|
on_worker(worker)
|
75
76
|
})
|
77
|
+
|
78
|
+
set_event_to_subscription_mapping({
|
79
|
+
Events::Page::Request => "request",
|
80
|
+
Events::Page::Response => "response",
|
81
|
+
Events::Page::RequestFinished => "requestFinished",
|
82
|
+
Events::Page::RequestFailed => "requestFailed",
|
83
|
+
Events::Page::FileChooser => "fileChooser",
|
84
|
+
})
|
76
85
|
end
|
77
86
|
|
78
87
|
attr_reader \
|
@@ -169,30 +178,6 @@ module Playwright
|
|
169
178
|
video.send(:set_artifact, artifact)
|
170
179
|
end
|
171
180
|
|
172
|
-
# @override
|
173
|
-
def on(event, callback)
|
174
|
-
if event == Events::Page::FileChooser && listener_count(event) == 0
|
175
|
-
@channel.async_send_message_to_server('setFileChooserInterceptedNoReply', intercepted: true)
|
176
|
-
end
|
177
|
-
super
|
178
|
-
end
|
179
|
-
|
180
|
-
# @override
|
181
|
-
def once(event, callback)
|
182
|
-
if event == Events::Page::FileChooser && listener_count(event) == 0
|
183
|
-
@channel.async_send_message_to_server('setFileChooserInterceptedNoReply', intercepted: true)
|
184
|
-
end
|
185
|
-
super
|
186
|
-
end
|
187
|
-
|
188
|
-
# @override
|
189
|
-
def off(event, callback)
|
190
|
-
super
|
191
|
-
if event == Events::Page::FileChooser && listener_count(event) == 0
|
192
|
-
@channel.async_send_message_to_server('setFileChooserInterceptedNoReply', intercepted: false)
|
193
|
-
end
|
194
|
-
end
|
195
|
-
|
196
181
|
def context
|
197
182
|
@browser_context
|
198
183
|
end
|
@@ -366,16 +351,24 @@ module Playwright
|
|
366
351
|
|
367
352
|
def emulate_media(colorScheme: nil, forcedColors: nil, media: nil, reducedMotion: nil)
|
368
353
|
params = {
|
369
|
-
colorScheme: colorScheme,
|
370
|
-
forcedColors: forcedColors,
|
371
|
-
media: media,
|
372
|
-
reducedMotion: reducedMotion,
|
354
|
+
colorScheme: no_override_if_null(colorScheme),
|
355
|
+
forcedColors: no_override_if_null(forcedColors),
|
356
|
+
media: no_override_if_null(media),
|
357
|
+
reducedMotion: no_override_if_null(reducedMotion),
|
373
358
|
}.compact
|
374
359
|
@channel.send_message_to_server('emulateMedia', params)
|
375
360
|
|
376
361
|
nil
|
377
362
|
end
|
378
363
|
|
364
|
+
private def no_override_if_null(target)
|
365
|
+
if target == 'null'
|
366
|
+
'no-override'
|
367
|
+
else
|
368
|
+
target
|
369
|
+
end
|
370
|
+
end
|
371
|
+
|
379
372
|
def set_viewport_size(viewportSize)
|
380
373
|
@viewport_size = viewportSize
|
381
374
|
@channel.send_message_to_server('setViewportSize', { viewportSize: viewportSize })
|
@@ -637,6 +630,7 @@ module Playwright
|
|
637
630
|
selector,
|
638
631
|
force: nil,
|
639
632
|
modifiers: nil,
|
633
|
+
noWaitAfter: nil,
|
640
634
|
position: nil,
|
641
635
|
strict: nil,
|
642
636
|
timeout: nil,
|
@@ -645,6 +639,7 @@ module Playwright
|
|
645
639
|
selector,
|
646
640
|
force: force,
|
647
641
|
modifiers: modifiers,
|
642
|
+
noWaitAfter: noWaitAfter,
|
648
643
|
position: position,
|
649
644
|
strict: strict,
|
650
645
|
timeout: timeout,
|
@@ -39,6 +39,13 @@ module Playwright
|
|
39
39
|
::Playwright::ChannelOwners::Browser.from(@initializer['preLaunchedBrowser'])
|
40
40
|
end
|
41
41
|
|
42
|
+
private def pre_connected_android_device
|
43
|
+
unless @initializer['preConnectedAndroidDevice']
|
44
|
+
raise 'Malformed endpoint. Did you use Android.launchServer method?'
|
45
|
+
end
|
46
|
+
::Playwright::ChannelOwners::AndroidDevice.from(@initializer['preConnectedAndroidDevice'])
|
47
|
+
end
|
48
|
+
|
42
49
|
private def parse_device_descriptor(descriptor)
|
43
50
|
# This return value can be passed into Browser#new_context as it is.
|
44
51
|
# ex:
|
@@ -43,7 +43,10 @@ module Playwright
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def initialize_playwright
|
46
|
-
|
46
|
+
# Avoid Error: sdkLanguage: expected one of (javascript|python|java|csharp)
|
47
|
+
# ref: https://github.com/microsoft/playwright/pull/18308
|
48
|
+
# ref: https://github.com/YusukeIwaki/playwright-ruby-client/issues/228
|
49
|
+
result = send_message_to_server('', 'initialize', { sdkLanguage: 'python' })
|
47
50
|
ChannelOwners::Playwright.from(result['playwright'])
|
48
51
|
end
|
49
52
|
|
@@ -11,8 +11,7 @@ module Playwright
|
|
11
11
|
selector_scopes = [selector]
|
12
12
|
|
13
13
|
if hasText
|
14
|
-
|
15
|
-
selector_scopes << "internal:has=#{text_selector.to_json}"
|
14
|
+
selector_scopes << "internal:has-text=#{escape_for_text_selector(hasText, false)}"
|
16
15
|
end
|
17
16
|
|
18
17
|
if has
|
@@ -187,6 +186,10 @@ module Playwright
|
|
187
186
|
@frame.fill(@selector, value, strict: true, force: force, noWaitAfter: noWaitAfter, timeout: timeout)
|
188
187
|
end
|
189
188
|
|
189
|
+
def clear(force: nil, noWaitAfter: nil, timeout: nil)
|
190
|
+
@frame.fill(@selector, '', strict: true, force: force, noWaitAfter: noWaitAfter, timeout: timeout)
|
191
|
+
end
|
192
|
+
|
190
193
|
def locator(selector, hasText: nil, has: nil)
|
191
194
|
LocatorImpl.new(
|
192
195
|
frame: @frame,
|
@@ -251,6 +254,15 @@ module Playwright
|
|
251
254
|
@frame.focus(@selector, strict: true, timeout: timeout)
|
252
255
|
end
|
253
256
|
|
257
|
+
def blur(timeout: nil)
|
258
|
+
params = {
|
259
|
+
selector: @selector,
|
260
|
+
strict: true,
|
261
|
+
timeout: timeout,
|
262
|
+
}.compact
|
263
|
+
@frame.channel.send_message_to_server('blur', params)
|
264
|
+
end
|
265
|
+
|
254
266
|
def count
|
255
267
|
@frame.eval_on_selector_all(@selector, 'ee => ee.length')
|
256
268
|
end
|
@@ -262,6 +274,7 @@ module Playwright
|
|
262
274
|
def hover(
|
263
275
|
force: nil,
|
264
276
|
modifiers: nil,
|
277
|
+
noWaitAfter: nil,
|
265
278
|
position: nil,
|
266
279
|
timeout: nil,
|
267
280
|
trial: nil)
|
@@ -269,6 +282,7 @@ module Playwright
|
|
269
282
|
strict: true,
|
270
283
|
force: force,
|
271
284
|
modifiers: modifiers,
|
285
|
+
noWaitAfter: noWaitAfter,
|
272
286
|
position: position,
|
273
287
|
timeout: timeout,
|
274
288
|
trial: trial)
|
@@ -1,7 +1,10 @@
|
|
1
|
+
require 'json'
|
2
|
+
|
1
3
|
module Playwright
|
2
4
|
module LocatorUtils
|
3
5
|
def get_by_test_id(test_id)
|
4
|
-
|
6
|
+
test_id_attribute_name = ::Playwright::LocatorUtils.instance_variable_get(:@test_id_attribute_name)
|
7
|
+
locator(get_by_test_id_selector(test_id_attribute_name, test_id))
|
5
8
|
end
|
6
9
|
|
7
10
|
def get_by_alt_text(text, exact: false)
|
@@ -35,11 +38,8 @@ module Playwright
|
|
35
38
|
"internal:attr=[#{attr_name}=#{escape_for_attribute_selector_or_regex(text, exact)}]"
|
36
39
|
end
|
37
40
|
|
38
|
-
private def get_by_test_id_selector(test_id)
|
39
|
-
|
40
|
-
::Playwright::LocatorUtils.instance_variable_get(:@test_id_attribute_name),
|
41
|
-
test_id,
|
42
|
-
exact: true)
|
41
|
+
private def get_by_test_id_selector(test_id_attribute_name, test_id)
|
42
|
+
"internal:testid=[#{test_id_attribute_name}=#{escape_for_attribute_selector(test_id, true)}]"
|
43
43
|
end
|
44
44
|
|
45
45
|
private def get_by_label_selector(text, exact:)
|
@@ -59,7 +59,7 @@ module Playwright
|
|
59
59
|
end
|
60
60
|
|
61
61
|
private def get_by_text_selector(text, exact:)
|
62
|
-
"text=#{escape_for_text_selector(text, exact)}"
|
62
|
+
"internal:text=#{escape_for_text_selector(text, exact)}"
|
63
63
|
end
|
64
64
|
|
65
65
|
private def get_by_role_selector(role, **options)
|
@@ -67,7 +67,7 @@ module Playwright
|
|
67
67
|
|
68
68
|
ex = {
|
69
69
|
includeHidden: -> (value) { ['include-hidden', value.to_s] },
|
70
|
-
name: -> (value) { ['name', escape_for_attribute_selector_or_regex(value,
|
70
|
+
name: -> (value) { ['name', escape_for_attribute_selector_or_regex(value, options[:exact])]},
|
71
71
|
}
|
72
72
|
|
73
73
|
%i[
|
@@ -82,12 +82,12 @@ module Playwright
|
|
82
82
|
].each do |attr_name|
|
83
83
|
if options.key?(attr_name)
|
84
84
|
attr_value = options[attr_name]
|
85
|
-
props << ex[attr_name]&.call(attr_value) || [attr_name, attr_value.to_s]
|
85
|
+
props << (ex[attr_name]&.call(attr_value) || [attr_name, attr_value.to_s])
|
86
86
|
end
|
87
87
|
end
|
88
88
|
|
89
89
|
opts = props.map { |k, v| "[#{k}=#{v}]"}.join('')
|
90
|
-
"role=#{role}#{opts}"
|
90
|
+
"internal:role=#{role}#{opts}"
|
91
91
|
end
|
92
92
|
|
93
93
|
# @param text [String]
|
@@ -103,16 +103,10 @@ module Playwright
|
|
103
103
|
end
|
104
104
|
|
105
105
|
if exact
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
if text.include?('"') || text.include?('>>') || text.start_with?('/')
|
111
|
-
_text = escape_for_regex(text).gsub(/\s+/, '\\s+')
|
112
|
-
return "/#{_text}/i"
|
106
|
+
"#{text.to_json}s"
|
107
|
+
else
|
108
|
+
"#{text.to_json}i"
|
113
109
|
end
|
114
|
-
|
115
|
-
text
|
116
110
|
end
|
117
111
|
|
118
112
|
# @param text [Regexp|String]
|
data/lib/playwright/utils.rb
CHANGED
@@ -55,6 +55,12 @@ module Playwright
|
|
55
55
|
params[:storageState] = JSON.parse(File.read(params[:storageState]))
|
56
56
|
end
|
57
57
|
|
58
|
+
%i[colorScheme reducedMotion forcedColors].each do |key|
|
59
|
+
if params[key] == 'null'
|
60
|
+
params[key] = 'no-override'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
58
64
|
params
|
59
65
|
end
|
60
66
|
end
|
data/lib/playwright/version.rb
CHANGED
data/lib/playwright.rb
CHANGED
@@ -51,6 +51,22 @@ module Playwright
|
|
51
51
|
attr_reader :playwright, :browser
|
52
52
|
end
|
53
53
|
|
54
|
+
class AndroidExecution
|
55
|
+
def initialize(connection, playwright, device = nil)
|
56
|
+
@connection = connection
|
57
|
+
@playwright = playwright
|
58
|
+
@device = device
|
59
|
+
end
|
60
|
+
|
61
|
+
def stop
|
62
|
+
@device&.close
|
63
|
+
@connection.stop
|
64
|
+
end
|
65
|
+
|
66
|
+
attr_reader :playwright, :device
|
67
|
+
end
|
68
|
+
|
69
|
+
|
54
70
|
# Recommended to call this method with block.
|
55
71
|
#
|
56
72
|
# Playwright.create(...) do |playwright|
|
@@ -161,4 +177,43 @@ module Playwright
|
|
161
177
|
execution
|
162
178
|
end
|
163
179
|
end
|
180
|
+
|
181
|
+
# Connects to Playwright server, launched by `npx playwright launch-server chromium` or `playwright.chromium.launchServer()`
|
182
|
+
#
|
183
|
+
# Playwright.connect_to_browser_server('ws://....') do |browser|
|
184
|
+
# page = browser.new_page
|
185
|
+
# ...
|
186
|
+
# end
|
187
|
+
#
|
188
|
+
# @experimental
|
189
|
+
module_function def connect_to_android_server(ws_endpoint, &block)
|
190
|
+
require 'playwright/web_socket_client'
|
191
|
+
require 'playwright/web_socket_transport'
|
192
|
+
|
193
|
+
transport = WebSocketTransport.new(ws_endpoint: ws_endpoint)
|
194
|
+
connection = Connection.new(transport)
|
195
|
+
connection.mark_as_remote
|
196
|
+
connection.async_run
|
197
|
+
|
198
|
+
execution =
|
199
|
+
begin
|
200
|
+
playwright = connection.initialize_playwright
|
201
|
+
android_device = playwright.send(:pre_connected_android_device)
|
202
|
+
android_device.should_close_connection_on_close!
|
203
|
+
AndroidExecution.new(connection, PlaywrightApi.wrap(playwright), PlaywrightApi.wrap(android_device))
|
204
|
+
rescue
|
205
|
+
connection.stop
|
206
|
+
raise
|
207
|
+
end
|
208
|
+
|
209
|
+
if block
|
210
|
+
begin
|
211
|
+
block.call(execution.device)
|
212
|
+
ensure
|
213
|
+
execution.stop
|
214
|
+
end
|
215
|
+
else
|
216
|
+
execution
|
217
|
+
end
|
218
|
+
end
|
164
219
|
end
|
@@ -25,6 +25,12 @@ module Playwright
|
|
25
25
|
# ```
|
26
26
|
class Android < PlaywrightApi
|
27
27
|
|
28
|
+
# This methods attaches Playwright to an existing Android device. Use [`method: Android.launchServer`] to launch a new
|
29
|
+
# Android server instance.
|
30
|
+
def connect(wsEndpoint, headers: nil, slowMo: nil, timeout: nil)
|
31
|
+
raise NotImplementedError.new('connect is not implemented yet.')
|
32
|
+
end
|
33
|
+
|
28
34
|
# Returns the list of detected Android devices.
|
29
35
|
def devices(host: nil, omitDriverInstall: nil, port: nil)
|
30
36
|
wrap_impl(@impl.devices(host: unwrap_impl(host), omitDriverInstall: unwrap_impl(omitDriverInstall), port: unwrap_impl(port)))
|
@@ -36,12 +42,6 @@ module Playwright
|
|
36
42
|
end
|
37
43
|
alias_method :default_timeout=, :set_default_timeout
|
38
44
|
|
39
|
-
# -- inherited from EventEmitter --
|
40
|
-
# @nodoc
|
41
|
-
def off(event, callback)
|
42
|
-
event_emitter_proxy.off(event, callback)
|
43
|
-
end
|
44
|
-
|
45
45
|
# -- inherited from EventEmitter --
|
46
46
|
# @nodoc
|
47
47
|
def once(event, callback)
|
@@ -54,6 +54,12 @@ module Playwright
|
|
54
54
|
event_emitter_proxy.on(event, callback)
|
55
55
|
end
|
56
56
|
|
57
|
+
# -- inherited from EventEmitter --
|
58
|
+
# @nodoc
|
59
|
+
def off(event, callback)
|
60
|
+
event_emitter_proxy.off(event, callback)
|
61
|
+
end
|
62
|
+
|
57
63
|
private def event_emitter_proxy
|
58
64
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
59
65
|
end
|
@@ -169,14 +169,13 @@ module Playwright
|
|
169
169
|
end
|
170
170
|
|
171
171
|
# @nodoc
|
172
|
-
def
|
173
|
-
wrap_impl(@impl.
|
172
|
+
def should_close_connection_on_close!
|
173
|
+
wrap_impl(@impl.should_close_connection_on_close!)
|
174
174
|
end
|
175
175
|
|
176
|
-
# -- inherited from EventEmitter --
|
177
176
|
# @nodoc
|
178
|
-
def
|
179
|
-
|
177
|
+
def tap_on(selector, duration: nil, timeout: nil)
|
178
|
+
wrap_impl(@impl.tap_on(unwrap_impl(selector), duration: unwrap_impl(duration), timeout: unwrap_impl(timeout)))
|
180
179
|
end
|
181
180
|
|
182
181
|
# -- inherited from EventEmitter --
|
@@ -191,6 +190,12 @@ module Playwright
|
|
191
190
|
event_emitter_proxy.on(event, callback)
|
192
191
|
end
|
193
192
|
|
193
|
+
# -- inherited from EventEmitter --
|
194
|
+
# @nodoc
|
195
|
+
def off(event, callback)
|
196
|
+
event_emitter_proxy.off(event, callback)
|
197
|
+
end
|
198
|
+
|
194
199
|
private def event_emitter_proxy
|
195
200
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
196
201
|
end
|
@@ -269,12 +269,6 @@ module Playwright
|
|
269
269
|
raise NotImplementedError.new('storage_state is not implemented yet.')
|
270
270
|
end
|
271
271
|
|
272
|
-
# -- inherited from EventEmitter --
|
273
|
-
# @nodoc
|
274
|
-
def off(event, callback)
|
275
|
-
event_emitter_proxy.off(event, callback)
|
276
|
-
end
|
277
|
-
|
278
272
|
# -- inherited from EventEmitter --
|
279
273
|
# @nodoc
|
280
274
|
def once(event, callback)
|
@@ -287,6 +281,12 @@ module Playwright
|
|
287
281
|
event_emitter_proxy.on(event, callback)
|
288
282
|
end
|
289
283
|
|
284
|
+
# -- inherited from EventEmitter --
|
285
|
+
# @nodoc
|
286
|
+
def off(event, callback)
|
287
|
+
event_emitter_proxy.off(event, callback)
|
288
|
+
end
|
289
|
+
|
290
290
|
private def event_emitter_proxy
|
291
291
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
292
292
|
end
|
@@ -192,12 +192,6 @@ module Playwright
|
|
192
192
|
wrap_impl(@impl.version)
|
193
193
|
end
|
194
194
|
|
195
|
-
# -- inherited from EventEmitter --
|
196
|
-
# @nodoc
|
197
|
-
def off(event, callback)
|
198
|
-
event_emitter_proxy.off(event, callback)
|
199
|
-
end
|
200
|
-
|
201
195
|
# -- inherited from EventEmitter --
|
202
196
|
# @nodoc
|
203
197
|
def once(event, callback)
|
@@ -210,6 +204,12 @@ module Playwright
|
|
210
204
|
event_emitter_proxy.on(event, callback)
|
211
205
|
end
|
212
206
|
|
207
|
+
# -- inherited from EventEmitter --
|
208
|
+
# @nodoc
|
209
|
+
def off(event, callback)
|
210
|
+
event_emitter_proxy.off(event, callback)
|
211
|
+
end
|
212
|
+
|
213
213
|
private def event_emitter_proxy
|
214
214
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
215
215
|
end
|
@@ -406,12 +406,6 @@ module Playwright
|
|
406
406
|
wrap_impl(@impl.owner_page=(unwrap_impl(req)))
|
407
407
|
end
|
408
408
|
|
409
|
-
# -- inherited from EventEmitter --
|
410
|
-
# @nodoc
|
411
|
-
def off(event, callback)
|
412
|
-
event_emitter_proxy.off(event, callback)
|
413
|
-
end
|
414
|
-
|
415
409
|
# -- inherited from EventEmitter --
|
416
410
|
# @nodoc
|
417
411
|
def once(event, callback)
|
@@ -424,6 +418,12 @@ module Playwright
|
|
424
418
|
event_emitter_proxy.on(event, callback)
|
425
419
|
end
|
426
420
|
|
421
|
+
# -- inherited from EventEmitter --
|
422
|
+
# @nodoc
|
423
|
+
def off(event, callback)
|
424
|
+
event_emitter_proxy.off(event, callback)
|
425
|
+
end
|
426
|
+
|
427
427
|
private def event_emitter_proxy
|
428
428
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
429
429
|
end
|
@@ -158,12 +158,6 @@ module Playwright
|
|
158
158
|
wrap_impl(@impl.name)
|
159
159
|
end
|
160
160
|
|
161
|
-
# -- inherited from EventEmitter --
|
162
|
-
# @nodoc
|
163
|
-
def off(event, callback)
|
164
|
-
event_emitter_proxy.off(event, callback)
|
165
|
-
end
|
166
|
-
|
167
161
|
# -- inherited from EventEmitter --
|
168
162
|
# @nodoc
|
169
163
|
def once(event, callback)
|
@@ -176,6 +170,12 @@ module Playwright
|
|
176
170
|
event_emitter_proxy.on(event, callback)
|
177
171
|
end
|
178
172
|
|
173
|
+
# -- inherited from EventEmitter --
|
174
|
+
# @nodoc
|
175
|
+
def off(event, callback)
|
176
|
+
event_emitter_proxy.off(event, callback)
|
177
|
+
end
|
178
|
+
|
179
179
|
private def event_emitter_proxy
|
180
180
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
181
181
|
end
|
@@ -33,12 +33,6 @@ module Playwright
|
|
33
33
|
wrap_impl(@impl.send_message(unwrap_impl(method), params: unwrap_impl(params)))
|
34
34
|
end
|
35
35
|
|
36
|
-
# -- inherited from EventEmitter --
|
37
|
-
# @nodoc
|
38
|
-
def off(event, callback)
|
39
|
-
event_emitter_proxy.off(event, callback)
|
40
|
-
end
|
41
|
-
|
42
36
|
# -- inherited from EventEmitter --
|
43
37
|
# @nodoc
|
44
38
|
def once(event, callback)
|
@@ -51,6 +45,12 @@ module Playwright
|
|
51
45
|
event_emitter_proxy.on(event, callback)
|
52
46
|
end
|
53
47
|
|
48
|
+
# -- inherited from EventEmitter --
|
49
|
+
# @nodoc
|
50
|
+
def off(event, callback)
|
51
|
+
event_emitter_proxy.off(event, callback)
|
52
|
+
end
|
53
|
+
|
54
54
|
private def event_emitter_proxy
|
55
55
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
56
56
|
end
|
@@ -42,12 +42,6 @@ module Playwright
|
|
42
42
|
wrap_impl(@impl.type)
|
43
43
|
end
|
44
44
|
|
45
|
-
# -- inherited from EventEmitter --
|
46
|
-
# @nodoc
|
47
|
-
def off(event, callback)
|
48
|
-
event_emitter_proxy.off(event, callback)
|
49
|
-
end
|
50
|
-
|
51
45
|
# -- inherited from EventEmitter --
|
52
46
|
# @nodoc
|
53
47
|
def once(event, callback)
|
@@ -60,6 +54,12 @@ module Playwright
|
|
60
54
|
event_emitter_proxy.on(event, callback)
|
61
55
|
end
|
62
56
|
|
57
|
+
# -- inherited from EventEmitter --
|
58
|
+
# @nodoc
|
59
|
+
def off(event, callback)
|
60
|
+
event_emitter_proxy.off(event, callback)
|
61
|
+
end
|
62
|
+
|
63
63
|
private def event_emitter_proxy
|
64
64
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
65
65
|
end
|
@@ -58,12 +58,6 @@ module Playwright
|
|
58
58
|
wrap_impl(@impl.accept_async(promptText: unwrap_impl(promptText)))
|
59
59
|
end
|
60
60
|
|
61
|
-
# -- inherited from EventEmitter --
|
62
|
-
# @nodoc
|
63
|
-
def off(event, callback)
|
64
|
-
event_emitter_proxy.off(event, callback)
|
65
|
-
end
|
66
|
-
|
67
61
|
# -- inherited from EventEmitter --
|
68
62
|
# @nodoc
|
69
63
|
def once(event, callback)
|
@@ -76,6 +70,12 @@ module Playwright
|
|
76
70
|
event_emitter_proxy.on(event, callback)
|
77
71
|
end
|
78
72
|
|
73
|
+
# -- inherited from EventEmitter --
|
74
|
+
# @nodoc
|
75
|
+
def off(event, callback)
|
76
|
+
event_emitter_proxy.off(event, callback)
|
77
|
+
end
|
78
|
+
|
79
79
|
private def event_emitter_proxy
|
80
80
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
81
81
|
end
|
@@ -251,10 +251,11 @@ module Playwright
|
|
251
251
|
def hover(
|
252
252
|
force: nil,
|
253
253
|
modifiers: nil,
|
254
|
+
noWaitAfter: nil,
|
254
255
|
position: nil,
|
255
256
|
timeout: nil,
|
256
257
|
trial: nil)
|
257
|
-
wrap_impl(@impl.hover(force: unwrap_impl(force), modifiers: unwrap_impl(modifiers), position: unwrap_impl(position), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
|
258
|
+
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)))
|
258
259
|
end
|
259
260
|
|
260
261
|
# Returns the `element.innerHTML`.
|
@@ -557,12 +558,6 @@ module Playwright
|
|
557
558
|
wrap_impl(@impl.wait_for_selector(unwrap_impl(selector), state: unwrap_impl(state), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout)))
|
558
559
|
end
|
559
560
|
|
560
|
-
# -- inherited from EventEmitter --
|
561
|
-
# @nodoc
|
562
|
-
def off(event, callback)
|
563
|
-
event_emitter_proxy.off(event, callback)
|
564
|
-
end
|
565
|
-
|
566
561
|
# -- inherited from EventEmitter --
|
567
562
|
# @nodoc
|
568
563
|
def once(event, callback)
|
@@ -575,6 +570,12 @@ module Playwright
|
|
575
570
|
event_emitter_proxy.on(event, callback)
|
576
571
|
end
|
577
572
|
|
573
|
+
# -- inherited from EventEmitter --
|
574
|
+
# @nodoc
|
575
|
+
def off(event, callback)
|
576
|
+
event_emitter_proxy.off(event, callback)
|
577
|
+
end
|
578
|
+
|
578
579
|
private def event_emitter_proxy
|
579
580
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
580
581
|
end
|