playwright-ruby-client 1.40.0 → 1.41.beta1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0d2ac0187f243c1e1f408f9b2733a4c9f8bd2ea24b95667127ad9e991ae09a61
4
- data.tar.gz: cf860a1ea1f67bb33a13041eb5b87ea79035065a374e5f2c099d3f1207ef94a3
3
+ metadata.gz: ed3850992222f0ca034bfb21929941320408b44967cf2a6670f59697f773918f
4
+ data.tar.gz: 9e9137831c4e1cc10929809bd2d5f477df3c8d0e5ffdbd1f050cb697a655aa00
5
5
  SHA512:
6
- metadata.gz: 75db55fb24aea5a6a92ab54d2f50e62a7444b4438eb6a745d0ec8981d04984c6704ef403a3b86e659953fced1b729798d296d516947ee7c9dba12a1e742f572e
7
- data.tar.gz: 2c5918e7878c96c5d1ed7ab728757a996006d1a4c47d96f8b2503051a18986da2cf766a91623b005368017a0841404ab938fe5540219f84e2905166d8a2f414c
6
+ metadata.gz: f38e9f6ab657a84cffa1d7ef20282dcc68bb2b99a142788455a1824f575f1c1ac858b0a8b3d4570f43e7df5e07c0fc965a1951afef3c419d6b4507169fcf802f
7
+ data.tar.gz: b2624ca693431803afe83cb77c9dbe83d9d96c30618e4c827666737210db5c296ed0b4e10abe131c3fdf1ed9f7ca166eca158d0569f6b68be74c94007f06f470
@@ -441,6 +441,15 @@ def storage_state(path: nil)
441
441
 
442
442
  Returns storage state for this browser context, contains current cookies and local storage snapshot.
443
443
 
444
+ ## unroute_all
445
+
446
+ ```
447
+ def unroute_all(behavior: nil)
448
+ ```
449
+
450
+
451
+ Removes all routes created with [BrowserContext#route](./browser_context#route) and [BrowserContext#route_from_har](./browser_context#route_from_har).
452
+
444
453
  ## unroute
445
454
 
446
455
  ```
@@ -458,6 +458,7 @@ def screenshot(
458
458
  path: nil,
459
459
  quality: nil,
460
460
  scale: nil,
461
+ style: nil,
461
462
  timeout: nil,
462
463
  type: nil)
463
464
  ```
@@ -1099,6 +1099,7 @@ def screenshot(
1099
1099
  path: nil,
1100
1100
  quality: nil,
1101
1101
  scale: nil,
1102
+ style: nil,
1102
1103
  timeout: nil,
1103
1104
  type: nil)
1104
1105
  ```
@@ -128,7 +128,7 @@ The opposite of [LocatorAssertions#to_contain_text](./locator_assertions#to_cont
128
128
  ## not_to_have_attribute
129
129
 
130
130
  ```ruby
131
- expect(locator).not_to have_attribute(name, value, timeout: nil)
131
+ expect(locator).not_to have_attribute(name, value, ignoreCase: nil, timeout: nil)
132
132
  ```
133
133
 
134
134
 
@@ -1294,6 +1294,7 @@ def screenshot(
1294
1294
  path: nil,
1295
1295
  quality: nil,
1296
1296
  scale: nil,
1297
+ style: nil,
1297
1298
  timeout: nil,
1298
1299
  type: nil)
1299
1300
  ```
@@ -1548,6 +1549,15 @@ This method unchecks an element matching `selector` by performing the following
1548
1549
  When all steps combined have not finished during the specified `timeout`, this method throws a
1549
1550
  `TimeoutError`. Passing zero timeout disables this.
1550
1551
 
1552
+ ## unroute_all
1553
+
1554
+ ```
1555
+ def unroute_all(behavior: nil)
1556
+ ```
1557
+
1558
+
1559
+ Removes all routes created with [Page#route](./page#route) and [Page#route_from_har](./page#route_from_har).
1560
+
1551
1561
  ## unroute
1552
1562
 
1553
1563
  ```
@@ -35,7 +35,7 @@ Start tracing.
35
35
  **Usage**
36
36
 
37
37
  ```ruby
38
- context.tracing.start(name: 'trace', screenshots: true, snapshots: true)
38
+ context.tracing.start(screenshots: true, snapshots: true)
39
39
  page = context.new_page
40
40
  page.goto('https://playwright.dev')
41
41
  context.tracing.stop(path: 'trace.zip')
@@ -53,7 +53,7 @@ Start a new trace chunk. If you'd like to record multiple traces on the same [Br
53
53
  **Usage**
54
54
 
55
55
  ```ruby
56
- context.tracing.start(name: "trace", screenshots: true, snapshots: true)
56
+ context.tracing.start(screenshots: true, snapshots: true)
57
57
  page = context.new_page
58
58
  page.goto("https://playwright.dev")
59
59
 
@@ -315,6 +315,7 @@
315
315
  * title
316
316
  * type
317
317
  * uncheck
318
+ * unroute_all
318
319
  * unroute
319
320
  * url
320
321
  * video
@@ -368,6 +369,7 @@
368
369
  * set_geolocation
369
370
  * set_offline
370
371
  * storage_state
372
+ * unroute_all
371
373
  * unroute
372
374
  * expect_console_message
373
375
  * expect_event
@@ -335,6 +335,11 @@ module Playwright
335
335
  update_interception_patterns
336
336
  end
337
337
 
338
+ def unroute_all(behavior: nil)
339
+ @routes.clear
340
+ update_interception_patterns
341
+ end
342
+
338
343
  def unroute(url, handler: nil)
339
344
  @routes.reject! do |handler_entry|
340
345
  handler_entry.same_value?(url: url, handler: handler)
@@ -301,6 +301,7 @@ module Playwright
301
301
  path: nil,
302
302
  quality: nil,
303
303
  scale: nil,
304
+ style: nil,
304
305
  timeout: nil,
305
306
  type: nil)
306
307
 
@@ -312,6 +313,7 @@ module Playwright
312
313
  path: path,
313
314
  quality: quality,
314
315
  scale: scale,
316
+ style: style,
315
317
  timeout: timeout,
316
318
  type: type,
317
319
  }.compact
@@ -414,6 +414,11 @@ module Playwright
414
414
  update_interception_patterns
415
415
  end
416
416
 
417
+ def unroute_all(behavior: nil)
418
+ @routes.clear
419
+ update_interception_patterns
420
+ end
421
+
417
422
  def unroute(url, handler: nil)
418
423
  @routes.reject! do |handler_entry|
419
424
  handler_entry.same_value?(url: url, handler: handler)
@@ -457,6 +462,7 @@ module Playwright
457
462
  path: nil,
458
463
  quality: nil,
459
464
  scale: nil,
465
+ style: nil,
460
466
  timeout: nil,
461
467
  type: nil)
462
468
 
@@ -470,6 +476,7 @@ module Playwright
470
476
  animations: animations,
471
477
  caret: caret,
472
478
  scale: scale,
479
+ style: style,
473
480
  timeout: timeout,
474
481
  }.compact
475
482
  if mask.is_a?(Enumerable)
@@ -363,6 +363,7 @@ module Playwright
363
363
  path: nil,
364
364
  quality: nil,
365
365
  scale: nil,
366
+ style: nil,
366
367
  timeout: nil,
367
368
  type: nil)
368
369
 
@@ -376,6 +377,7 @@ module Playwright
376
377
  path: path,
377
378
  quality: quality,
378
379
  scale: scale,
380
+ style: style,
379
381
  timeout: options[:timeout],
380
382
  type: type)
381
383
  end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.40.0'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.40.1'
4
+ VERSION = '1.41.beta1'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.41.0-alpha-dec-24-2023'
6
6
  end
@@ -384,6 +384,12 @@ module Playwright
384
384
  wrap_impl(@impl.storage_state(path: unwrap_impl(path)))
385
385
  end
386
386
 
387
+ #
388
+ # Removes all routes created with [`method: BrowserContext.route`] and [`method: BrowserContext.routeFromHAR`].
389
+ def unroute_all(behavior: nil)
390
+ wrap_impl(@impl.unroute_all(behavior: unwrap_impl(behavior)))
391
+ end
392
+
387
393
  #
388
394
  # Removes a route created with [`method: BrowserContext.route`]. When `handler` is not specified, removes all
389
395
  # routes for the `url`.
@@ -382,9 +382,10 @@ module Playwright
382
382
  path: nil,
383
383
  quality: nil,
384
384
  scale: nil,
385
+ style: nil,
385
386
  timeout: nil,
386
387
  type: nil)
387
- wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
388
+ wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), style: unwrap_impl(style), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
388
389
  end
389
390
 
390
391
  #
@@ -953,9 +953,10 @@ module Playwright
953
953
  path: nil,
954
954
  quality: nil,
955
955
  scale: nil,
956
+ style: nil,
956
957
  timeout: nil,
957
958
  type: nil)
958
- wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
959
+ wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), style: unwrap_impl(style), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
959
960
  end
960
961
 
961
962
  #
@@ -80,8 +80,8 @@ module Playwright
80
80
 
81
81
  #
82
82
  # The opposite of [`method: LocatorAssertions.toHaveAttribute`].
83
- def not_to_have_attribute(name, value, timeout: nil)
84
- wrap_impl(@impl.not_to_have_attribute(unwrap_impl(name), unwrap_impl(value), timeout: unwrap_impl(timeout)))
83
+ def not_to_have_attribute(name, value, ignoreCase: nil, timeout: nil)
84
+ wrap_impl(@impl.not_to_have_attribute(unwrap_impl(name), unwrap_impl(value), ignoreCase: unwrap_impl(ignoreCase), timeout: unwrap_impl(timeout)))
85
85
  end
86
86
 
87
87
  #
@@ -1162,9 +1162,10 @@ module Playwright
1162
1162
  path: nil,
1163
1163
  quality: nil,
1164
1164
  scale: nil,
1165
+ style: nil,
1165
1166
  timeout: nil,
1166
1167
  type: nil)
1167
- wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), clip: unwrap_impl(clip), fullPage: unwrap_impl(fullPage), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
1168
+ wrap_impl(@impl.screenshot(animations: unwrap_impl(animations), caret: unwrap_impl(caret), clip: unwrap_impl(clip), fullPage: unwrap_impl(fullPage), mask: unwrap_impl(mask), maskColor: unwrap_impl(maskColor), omitBackground: unwrap_impl(omitBackground), path: unwrap_impl(path), quality: unwrap_impl(quality), scale: unwrap_impl(scale), style: unwrap_impl(style), timeout: unwrap_impl(timeout), type: unwrap_impl(type)))
1168
1169
  end
1169
1170
 
1170
1171
  #
@@ -1376,6 +1377,12 @@ module Playwright
1376
1377
  wrap_impl(@impl.uncheck(unwrap_impl(selector), force: unwrap_impl(force), noWaitAfter: unwrap_impl(noWaitAfter), position: unwrap_impl(position), strict: unwrap_impl(strict), timeout: unwrap_impl(timeout), trial: unwrap_impl(trial)))
1377
1378
  end
1378
1379
 
1380
+ #
1381
+ # Removes all routes created with [`method: Page.route`] and [`method: Page.routeFromHAR`].
1382
+ def unroute_all(behavior: nil)
1383
+ wrap_impl(@impl.unroute_all(behavior: unwrap_impl(behavior)))
1384
+ end
1385
+
1379
1386
  #
1380
1387
  # Removes a route created with [`method: Page.route`]. When `handler` is not specified, removes all routes for
1381
1388
  # the `url`.
@@ -1674,13 +1681,13 @@ module Playwright
1674
1681
  end
1675
1682
 
1676
1683
  # @nodoc
1677
- def stop_js_coverage
1678
- wrap_impl(@impl.stop_js_coverage)
1684
+ def stop_css_coverage
1685
+ wrap_impl(@impl.stop_css_coverage)
1679
1686
  end
1680
1687
 
1681
1688
  # @nodoc
1682
- def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1683
- wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1689
+ def stop_js_coverage
1690
+ wrap_impl(@impl.stop_js_coverage)
1684
1691
  end
1685
1692
 
1686
1693
  # @nodoc
@@ -1689,8 +1696,8 @@ module Playwright
1689
1696
  end
1690
1697
 
1691
1698
  # @nodoc
1692
- def stop_css_coverage
1693
- wrap_impl(@impl.stop_css_coverage)
1699
+ def start_js_coverage(resetOnNavigation: nil, reportAnonymousScripts: nil)
1700
+ wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1694
1701
  end
1695
1702
 
1696
1703
  # @nodoc
@@ -20,7 +20,7 @@ module Playwright
20
20
  # **Usage**
21
21
  #
22
22
  # ```python sync
23
- # context.tracing.start(name="trace", screenshots=True, snapshots=True)
23
+ # context.tracing.start(screenshots=True, snapshots=True)
24
24
  # page = context.new_page()
25
25
  # page.goto("https://playwright.dev")
26
26
  # context.tracing.stop(path = "trace.zip")
@@ -40,7 +40,7 @@ module Playwright
40
40
  # **Usage**
41
41
  #
42
42
  # ```python sync
43
- # context.tracing.start(name="trace", screenshots=True, snapshots=True)
43
+ # context.tracing.start(screenshots=True, snapshots=True)
44
44
  # page = context.new_page()
45
45
  # page.goto("https://playwright.dev")
46
46
  #
data/sig/playwright.rbs CHANGED
@@ -118,7 +118,7 @@ module Playwright
118
118
  def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
119
119
  def query_selector: (String selector) -> (nil | ElementHandle)
120
120
  def query_selector_all: (String selector) -> Array[untyped]
121
- def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
121
+ def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg")) -> String
122
122
  def scroll_into_view_if_needed: (?timeout: Float) -> void
123
123
  def select_option: (?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
124
124
  def select_text: (?force: bool, ?timeout: Float) -> void
@@ -306,7 +306,7 @@ module Playwright
306
306
  def reload: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
307
307
  def route: ((String | Regexp | function) url, function handler, ?times: Integer) -> void
308
308
  def route_from_har: ((String | File) har, ?notFound: ("abort" | "fallback"), ?update: bool, ?updateContent: ("embed" | "attach"), ?updateMode: ("full" | "minimal"), ?url: (String | Regexp)) -> void
309
- def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?clip: Hash[untyped, untyped], ?fullPage: bool, ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
309
+ def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?clip: Hash[untyped, untyped], ?fullPage: bool, ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg")) -> String
310
310
  def select_option: (String selector, ?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> Array[untyped]
311
311
  def set_checked: (String selector, bool checked, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
312
312
  def set_content: (String html, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> void
@@ -325,6 +325,7 @@ module Playwright
325
325
  def title: -> String
326
326
  def type: (String selector, String text, ?delay: Float, ?noWaitAfter: bool, ?strict: bool, ?timeout: Float) -> void
327
327
  def uncheck: (String selector, ?force: bool, ?noWaitAfter: bool, ?position: Hash[untyped, untyped], ?strict: bool, ?timeout: Float, ?trial: bool) -> void
328
+ def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
328
329
  def unroute: ((String | Regexp | function) url, ?handler: function) -> void
329
330
  def url: -> String
330
331
  def video: -> (nil | untyped)
@@ -383,6 +384,7 @@ module Playwright
383
384
  def set_offline: (bool offline) -> void
384
385
  def offline=: (bool offline) -> void
385
386
  def storage_state: (?path: (String | File)) -> Hash[untyped, untyped]
387
+ def unroute_all: (?behavior: ("wait" | "ignoreErrors" | "default")) -> void
386
388
  def unroute: ((String | Regexp | function) url, ?handler: function) -> void
387
389
  def expect_console_message: (?predicate: function, ?timeout: Float) { () -> void } -> ConsoleMessage
388
390
  def expect_event: (String event, ?predicate: function, ?timeout: Float) { () -> void } -> untyped
@@ -484,7 +486,7 @@ module Playwright
484
486
  def page: -> Page
485
487
  def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
486
488
  def press_sequentially: (String text, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
487
- def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
489
+ def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?maskColor: String, ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?style: String, ?timeout: Float, ?type: ("png" | "jpeg")) -> String
488
490
  def scroll_into_view_if_needed: (?timeout: Float) -> void
489
491
  def select_option: (?element: (ElementHandle | Array[untyped]), ?index: (Integer | Array[untyped]), ?value: (String | Array[untyped]), ?label: (String | Array[untyped]), ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> Array[untyped]
490
492
  def select_text: (?force: bool, ?timeout: Float) -> void
@@ -550,7 +552,7 @@ module Playwright
550
552
  def not_to_be_in_viewport: (?ratio: Float, ?timeout: Float) -> void
551
553
  def not_to_be_visible: (?timeout: Float, ?visible: bool) -> void
552
554
  def not_to_contain_text: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?ignoreCase: bool, ?timeout: Float, ?useInnerText: bool) -> void
553
- def not_to_have_attribute: (String name, (String | Regexp) value, ?timeout: Float) -> void
555
+ def not_to_have_attribute: (String name, (String | Regexp) value, ?ignoreCase: bool, ?timeout: Float) -> void
554
556
  def not_to_have_class: ((String | Regexp | Array[untyped] | Array[untyped] | Array[untyped]) expected, ?timeout: Float) -> void
555
557
  def not_to_have_count: (Integer count, ?timeout: Float) -> void
556
558
  def not_to_have_css: (String name, (String | Regexp) value, ?timeout: Float) -> void
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.40.0
4
+ version: 1.41.beta1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-12-10 00:00:00.000000000 Z
11
+ date: 2023-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -399,12 +399,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
399
399
  version: '2.4'
400
400
  required_rubygems_version: !ruby/object:Gem::Requirement
401
401
  requirements:
402
- - - ">="
402
+ - - ">"
403
403
  - !ruby/object:Gem::Version
404
- version: '0'
404
+ version: 1.3.1
405
405
  requirements: []
406
406
  rubygems_version: 3.3.26
407
407
  signing_key:
408
408
  specification_version: 4
409
- summary: The Ruby binding of playwright driver 1.40.1
409
+ summary: The Ruby binding of playwright driver 1.41.0-alpha-dec-24-2023
410
410
  test_files: []