playwright-ruby-client 1.57.2.alpha1 → 1.58.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6d2a03c73551065e1c8bf121c3784103fb51b5dd4d9fd3b8f63cb2e86907369a
4
- data.tar.gz: 7a66180bf3f8eae379ae8a4cbd5e1d67d8531cdfc0689719cf96524f294c5b89
3
+ metadata.gz: '08aec35a2cb057d2af0f12a380e0a56393671043a9f4f1cf2af5315009fe1172'
4
+ data.tar.gz: cc722558227d085896e30d6819c391404770d319da4a6bb10b5ef72ed2317212
5
5
  SHA512:
6
- metadata.gz: 7ec32a794ca503b5d95c147834bbd7dd0b0e6c4b8b803df15c35cbe6f2044062cbc709eab9641a55da9aff084f549b98296ffe64d20a44e0ad2a41099e521927
7
- data.tar.gz: 6bfce7e393d7ab498639dca2342dfe3434b87ce0bee462b7e8c42017965ff9512e1d232de2126de0b92983dc0eb9faa1c084283eac1521b2bceb4a2d8b152be3
6
+ metadata.gz: 3de09e030621846244bc6c59d26a7d18b00ad716f315fa4ea0ebffe93a2095a1b33401480a20617e26a28987bf11703f37a85a6be8dfb37dc6d11c2a9a5a574c
7
+ data.tar.gz: 29527ac83824caf1c2f4ce51e691fad3af9d3213f7d7d6df3877e25118981a3c9c5a62b44878434fb6cc61667d3c2088d4c36fef58b59c0a135e975cd634dd4d
@@ -25,6 +25,7 @@ end
25
25
  def connect_over_cdp(
26
26
  endpointURL,
27
27
  headers: nil,
28
+ isLocal: nil,
28
29
  slowMo: nil,
29
30
  timeout: nil,
30
31
  &block)
@@ -63,7 +64,6 @@ def launch(
63
64
  args: nil,
64
65
  channel: nil,
65
66
  chromiumSandbox: nil,
66
- devtools: nil,
67
67
  downloadsPath: nil,
68
68
  env: nil,
69
69
  executablePath: nil,
@@ -126,7 +126,6 @@ def launch_persistent_context(
126
126
  colorScheme: nil,
127
127
  contrast: nil,
128
128
  deviceScaleFactor: nil,
129
- devtools: nil,
130
129
  downloadsPath: nil,
131
130
  env: nil,
132
131
  executablePath: nil,
@@ -343,7 +343,7 @@ def description
343
343
  ```
344
344
 
345
345
 
346
- Returns locator description previously set with [Locator#describe](./locator#describe). Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
346
+ Returns locator description previously set with [Locator#describe](./locator#describe). Returns `null` if no custom description has been set.
347
347
 
348
348
  **Usage**
349
349
 
@@ -524,7 +524,7 @@ Let's see how we can use the assertion:
524
524
 
525
525
  ```ruby
526
526
  # ✓ Contains the right items in the right order
527
- expect(page.locator("ul > li")).to contain_text(["Text 1", "Text 3", "Text 4"])
527
+ expect(page.locator("ul > li")).to contain_text(["Text 1", "Text 3"])
528
528
 
529
529
  # ✖ Wrong order
530
530
  expect(page.locator("ul > li")).to contain_text(["Text 3", "Text 2"])
@@ -49,7 +49,10 @@ The `headers` option applies to both the routed request and any redirects it ini
49
49
 
50
50
  [Route#continue](./route#continue) will immediately send the request to the network, other matching handlers won't be invoked. Use [Route#fallback](./route#fallback) If you want next matching handler in the chain to be invoked.
51
51
 
52
- **NOTE**: The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [BrowserContext#add_cookies](./browser_context#add_cookies).
52
+ **NOTE**: Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`, `Content-Length` and others, see [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list).
53
+ If an override is provided for a forbidden header, it will be ignored and the original request header will be used.
54
+
55
+ To set custom cookies, use [BrowserContext#add_cookies](./browser_context#add_cookies).
53
56
 
54
57
  ## fallback
55
58
 
@@ -19,7 +19,7 @@ $ npx playwright install
19
19
 
20
20
  and then set `playwright_cli_executable_path: "npx playwright"` into `Playwright.create`.
21
21
 
22
- Other methods of installation is also available. See the detail in [Download Playwright driver](./guides/download_playwright_driver)
22
+ Other methods of installation are also available. See the detail in [Download Playwright driver](./guides/download_playwright_driver)
23
23
 
24
24
  ## Enjoy with examples
25
25
 
@@ -4,7 +4,7 @@ sidebar_position: 30
4
4
 
5
5
  # Playwright inspector
6
6
 
7
- Playwright provides an useful inspector.
7
+ Playwright provides a useful inspector.
8
8
  https://playwright.dev/docs/inspector/
9
9
 
10
10
  ## Overview
@@ -8,7 +8,7 @@ sidebar_position: 2
8
8
 
9
9
  ## Create Playwright session
10
10
 
11
- In oder to launch browser, it is required to create Playwright session.
11
+ In order to launch browser, it is required to create Playwright session.
12
12
 
13
13
  In previous examples,
14
14
 
@@ -18,7 +18,7 @@ Playwright.create(playwright_cli_executable_path: 'npx playwright') do |playwrig
18
18
  end
19
19
  ```
20
20
 
21
- this is the exact procedure for creating Playwright session. Choose either of method for creating the session.
21
+ this is the exact procedure for creating Playwright session. Choose either method for creating the session.
22
22
 
23
23
  ### Define scoped Playwright session with block
24
24
 
@@ -28,13 +28,13 @@ Playwright.create(playwright_cli_executable_path: 'npx playwright') do |playwrig
28
28
  end
29
29
  ```
30
30
 
31
- As is described repetedly, this is the recommended way for creating Playwright session. Even when any exception happens, Playwright session is safely ended on leaving the block.
31
+ As described repeatedly, this is the recommended way for creating a Playwright session. Even when any exception happens, Playwright session is safely ended on leaving the block.
32
32
 
33
33
  Internally `playwright run-driver` session is alive during the block.
34
34
 
35
35
  ### Define start/end of the Playwright session separately without block.
36
36
 
37
- Sometimes we have to define separated start/end definition. `playwright-ruby-client` also allows it.
37
+ Sometimes we have to define separate start/end definitions. `playwright-ruby-client` also allows it.
38
38
 
39
39
  ```rb
40
40
  class SomeClass
@@ -103,7 +103,7 @@ Also we can use `Browser#new_page` to create a new window and new tab at once.
103
103
 
104
104
  ```rb
105
105
  Playwright.create(playwright_cli_executable_path: 'npx playwright') do |playwright|
106
- playwright.chromium.launch(headless: false) do |browser| # Chromium task icon appers in.
106
+ playwright.chromium.launch(headless: false) do |browser| # Chromium task icon appears.
107
107
  context = browser.new_context # Prepare new window.
108
108
  page = context.new_page # Open new window and new tab here. (about:blank)
109
109
  page.goto('https://example.com') # Navigate to a site.
@@ -217,7 +217,7 @@ before do |example|
217
217
  end
218
218
  ```
219
219
 
220
- ![sceenrecord](https://user-images.githubusercontent.com/11763113/121126629-71b5f600-c863-11eb-8f88-7924ab669946.gif)
220
+ ![screenrecord](https://user-images.githubusercontent.com/11763113/121126629-71b5f600-c863-11eb-8f88-7924ab669946.gif)
221
221
 
222
222
  For more details, refer [Recording video](./recording_video.md#using-screen-recording-from-capybara-driver)
223
223
 
@@ -33,7 +33,7 @@ playwright.chromium.launch do |browser|
33
33
 
34
34
  Playwright puts videos on the directory specified at `record_video_dir`.
35
35
 
36
- The previous example uses [Dir#mktmpdir](https://docs.ruby-lang.org/ja/latest/method/Dir/s/mktmpdir.html) for storing videos into a temprary directory. Also we simply specify a relative or absolute path like `./my_videos/` or `/path/to/videos`.
36
+ The previous example uses [Dir#mktmpdir](https://docs.ruby-lang.org/ja/latest/method/Dir/s/mktmpdir.html) for storing videos into a temporary directory. Also we simply specify a relative or absolute path like `./my_videos/` or `/path/to/videos`.
37
37
 
38
38
  ## Getting video path and recorded video
39
39
 
@@ -42,7 +42,7 @@ This is really confusing for beginners, but in Playwright
42
42
  * We can get the video path **only when page is alive (before calling BrowserContext#close or Page#close)**
43
43
  * We can acquire the completely saved video **only after calling BrowserContext#close**
44
44
 
45
- So in most case, we have to store the video path in advance, and handle the saved video after BrowserContext is closed, as is shown the previous example code.
45
+ So in most cases, we have to store the video path in advance, and handle the saved video after BrowserContext is closed, as shown in the previous example code.
46
46
 
47
47
  ### Using `video#save_as(path)`
48
48
 
@@ -5,7 +5,7 @@ sidebar_position: 20
5
5
  # Semi-automation
6
6
 
7
7
  Playwright Browser context is isolated and not persisted by default. But we can also use persistent browser context using [BrowserType#launch_persistent_context](/docs/api/browser_type#launch_persistent_context).
8
- This allow us to intermediate into automation, for example
8
+ This allows us to intervene in automation, for example
9
9
 
10
10
  * Authenticate with OAuth2 manually before automation
11
11
  * Testing a page after some chrome extensions are installed manually
@@ -17,6 +17,7 @@
17
17
  * redirected_to
18
18
  * resource_type
19
19
  * response
20
+ * ~~service_worker~~
20
21
  * sizes
21
22
  * timing
22
23
  * url
@@ -60,12 +60,13 @@ module Playwright
60
60
  end
61
61
  end
62
62
 
63
- def connect_over_cdp(endpointURL, headers: nil, slowMo: nil, timeout: nil, &block)
63
+ def connect_over_cdp(endpointURL, headers: nil, isLocal: nil, slowMo: nil, timeout: nil, &block)
64
64
  raise 'Connecting over CDP is only supported in Chromium.' unless name == 'chromium'
65
65
 
66
66
  params = {
67
67
  endpointURL: endpointURL,
68
68
  headers: headers,
69
+ isLocal: isLocal,
69
70
  slowMo: slowMo,
70
71
  timeout: @timeout_settings.timeout(timeout),
71
72
  }.compact
@@ -98,7 +98,7 @@ module Playwright
98
98
 
99
99
  private def on_route(route)
100
100
  route.send(:update_context, self)
101
-
101
+ return if @close_was_called
102
102
  # It is not desired to use PlaywrightApi.wrap directly.
103
103
  # However it is a little difficult to define wrapper for `handler` parameter in generate_api.
104
104
  # Just a workaround...
@@ -508,6 +508,9 @@ module Playwright
508
508
 
509
509
  def close(runBeforeUnload: nil, reason: nil)
510
510
  @close_reason = reason
511
+ unless runBeforeUnload
512
+ @close_was_called = true
513
+ end
511
514
  if @owned_context
512
515
  @owned_context.close
513
516
  else
@@ -21,7 +21,7 @@ module Playwright
21
21
  private def expect_impl(expression, expect_options, expected, message, title)
22
22
  expect_options[:timeout] ||= @default_expect_timeout
23
23
  expect_options[:isNot] = @is_not
24
- message.gsub!("expected to", "not expected to") if @is_not
24
+ message = message.gsub("expected to", "not expected to") if @is_not
25
25
  expect_options.delete(:useInnerText) if expect_options.key?(:useInnerText) && expect_options[:useInnerText].nil?
26
26
 
27
27
  result = @locator.expect(expression, expect_options, title)
@@ -22,7 +22,7 @@ module Playwright
22
22
  private def expect_impl(expression, expect_options, expected, message, title)
23
23
  expect_options[:timeout] ||= @default_expect_timeout
24
24
  expect_options[:isNot] = @is_not
25
- message.gsub!("expected to", "not expected to") if @is_not
25
+ message = message.gsub("expected to", "not expected to") if @is_not
26
26
  expect_options.delete(:useInnerText) if expect_options.key?(:useInnerText) && expect_options[:useInnerText].nil?
27
27
 
28
28
  result = @frame.expect(nil, expression, expect_options, title)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.57.2.alpha1'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.57.0'
4
+ VERSION = '1.58.0'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.58.0'
6
6
  end
@@ -51,10 +51,11 @@ module Playwright
51
51
  def connect_over_cdp(
52
52
  endpointURL,
53
53
  headers: nil,
54
+ isLocal: nil,
54
55
  slowMo: nil,
55
56
  timeout: nil,
56
57
  &block)
57
- wrap_impl(@impl.connect_over_cdp(unwrap_impl(endpointURL), headers: unwrap_impl(headers), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
58
+ wrap_impl(@impl.connect_over_cdp(unwrap_impl(endpointURL), headers: unwrap_impl(headers), isLocal: unwrap_impl(isLocal), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), &wrap_block_call(block)))
58
59
  end
59
60
 
60
61
  #
@@ -95,7 +96,6 @@ module Playwright
95
96
  args: nil,
96
97
  channel: nil,
97
98
  chromiumSandbox: nil,
98
- devtools: nil,
99
99
  downloadsPath: nil,
100
100
  env: nil,
101
101
  executablePath: nil,
@@ -110,7 +110,7 @@ module Playwright
110
110
  timeout: nil,
111
111
  tracesDir: nil,
112
112
  &block)
113
- wrap_impl(@impl.launch(args: unwrap_impl(args), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), devtools: unwrap_impl(devtools), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), headless: unwrap_impl(headless), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), proxy: unwrap_impl(proxy), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), tracesDir: unwrap_impl(tracesDir), &wrap_block_call(block)))
113
+ wrap_impl(@impl.launch(args: unwrap_impl(args), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), headless: unwrap_impl(headless), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), proxy: unwrap_impl(proxy), slowMo: unwrap_impl(slowMo), timeout: unwrap_impl(timeout), tracesDir: unwrap_impl(tracesDir), &wrap_block_call(block)))
114
114
  end
115
115
 
116
116
  #
@@ -130,7 +130,6 @@ module Playwright
130
130
  colorScheme: nil,
131
131
  contrast: nil,
132
132
  deviceScaleFactor: nil,
133
- devtools: nil,
134
133
  downloadsPath: nil,
135
134
  env: nil,
136
135
  executablePath: nil,
@@ -171,7 +170,7 @@ module Playwright
171
170
  userAgent: nil,
172
171
  viewport: nil,
173
172
  &block)
174
- wrap_impl(@impl.launch_persistent_context(unwrap_impl(userDataDir), acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), devtools: unwrap_impl(devtools), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), hasTouch: unwrap_impl(hasTouch), headless: unwrap_impl(headless), httpCredentials: unwrap_impl(httpCredentials), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), slowMo: unwrap_impl(slowMo), strictSelectors: unwrap_impl(strictSelectors), timeout: unwrap_impl(timeout), timezoneId: unwrap_impl(timezoneId), tracesDir: unwrap_impl(tracesDir), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
173
+ wrap_impl(@impl.launch_persistent_context(unwrap_impl(userDataDir), acceptDownloads: unwrap_impl(acceptDownloads), args: unwrap_impl(args), baseURL: unwrap_impl(baseURL), bypassCSP: unwrap_impl(bypassCSP), channel: unwrap_impl(channel), chromiumSandbox: unwrap_impl(chromiumSandbox), clientCertificates: unwrap_impl(clientCertificates), colorScheme: unwrap_impl(colorScheme), contrast: unwrap_impl(contrast), deviceScaleFactor: unwrap_impl(deviceScaleFactor), downloadsPath: unwrap_impl(downloadsPath), env: unwrap_impl(env), executablePath: unwrap_impl(executablePath), extraHTTPHeaders: unwrap_impl(extraHTTPHeaders), firefoxUserPrefs: unwrap_impl(firefoxUserPrefs), forcedColors: unwrap_impl(forcedColors), geolocation: unwrap_impl(geolocation), handleSIGHUP: unwrap_impl(handleSIGHUP), handleSIGINT: unwrap_impl(handleSIGINT), handleSIGTERM: unwrap_impl(handleSIGTERM), hasTouch: unwrap_impl(hasTouch), headless: unwrap_impl(headless), httpCredentials: unwrap_impl(httpCredentials), ignoreDefaultArgs: unwrap_impl(ignoreDefaultArgs), ignoreHTTPSErrors: unwrap_impl(ignoreHTTPSErrors), isMobile: unwrap_impl(isMobile), javaScriptEnabled: unwrap_impl(javaScriptEnabled), locale: unwrap_impl(locale), noViewport: unwrap_impl(noViewport), offline: unwrap_impl(offline), permissions: unwrap_impl(permissions), proxy: unwrap_impl(proxy), record_har_content: unwrap_impl(record_har_content), record_har_mode: unwrap_impl(record_har_mode), record_har_omit_content: unwrap_impl(record_har_omit_content), record_har_path: unwrap_impl(record_har_path), record_har_url_filter: unwrap_impl(record_har_url_filter), record_video_dir: unwrap_impl(record_video_dir), record_video_size: unwrap_impl(record_video_size), reducedMotion: unwrap_impl(reducedMotion), screen: unwrap_impl(screen), serviceWorkers: unwrap_impl(serviceWorkers), slowMo: unwrap_impl(slowMo), strictSelectors: unwrap_impl(strictSelectors), timeout: unwrap_impl(timeout), timezoneId: unwrap_impl(timezoneId), tracesDir: unwrap_impl(tracesDir), userAgent: unwrap_impl(userAgent), viewport: unwrap_impl(viewport), &wrap_block_call(block)))
175
174
  end
176
175
 
177
176
  #
@@ -291,7 +291,7 @@ module Playwright
291
291
  end
292
292
 
293
293
  #
294
- # Returns locator description previously set with [`method: Locator.describe`]. Returns `null` if no custom description has been set. Prefer `Locator.toString()` for a human-readable representation, as it uses the description when available.
294
+ # Returns locator description previously set with [`method: Locator.describe`]. Returns `null` if no custom description has been set.
295
295
  #
296
296
  # **Usage**
297
297
  #
@@ -413,7 +413,7 @@ module Playwright
413
413
  # from playwright.sync_api import expect
414
414
  #
415
415
  # # ✓ Contains the right items in the right order
416
- # expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3", "Text 4"])
416
+ # expect(page.locator("ul > li")).to_contain_text(["Text 1", "Text 3"])
417
417
  #
418
418
  # # ✖ Wrong order
419
419
  # expect(page.locator("ul > li")).to_contain_text(["Text 3", "Text 2"])
@@ -1827,11 +1827,6 @@ module Playwright
1827
1827
  wrap_impl(@impl.start_js_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
1828
1828
  end
1829
1829
 
1830
- # @nodoc
1831
- def stop_css_coverage
1832
- wrap_impl(@impl.stop_css_coverage)
1833
- end
1834
-
1835
1830
  # @nodoc
1836
1831
  def stop_js_coverage
1837
1832
  wrap_impl(@impl.stop_js_coverage)
@@ -1847,6 +1842,11 @@ module Playwright
1847
1842
  wrap_impl(@impl.owned_context=(unwrap_impl(req)))
1848
1843
  end
1849
1844
 
1845
+ # @nodoc
1846
+ def stop_css_coverage
1847
+ wrap_impl(@impl.stop_css_coverage)
1848
+ end
1849
+
1850
1850
  # -- inherited from EventEmitter --
1851
1851
  # @nodoc
1852
1852
  def once(event, callback)
@@ -166,6 +166,18 @@ module Playwright
166
166
  wrap_impl(@impl.response)
167
167
  end
168
168
 
169
+ #
170
+ # The Service `Worker` that is performing the request.
171
+ #
172
+ # **Details**
173
+ #
174
+ # This method is Chromium only. It's safe to call when using other browsers, but it will always be `null`.
175
+ #
176
+ # Requests originated in a Service Worker do not have a [`method: Request.frame`] available.
177
+ def service_worker
178
+ raise NotImplementedError.new('service_worker is not implemented yet.')
179
+ end
180
+
169
181
  #
170
182
  # Returns resource size information for given request.
171
183
  def sizes
@@ -36,7 +36,10 @@ module Playwright
36
36
  #
37
37
  # [`method: Route.continue`] will immediately send the request to the network, other matching handlers won't be invoked. Use [`method: Route.fallback`] If you want next matching handler in the chain to be invoked.
38
38
  #
39
- # **NOTE**: The `Cookie` header cannot be overridden using this method. If a value is provided, it will be ignored, and the cookie will be loaded from the browser's cookie store. To set custom cookies, use [`method: BrowserContext.addCookies`].
39
+ # **NOTE**: Some request headers are **forbidden** and cannot be overridden (for example, `Cookie`, `Host`, `Content-Length` and others, see [this MDN page](https://developer.mozilla.org/en-US/docs/Glossary/Forbidden_request_header) for full list).
40
+ # If an override is provided for a forbidden header, it will be ignored and the original request header will be used.
41
+ #
42
+ # To set custom cookies, use [`method: BrowserContext.addCookies`].
40
43
  def continue(headers: nil, method: nil, postData: nil, url: nil)
41
44
  wrap_impl(@impl.continue(headers: unwrap_impl(headers), method: unwrap_impl(method), postData: unwrap_impl(postData), url: unwrap_impl(url)))
42
45
  end
data/sig/playwright.rbs CHANGED
@@ -237,7 +237,7 @@ module Playwright
237
237
  def location: -> Hash[untyped, untyped]
238
238
  def page: -> (nil | Page)
239
239
  def text: -> String
240
- def type: -> ("log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd")
240
+ def type: -> ("log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "time" | "timeEnd")
241
241
  def worker: -> (nil | Worker)
242
242
  end
243
243
 
@@ -431,10 +431,10 @@ module Playwright
431
431
  end
432
432
 
433
433
  class BrowserType
434
- def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
434
+ def connect_over_cdp: (String endpointURL, ?headers: Hash[untyped, untyped], ?isLocal: bool, ?slowMo: Float, ?timeout: Float) ?{ (untyped) -> untyped } -> Browser
435
435
  def executable_path: -> String
436
- def launch: (?args: Array[untyped], ?channel: String, ?chromiumSandbox: bool, ?devtools: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?firefoxUserPrefs: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?headless: bool, ?ignoreDefaultArgs: (bool | Array[untyped]), ?proxy: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float, ?tracesDir: (String | File)) ?{ (Browser) -> untyped } -> Browser
437
- def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?devtools: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreDefaultArgs: (bool | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
436
+ def launch: (?args: Array[untyped], ?channel: String, ?chromiumSandbox: bool, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?firefoxUserPrefs: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?headless: bool, ?ignoreDefaultArgs: (bool | Array[untyped]), ?proxy: Hash[untyped, untyped], ?slowMo: Float, ?timeout: Float, ?tracesDir: (String | File)) ?{ (Browser) -> untyped } -> Browser
437
+ def launch_persistent_context: ((String | File) userDataDir, ?acceptDownloads: bool, ?args: Array[untyped], ?baseURL: String, ?bypassCSP: bool, ?channel: String, ?chromiumSandbox: bool, ?clientCertificates: Array[untyped], ?colorScheme: ("light" | "dark" | "no-preference" | "null"), ?contrast: ("no-preference" | "more" | "null"), ?deviceScaleFactor: Float, ?downloadsPath: (String | File), ?env: Hash[untyped, untyped], ?executablePath: (String | File), ?extraHTTPHeaders: Hash[untyped, untyped], ?firefoxUserPrefs: Hash[untyped, untyped], ?forcedColors: ("active" | "none" | "null"), ?geolocation: Hash[untyped, untyped], ?handleSIGHUP: bool, ?handleSIGINT: bool, ?handleSIGTERM: bool, ?hasTouch: bool, ?headless: bool, ?httpCredentials: Hash[untyped, untyped], ?ignoreDefaultArgs: (bool | Array[untyped]), ?ignoreHTTPSErrors: bool, ?isMobile: bool, ?javaScriptEnabled: bool, ?locale: String, ?noViewport: bool, ?offline: bool, ?permissions: Array[untyped], ?proxy: Hash[untyped, untyped], ?record_har_content: ("omit" | "embed" | "attach"), ?record_har_mode: ("full" | "minimal"), ?record_har_omit_content: bool, ?record_har_path: (String | File), ?record_har_url_filter: (String | Regexp), ?record_video_dir: (String | File), ?record_video_size: Hash[untyped, untyped], ?reducedMotion: ("reduce" | "no-preference" | "null"), ?screen: Hash[untyped, untyped], ?serviceWorkers: ("allow" | "block"), ?slowMo: Float, ?strictSelectors: bool, ?timeout: Float, ?timezoneId: String, ?tracesDir: (String | File), ?userAgent: String, ?viewport: (nil | Hash[untyped, untyped])) ?{ (untyped) -> untyped } -> BrowserContext
438
438
  def name: -> String
439
439
  end
440
440
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playwright-ruby-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.57.2.alpha1
4
+ version: 1.58.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
@@ -435,5 +435,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
435
435
  requirements: []
436
436
  rubygems_version: 3.6.9
437
437
  specification_version: 4
438
- summary: The Ruby binding of playwright driver 1.57.0
438
+ summary: The Ruby binding of playwright driver 1.58.0
439
439
  test_files: []