playwright-ruby-client 1.18.0 → 1.19.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/documentation/docs/api/api_request.md +7 -0
  3. data/documentation/docs/api/api_request_context.md +167 -45
  4. data/documentation/docs/api/api_response.md +104 -0
  5. data/documentation/docs/api/browser_context.md +4 -0
  6. data/documentation/docs/api/frame.md +1 -1
  7. data/documentation/docs/api/frame_locator.md +1 -1
  8. data/documentation/docs/api/locator.md +10 -2
  9. data/documentation/docs/api/page.md +9 -1
  10. data/documentation/docs/api/route.md +1 -0
  11. data/documentation/docs/api/tracing.md +6 -1
  12. data/documentation/docs/include/api_coverage.md +32 -14
  13. data/lib/playwright/api_response_impl.rb +77 -0
  14. data/lib/playwright/channel_owner.rb +4 -0
  15. data/lib/playwright/channel_owners/api_request_context.rb +236 -0
  16. data/lib/playwright/channel_owners/browser_context.rb +13 -10
  17. data/lib/playwright/channel_owners/frame.rb +2 -2
  18. data/lib/playwright/channel_owners/page.rb +15 -5
  19. data/lib/playwright/channel_owners/route.rb +18 -4
  20. data/lib/playwright/{tracing_impl.rb → channel_owners/tracing.rb} +4 -8
  21. data/lib/playwright/frame_locator_impl.rb +2 -1
  22. data/lib/playwright/locator_impl.rb +42 -15
  23. data/lib/playwright/route_handler.rb +11 -8
  24. data/lib/playwright/transport.rb +1 -1
  25. data/lib/playwright/version.rb +2 -2
  26. data/lib/playwright_api/android.rb +6 -6
  27. data/lib/playwright_api/android_device.rb +6 -6
  28. data/lib/playwright_api/api_request.rb +20 -0
  29. data/lib/playwright_api/api_request_context.rb +16 -16
  30. data/lib/playwright_api/api_response.rb +81 -0
  31. data/lib/playwright_api/browser.rb +6 -6
  32. data/lib/playwright_api/browser_context.rb +9 -9
  33. data/lib/playwright_api/browser_type.rb +6 -6
  34. data/lib/playwright_api/cdp_session.rb +6 -6
  35. data/lib/playwright_api/console_message.rb +6 -6
  36. data/lib/playwright_api/dialog.rb +6 -6
  37. data/lib/playwright_api/element_handle.rb +6 -6
  38. data/lib/playwright_api/frame.rb +8 -8
  39. data/lib/playwright_api/frame_locator.rb +2 -2
  40. data/lib/playwright_api/js_handle.rb +6 -6
  41. data/lib/playwright_api/locator.rb +8 -3
  42. data/lib/playwright_api/page.rb +18 -18
  43. data/lib/playwright_api/playwright.rb +8 -8
  44. data/lib/playwright_api/request.rb +6 -6
  45. data/lib/playwright_api/response.rb +6 -6
  46. data/lib/playwright_api/route.rb +8 -7
  47. data/lib/playwright_api/selectors.rb +6 -6
  48. data/lib/playwright_api/tracing.rb +29 -2
  49. data/lib/playwright_api/web_socket.rb +6 -6
  50. data/lib/playwright_api/worker.rb +6 -6
  51. metadata +10 -5
@@ -99,20 +99,20 @@ module Playwright
99
99
 
100
100
  # -- inherited from EventEmitter --
101
101
  # @nodoc
102
- def once(event, callback)
103
- event_emitter_proxy.once(event, callback)
102
+ def off(event, callback)
103
+ event_emitter_proxy.off(event, callback)
104
104
  end
105
105
 
106
106
  # -- inherited from EventEmitter --
107
107
  # @nodoc
108
- def on(event, callback)
109
- event_emitter_proxy.on(event, callback)
108
+ def once(event, callback)
109
+ event_emitter_proxy.once(event, callback)
110
110
  end
111
111
 
112
112
  # -- inherited from EventEmitter --
113
113
  # @nodoc
114
- def off(event, callback)
115
- event_emitter_proxy.off(event, callback)
114
+ def on(event, callback)
115
+ event_emitter_proxy.on(event, callback)
116
116
  end
117
117
 
118
118
  private def event_emitter_proxy
@@ -47,8 +47,9 @@ module Playwright
47
47
  contentType: nil,
48
48
  headers: nil,
49
49
  path: nil,
50
+ response: nil,
50
51
  status: nil)
51
- wrap_impl(@impl.fulfill(body: unwrap_impl(body), contentType: unwrap_impl(contentType), headers: unwrap_impl(headers), path: unwrap_impl(path), status: unwrap_impl(status)))
52
+ wrap_impl(@impl.fulfill(body: unwrap_impl(body), contentType: unwrap_impl(contentType), headers: unwrap_impl(headers), path: unwrap_impl(path), response: unwrap_impl(response), status: unwrap_impl(status)))
52
53
  end
53
54
 
54
55
  # A request to be routed.
@@ -58,20 +59,20 @@ module Playwright
58
59
 
59
60
  # -- inherited from EventEmitter --
60
61
  # @nodoc
61
- def once(event, callback)
62
- event_emitter_proxy.once(event, callback)
62
+ def off(event, callback)
63
+ event_emitter_proxy.off(event, callback)
63
64
  end
64
65
 
65
66
  # -- inherited from EventEmitter --
66
67
  # @nodoc
67
- def on(event, callback)
68
- event_emitter_proxy.on(event, callback)
68
+ def once(event, callback)
69
+ event_emitter_proxy.once(event, callback)
69
70
  end
70
71
 
71
72
  # -- inherited from EventEmitter --
72
73
  # @nodoc
73
- def off(event, callback)
74
- event_emitter_proxy.off(event, callback)
74
+ def on(event, callback)
75
+ event_emitter_proxy.on(event, callback)
75
76
  end
76
77
 
77
78
  private def event_emitter_proxy
@@ -45,20 +45,20 @@ module Playwright
45
45
 
46
46
  # -- inherited from EventEmitter --
47
47
  # @nodoc
48
- def once(event, callback)
49
- event_emitter_proxy.once(event, callback)
48
+ def off(event, callback)
49
+ event_emitter_proxy.off(event, callback)
50
50
  end
51
51
 
52
52
  # -- inherited from EventEmitter --
53
53
  # @nodoc
54
- def on(event, callback)
55
- event_emitter_proxy.on(event, callback)
54
+ def once(event, callback)
55
+ event_emitter_proxy.once(event, callback)
56
56
  end
57
57
 
58
58
  # -- inherited from EventEmitter --
59
59
  # @nodoc
60
- def off(event, callback)
61
- event_emitter_proxy.off(event, callback)
60
+ def on(event, callback)
61
+ event_emitter_proxy.on(event, callback)
62
62
  end
63
63
 
64
64
  private def event_emitter_proxy
@@ -22,8 +22,13 @@ 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, title: nil)
26
- wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), title: unwrap_impl(title)))
25
+ def start(
26
+ name: nil,
27
+ screenshots: nil,
28
+ snapshots: nil,
29
+ sources: nil,
30
+ title: nil)
31
+ wrap_impl(@impl.start(name: unwrap_impl(name), screenshots: unwrap_impl(screenshots), snapshots: unwrap_impl(snapshots), sources: unwrap_impl(sources), title: unwrap_impl(title)))
27
32
  end
28
33
 
29
34
  # Start a new trace chunk. If you'd like to record multiple traces on the same `BrowserContext`, use
@@ -58,5 +63,27 @@ module Playwright
58
63
  def stop_chunk(path: nil)
59
64
  wrap_impl(@impl.stop_chunk(path: unwrap_impl(path)))
60
65
  end
66
+
67
+ # -- inherited from EventEmitter --
68
+ # @nodoc
69
+ def off(event, callback)
70
+ event_emitter_proxy.off(event, callback)
71
+ end
72
+
73
+ # -- inherited from EventEmitter --
74
+ # @nodoc
75
+ def once(event, callback)
76
+ event_emitter_proxy.once(event, callback)
77
+ end
78
+
79
+ # -- inherited from EventEmitter --
80
+ # @nodoc
81
+ def on(event, callback)
82
+ event_emitter_proxy.on(event, callback)
83
+ end
84
+
85
+ private def event_emitter_proxy
86
+ @event_emitter_proxy ||= EventEmitterProxy.new(self, @impl)
87
+ end
61
88
  end
62
89
  end
@@ -29,20 +29,20 @@ module Playwright
29
29
 
30
30
  # -- inherited from EventEmitter --
31
31
  # @nodoc
32
- def once(event, callback)
33
- event_emitter_proxy.once(event, callback)
32
+ def off(event, callback)
33
+ event_emitter_proxy.off(event, callback)
34
34
  end
35
35
 
36
36
  # -- inherited from EventEmitter --
37
37
  # @nodoc
38
- def on(event, callback)
39
- event_emitter_proxy.on(event, callback)
38
+ def once(event, callback)
39
+ event_emitter_proxy.once(event, callback)
40
40
  end
41
41
 
42
42
  # -- inherited from EventEmitter --
43
43
  # @nodoc
44
- def off(event, callback)
45
- event_emitter_proxy.off(event, callback)
44
+ def on(event, callback)
45
+ event_emitter_proxy.on(event, callback)
46
46
  end
47
47
 
48
48
  private def event_emitter_proxy
@@ -55,20 +55,20 @@ module Playwright
55
55
 
56
56
  # -- inherited from EventEmitter --
57
57
  # @nodoc
58
- def once(event, callback)
59
- event_emitter_proxy.once(event, callback)
58
+ def off(event, callback)
59
+ event_emitter_proxy.off(event, callback)
60
60
  end
61
61
 
62
62
  # -- inherited from EventEmitter --
63
63
  # @nodoc
64
- def on(event, callback)
65
- event_emitter_proxy.on(event, callback)
64
+ def once(event, callback)
65
+ event_emitter_proxy.once(event, callback)
66
66
  end
67
67
 
68
68
  # -- inherited from EventEmitter --
69
69
  # @nodoc
70
- def off(event, callback)
71
- event_emitter_proxy.off(event, callback)
70
+ def on(event, callback)
71
+ event_emitter_proxy.on(event, callback)
72
72
  end
73
73
 
74
74
  private def event_emitter_proxy
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.18.0
4
+ version: 1.19.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-01-25 00:00:00.000000000 Z
11
+ date: 2022-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -210,7 +210,9 @@ files:
210
210
  - documentation/README.md
211
211
  - documentation/babel.config.js
212
212
  - documentation/docs/api/accessibility.md
213
+ - documentation/docs/api/api_request.md
213
214
  - documentation/docs/api/api_request_context.md
215
+ - documentation/docs/api/api_response.md
214
216
  - documentation/docs/api/browser.md
215
217
  - documentation/docs/api/browser_context.md
216
218
  - documentation/docs/api/browser_type.md
@@ -275,6 +277,7 @@ files:
275
277
  - lib/playwright/accessibility_impl.rb
276
278
  - lib/playwright/android_input_impl.rb
277
279
  - lib/playwright/api_implementation.rb
280
+ - lib/playwright/api_response_impl.rb
278
281
  - lib/playwright/channel.rb
279
282
  - lib/playwright/channel_owner.rb
280
283
  - lib/playwright/channel_owners/android.rb
@@ -301,6 +304,7 @@ files:
301
304
  - lib/playwright/channel_owners/route.rb
302
305
  - lib/playwright/channel_owners/selectors.rb
303
306
  - lib/playwright/channel_owners/stream.rb
307
+ - lib/playwright/channel_owners/tracing.rb
304
308
  - lib/playwright/channel_owners/web_socket.rb
305
309
  - lib/playwright/channel_owners/worker.rb
306
310
  - lib/playwright/connection.rb
@@ -326,7 +330,6 @@ files:
326
330
  - lib/playwright/select_option_values.rb
327
331
  - lib/playwright/timeout_settings.rb
328
332
  - lib/playwright/touchscreen_impl.rb
329
- - lib/playwright/tracing_impl.rb
330
333
  - lib/playwright/transport.rb
331
334
  - lib/playwright/url_matcher.rb
332
335
  - lib/playwright/utils.rb
@@ -341,7 +344,9 @@ files:
341
344
  - lib/playwright_api/android_input.rb
342
345
  - lib/playwright_api/android_socket.rb
343
346
  - lib/playwright_api/android_web_view.rb
347
+ - lib/playwright_api/api_request.rb
344
348
  - lib/playwright_api/api_request_context.rb
349
+ - lib/playwright_api/api_response.rb
345
350
  - lib/playwright_api/browser.rb
346
351
  - lib/playwright_api/browser_context.rb
347
352
  - lib/playwright_api/browser_type.rb
@@ -388,8 +393,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
388
393
  - !ruby/object:Gem::Version
389
394
  version: '0'
390
395
  requirements: []
391
- rubygems_version: 3.3.3
396
+ rubygems_version: 3.3.7
392
397
  signing_key:
393
398
  specification_version: 4
394
- summary: The Ruby binding of playwright driver 1.18.0
399
+ summary: The Ruby binding of playwright driver 1.19.0
395
400
  test_files: []