playwright-ruby-client 1.16.1 → 1.18.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/api_request_context.md +49 -0
- data/documentation/docs/api/download.md +1 -3
- data/documentation/docs/api/element_handle.md +2 -3
- data/documentation/docs/api/frame.md +31 -1
- data/documentation/docs/api/frame_locator.md +79 -0
- data/documentation/docs/api/locator.md +36 -49
- data/documentation/docs/api/page.md +34 -4
- data/documentation/docs/api/selectors.md +1 -1
- data/documentation/docs/api/tracing.md +2 -2
- data/documentation/docs/include/api_coverage.md +18 -0
- data/lib/playwright/channel_owners/artifact.rb +1 -6
- data/lib/playwright/channel_owners/browser.rb +6 -8
- data/lib/playwright/channel_owners/browser_context.rb +5 -3
- data/lib/playwright/channel_owners/browser_type.rb +0 -1
- data/lib/playwright/channel_owners/frame.rb +10 -6
- data/lib/playwright/channel_owners/local_utils.rb +14 -0
- data/lib/playwright/channel_owners/page.rb +13 -10
- data/lib/playwright/connection.rb +9 -0
- data/lib/playwright/frame_locator_impl.rb +50 -0
- data/lib/playwright/locator_impl.rb +75 -8
- data/lib/playwright/tracing_impl.rb +25 -14
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright/video.rb +3 -0
- data/lib/playwright.rb +2 -1
- data/lib/playwright_api/android.rb +6 -6
- data/lib/playwright_api/android_device.rb +8 -8
- data/lib/playwright_api/api_request_context.rb +56 -6
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +15 -10
- 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 +0 -4
- data/lib/playwright_api/element_handle.rb +8 -9
- data/lib/playwright_api/frame.rb +34 -9
- data/lib/playwright_api/frame_locator.rb +60 -0
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/local_utils.rb +9 -0
- data/lib/playwright_api/locator.rb +28 -48
- data/lib/playwright_api/page.rb +42 -12
- data/lib/playwright_api/playwright.rb +11 -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 +8 -8
- data/lib/playwright_api/tracing.rb +4 -4
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +6 -6
- data/playwright.gemspec +1 -1
- metadata +11 -6
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
|
@@ -28,11 +28,11 @@ module Playwright
|
|
28
28
|
# page.set_content('<div><button>Click me</button></div>')
|
29
29
|
#
|
30
30
|
# # Use the selector prefixed with its name.
|
31
|
-
# button = page.
|
31
|
+
# button = page.locator('tag=button')
|
32
32
|
# # Combine it with other selector engines.
|
33
33
|
# page.click('tag=div >> text="Click me"')
|
34
34
|
# # Can use it in any methods supporting selectors.
|
35
|
-
# button_count = page.
|
35
|
+
# button_count = page.locator('tag=button').count()
|
36
36
|
# print(button_count)
|
37
37
|
# browser.close()
|
38
38
|
#
|
@@ -43,12 +43,6 @@ 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
|
-
# -- inherited from EventEmitter --
|
47
|
-
# @nodoc
|
48
|
-
def off(event, callback)
|
49
|
-
event_emitter_proxy.off(event, callback)
|
50
|
-
end
|
51
|
-
|
52
46
|
# -- inherited from EventEmitter --
|
53
47
|
# @nodoc
|
54
48
|
def once(event, callback)
|
@@ -61,6 +55,12 @@ module Playwright
|
|
61
55
|
event_emitter_proxy.on(event, callback)
|
62
56
|
end
|
63
57
|
|
58
|
+
# -- inherited from EventEmitter --
|
59
|
+
# @nodoc
|
60
|
+
def off(event, callback)
|
61
|
+
event_emitter_proxy.off(event, callback)
|
62
|
+
end
|
63
|
+
|
64
64
|
private def event_emitter_proxy
|
65
65
|
@event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
|
66
66
|
end
|
@@ -22,8 +22,8 @@ module Playwright
|
|
22
22
|
# page.goto("https://playwright.dev")
|
23
23
|
# context.tracing.stop(path = "trace.zip")
|
24
24
|
# ```
|
25
|
-
def start(name: nil, screenshots: nil, snapshots: nil)
|
26
|
-
wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots)))
|
25
|
+
def start(name: nil, screenshots: nil, snapshots: nil, title: nil)
|
26
|
+
wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), title: unwrap_impl(title)))
|
27
27
|
end
|
28
28
|
|
29
29
|
# Start a new trace chunk. If you'd like to record multiple traces on the same `BrowserContext`, use
|
@@ -45,8 +45,8 @@ module Playwright
|
|
45
45
|
# # Save a second trace file with different actions.
|
46
46
|
# context.tracing.stop_chunk(path = "trace2.zip")
|
47
47
|
# ```
|
48
|
-
def start_chunk
|
49
|
-
wrap_impl(@impl.start_chunk)
|
48
|
+
def start_chunk(title: nil)
|
49
|
+
wrap_impl(@impl.start_chunk(title: unwrap_impl(title)))
|
50
50
|
end
|
51
51
|
|
52
52
|
# Stop tracing.
|
@@ -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
|
@@ -53,12 +53,6 @@ module Playwright
|
|
53
53
|
wrap_impl(@impl.page=(unwrap_impl(req)))
|
54
54
|
end
|
55
55
|
|
56
|
-
# -- inherited from EventEmitter --
|
57
|
-
# @nodoc
|
58
|
-
def off(event, callback)
|
59
|
-
event_emitter_proxy.off(event, callback)
|
60
|
-
end
|
61
|
-
|
62
56
|
# -- inherited from EventEmitter --
|
63
57
|
# @nodoc
|
64
58
|
def once(event, callback)
|
@@ -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
|
data/playwright.gemspec
CHANGED
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
|
|
27
27
|
spec.required_ruby_version = '>= 2.4'
|
28
28
|
spec.add_dependency 'concurrent-ruby', '>= 1.1.6'
|
29
29
|
spec.add_dependency 'mime-types', '>= 3.0'
|
30
|
-
spec.add_development_dependency 'bundler', '~> 2.
|
30
|
+
spec.add_development_dependency 'bundler', '~> 2.3.0'
|
31
31
|
spec.add_development_dependency 'chunky_png'
|
32
32
|
spec.add_development_dependency 'dry-inflector'
|
33
33
|
spec.add_development_dependency 'faye-websocket'
|
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.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 2.
|
47
|
+
version: 2.3.0
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 2.
|
54
|
+
version: 2.3.0
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: chunky_png
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -227,6 +227,7 @@ files:
|
|
227
227
|
- documentation/docs/api/experimental/android_web_view.md
|
228
228
|
- documentation/docs/api/file_chooser.md
|
229
229
|
- documentation/docs/api/frame.md
|
230
|
+
- documentation/docs/api/frame_locator.md
|
230
231
|
- documentation/docs/api/js_handle.md
|
231
232
|
- documentation/docs/api/keyboard.md
|
232
233
|
- documentation/docs/api/locator.md
|
@@ -292,6 +293,7 @@ files:
|
|
292
293
|
- lib/playwright/channel_owners/fetch_request.rb
|
293
294
|
- lib/playwright/channel_owners/frame.rb
|
294
295
|
- lib/playwright/channel_owners/js_handle.rb
|
296
|
+
- lib/playwright/channel_owners/local_utils.rb
|
295
297
|
- lib/playwright/channel_owners/page.rb
|
296
298
|
- lib/playwright/channel_owners/playwright.rb
|
297
299
|
- lib/playwright/channel_owners/request.rb
|
@@ -308,6 +310,7 @@ files:
|
|
308
310
|
- lib/playwright/event_emitter_proxy.rb
|
309
311
|
- lib/playwright/events.rb
|
310
312
|
- lib/playwright/file_chooser_impl.rb
|
313
|
+
- lib/playwright/frame_locator_impl.rb
|
311
314
|
- lib/playwright/http_headers.rb
|
312
315
|
- lib/playwright/input_files.rb
|
313
316
|
- lib/playwright/javascript.rb
|
@@ -349,8 +352,10 @@ files:
|
|
349
352
|
- lib/playwright_api/element_handle.rb
|
350
353
|
- lib/playwright_api/file_chooser.rb
|
351
354
|
- lib/playwright_api/frame.rb
|
355
|
+
- lib/playwright_api/frame_locator.rb
|
352
356
|
- lib/playwright_api/js_handle.rb
|
353
357
|
- lib/playwright_api/keyboard.rb
|
358
|
+
- lib/playwright_api/local_utils.rb
|
354
359
|
- lib/playwright_api/locator.rb
|
355
360
|
- lib/playwright_api/mouse.rb
|
356
361
|
- lib/playwright_api/page.rb
|
@@ -383,8 +388,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
383
388
|
- !ruby/object:Gem::Version
|
384
389
|
version: '0'
|
385
390
|
requirements: []
|
386
|
-
rubygems_version: 3.
|
391
|
+
rubygems_version: 3.3.3
|
387
392
|
signing_key:
|
388
393
|
specification_version: 4
|
389
|
-
summary: The Ruby binding of playwright driver 1.
|
394
|
+
summary: The Ruby binding of playwright driver 1.18.0
|
390
395
|
test_files: []
|