playwright-ruby-client 1.53.0 → 1.54.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 22ec489327d6ba1f70552c2ff0d73b41e4a4ba6c02a898aa608dfe86cfdb3b14
4
- data.tar.gz: e41e3084aae362754ad8980bde6ef20e178edc87db72d4e845844802af02d77d
3
+ metadata.gz: 292b93df8ac7c9ea103673f017935907d53ea53a6e84b66d13723cb41c6c7fd9
4
+ data.tar.gz: b1d0d3325715881e7ae2ffc9fe04f32e8379189de794a498a041e36d1594ecaf
5
5
  SHA512:
6
- metadata.gz: 3232bcc3f42fc1ab80c1027f1b2af825d21903c9024c8253015d5892dc1f5022a2ef31a9689350e33a4a9e6ce9425a31e55dc38ed75e0142e674c66135ca82f8
7
- data.tar.gz: 29497adfd1e1bbcbef55eda2cdbc496e9a270d4500a082a071024afd519f01a9976bae5cc06c63a9c2f1825ca5afe86ed618017356add5015a5e0f15128bc72d
6
+ metadata.gz: 4bd08ce76baa61e7dc6b3aa724f20cc3d05ff576ab1b42cc93fed1c0a38c3fb205f8fd90530c95dd5349bcd650688104a34d1e79023b40fd1241d6b8c6f8c5d1
7
+ data.tar.gz: 63d9a00c126ed1fee420e530173b30970f7854522adc15f00e52aaa4049015b2461bd5512210e966ab0178ef18af19ce63de648a3bef88b668ff0cc39330680d
@@ -85,7 +85,7 @@ def browser
85
85
  ```
86
86
 
87
87
 
88
- Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
88
+ Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal browser, e.g. Android or Electron.
89
89
 
90
90
  ## clear_cookies
91
91
 
@@ -74,6 +74,3 @@ def type
74
74
  ```
75
75
 
76
76
 
77
- One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
78
- `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`,
79
- `'count'`, `'timeEnd'`.
@@ -530,6 +530,7 @@ Many html elements have an implicitly [defined role](https://w3c.github.io/html-
530
530
  ```
531
531
  def get_by_test_id(testId)
532
532
  ```
533
+ alias: `get_by_testid`
533
534
 
534
535
 
535
536
  Locate element by the test id.
@@ -176,6 +176,7 @@ Many html elements have an implicitly [defined role](https://w3c.github.io/html-
176
176
  ```
177
177
  def get_by_test_id(testId)
178
178
  ```
179
+ alias: `get_by_testid`
179
180
 
180
181
 
181
182
  Locate element by the test id.
@@ -741,6 +741,7 @@ Many html elements have an implicitly [defined role](https://w3c.github.io/html-
741
741
  ```
742
742
  def get_by_test_id(testId)
743
743
  ```
744
+ alias: `get_by_testid`
744
745
 
745
746
 
746
747
  Locate element by the test id.
@@ -7,6 +7,8 @@ sidebar_position: 10
7
7
 
8
8
  The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
9
9
 
10
+ **NOTE**: If you want to debug where the mouse moved, you can use the [Trace viewer](https://playwright.dev/python/docs/trace-viewer-intro) or [Playwright Inspector](https://playwright.dev/python/docs/running-tests). A red dot showing the location of the mouse will be shown for every mouse action.
11
+
10
12
  Every `page` object has its own Mouse, accessible with [Page#mouse](./page#mouse).
11
13
 
12
14
  ```ruby
@@ -724,6 +724,7 @@ Many html elements have an implicitly [defined role](https://w3c.github.io/html-
724
724
  ```
725
725
  def get_by_test_id(testId)
726
726
  ```
727
+ alias: `get_by_testid`
727
728
 
728
729
 
729
730
  Locate element by the test id.
@@ -15,7 +15,7 @@ playwright.chromium.launch(headless: false) do |browser|
15
15
  # This method call should be put just after creating BrowserContext.
16
16
  context.enable_debug_console!
17
17
 
18
- page = context.new_pagè
18
+ page = context.new_page
19
19
  page.goto('http://example.com/')
20
20
  page.pause
21
21
  end
@@ -25,6 +25,8 @@ However we may have trouble with bringing Playwright into:
25
25
 
26
26
  This article introduces a way to separate environments into client (for executing Playwright script) and server (for working with browsers). The main use-case assumes Docker (using Alpine Linux), however the way can be applied also into other use-cases.
27
27
 
28
+ ref: https://playwright.dev/docs/docker#remote-connection
29
+
28
30
  ## Overview
29
31
 
30
32
  Playwright Ruby client is running on Alpine Linux. It just sends/receives JSON messages of Playwright-protocol via WebSocket.
@@ -33,48 +35,25 @@ Playwright server is running on a container of [official Docker image](https://h
33
35
 
34
36
  ![overview](https://user-images.githubusercontent.com/11763113/124934448-ad4d0700-e03f-11eb-942e-b9f3282bb703.png)
35
37
 
36
- ### Playwright Server v.s. Browser Server
37
-
38
- Playwright provides two kind of methods to share the browser environments for clients.
39
-
40
- When you want to share only one browser environment, Browser server is suitable. This feature is officially supported in Playwright.
41
-
42
- - Server can be launched with [BrowserType#launchServer](https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server) instead of `BrowserType#launch`.
38
+ - Server can be launched with `npx playwright run-server` CLI command.
43
39
  - Client can connect to server with [BrowserType#connect](https://playwright.dev/docs/api/class-browsertype#browser-type-connect). In playwright-ruby-client, `BrowserType#connect` and not implemented yet and use `Playwright#connect_to_browser_server()` instead.
44
40
 
45
- Another method is sharing all browser environment. This method is very simple, but not an official feature, and can be changed in future.
46
-
47
- - Server can be launched with `playwright run-server` (CLI command).
48
- - Client can connect to server with `Playwright.connect_to_playwright_server` instead of `Playwright.create`
49
-
50
- ## Playwright server/client
51
-
52
- :::caution
53
-
54
- This method is no longer supported on Playwright driver >= 1.35. See [this issue](https://github.com/YusukeIwaki/playwright-ruby-client/issues/254) for detail, and use Browser server/client method instead.
55
-
56
- :::
57
-
58
41
  ### Client code
59
42
 
60
- Many example uses `Playwright#create`, which internally uses Pipe (stdin/stdout) transport for Playwright-protocol messaging. Instead, **just use `Playwright#connect_to_playwright_server(endpoint)`** for WebSocket transport.
43
+ Many example uses `Playwright#create`, which internally uses Pipe (stdin/stdout) transport for Playwright-protocol messaging. Instead, **use `Playwright#connect_to_browser_server(endpoint)`** for WebSocket transport.
61
44
 
62
45
  ```ruby {3}
63
46
  require 'playwright'
64
47
 
65
- Playwright.connect_to_playwright_server('wss://example.com:8888/ws?browser=chromium') do |playwright|
66
- playwright.chromium.launch do |browser|
67
- page = browser.new_page
68
- page.goto('https://github.com/microsoft/playwright')
69
- page.screenshot(path: 'github-microsoft-playwright.png')
70
- end
48
+ Playwright.connect_to_browser_server('wss://example.com:8888/ws') do |browser|
49
+ page = browser.new_page
50
+ page.goto('https://github.com/microsoft/playwright')
51
+ page.screenshot(path: 'github-microsoft-playwright.png')
71
52
  end
72
53
  ```
73
54
 
74
55
  `wss://example.com:8888/ws` is an example of endpoint URL of the Playwright server. In local development environment, it is typically `"ws://127.0.0.1:#{port}/ws"`.
75
56
 
76
- Note that `?browser=chromium` is important for server to determine which browser to prepare.
77
-
78
57
  ### Server code
79
58
 
80
59
  With the [official Docker image](https://hub.docker.com/_/microsoft-playwright) or in the local development environment with Node.js, just execute `npx playwright install && npx playwright run-server --port $PORT --path /ws`. (`$PORT` is a port number of the server)
@@ -91,45 +70,6 @@ ENV PORT 8888
91
70
  CMD ["./node_modules/.bin/playwright", "run-server", "--port", "$PORT", "--path", "/ws"]
92
71
  ```
93
72
 
94
- ## Browser server/client
95
-
96
- ### Client code
97
-
98
- Use `Playwright#connect_to_playwright_server` and pass the WebSocket URL for browser server.
99
- Note that this method requires a block with `Browser`, not `Playwright` or `BrowserType`.
100
-
101
- ```ruby
102
- Playwright.connect_to_playwright_server(ws_url) do |browser|
103
- page = browser.new_page
104
- page.goto(...)
105
- ...
106
- end
107
- ```
108
-
109
- ### Server code
110
-
111
- For instant use, `npx playwright launch-server --browser chromium` generates a WebSocket endpoint URL with a random path.
112
-
113
- More customization can be done by implementing JavaScript server like below:
114
-
115
- ```js
116
- const playwright = require("playwright");
117
-
118
- option = {
119
- channel: "chrome-canary",
120
- headless: false,
121
- port: 8080,
122
- wsPath: "ws",
123
- };
124
- playwright.chromium.launchServer(option).then((server) => {
125
- console.log(server.wsEndpoint());
126
- });
127
- ```
128
-
129
- `port` and `wsPath` would be useful for generating static WebSocket endpoint URL.
130
- Other available options for `BrowserType#launchServer` can be found here:
131
- https://playwright.dev/docs/api/class-browsertype#browser-type-launch-server
132
-
133
73
  ## Debugging for connection
134
74
 
135
75
  The client and server are really quiet. This chapter shows how to check if the communication on the WebSocket works well or not.
@@ -147,7 +87,7 @@ DEBUG=1 bundle exec ruby some-automation-with-playwright.rb
147
87
  Just set an environment variable `DEBUG=pw:*` or `DEBUG=pw:server`
148
88
 
149
89
  ```
150
- DEBUG=pw:* npx playwright launch-server --browser chromium
90
+ DEBUG=pw:* npx playwright run-server --browser chromium
151
91
  ```
152
92
 
153
93
  See [the official documentation](https://playwright.dev/docs/debug/#verbose-api-logs) for details.
@@ -93,10 +93,6 @@ module Playwright
93
93
  context.send(:update_options, context_options: context_options, browser_options: browser_options)
94
94
  end
95
95
 
96
- private def did_launch_browser(browser)
97
- browser.send(:update_browser_type, self)
98
- end
99
-
100
96
  private def update_with_playwright_selectors_options(options)
101
97
  selectors = @playwright&.selectors
102
98
  if selectors
@@ -666,7 +666,7 @@ module Playwright
666
666
  end
667
667
 
668
668
  def wait_for_timeout(timeout)
669
- @channel.send_message_to_server('waitForTimeout', timeout: timeout)
669
+ @channel.send_message_to_server('waitForTimeout', waitTimeout: timeout)
670
670
 
671
671
  nil
672
672
  end
@@ -688,6 +688,30 @@ module Playwright
688
688
  @channel.send_message_to_server('highlight', selector: selector)
689
689
  end
690
690
 
691
+ def expect(selector, expression, options, title)
692
+ if options.key?(:expectedValue)
693
+ options[:expectedValue] = JavaScript::ValueSerializer
694
+ .new(options[:expectedValue])
695
+ .serialize
696
+ end
697
+
698
+ result = @channel.send_message_to_server_result(
699
+ title, # title
700
+ "expect", # method
701
+ { # params
702
+ selector: selector,
703
+ expression: expression,
704
+ **options,
705
+ }.compact
706
+ )
707
+
708
+ if result.key?('received')
709
+ result['received'] = JavaScript::ValueParser.new(result['received']).parse
710
+ end
711
+
712
+ result
713
+ end
714
+
691
715
  # @param page [Page]
692
716
  # @note This method should be used internally. Accessed via .send method, so keep private!
693
717
  private def update_page_from_page(page)
@@ -335,9 +335,7 @@ module Playwright
335
335
  end
336
336
 
337
337
  def generate_locator_string
338
- with_element(timeout: nil) do |handle, _|
339
- handle.channel.send_message_to_server('generateLocatorString')
340
- end
338
+ @frame.channel.send_message_to_server('generateLocatorString', { selector: @selector })
341
339
  end
342
340
 
343
341
  def hover(
@@ -520,27 +518,7 @@ module Playwright
520
518
  end
521
519
 
522
520
  def expect(expression, options, title)
523
- if options.key?(:expectedValue)
524
- options[:expectedValue] = JavaScript::ValueSerializer
525
- .new(options[:expectedValue])
526
- .serialize
527
- end
528
-
529
- result = @frame.channel.send_message_to_server_result(
530
- title, # title
531
- "expect", # method
532
- { # params
533
- selector: @selector,
534
- expression: expression,
535
- **options,
536
- }
537
- )
538
-
539
- if result.key?('received')
540
- result['received'] = JavaScript::ValueParser.new(result['received']).parse
541
- end
542
-
543
- result
521
+ @frame.expect(@selector, expression, options, title)
544
522
  end
545
523
  end
546
524
  end
@@ -13,7 +13,7 @@ module Playwright
13
13
 
14
14
  def initialize(page, default_expect_timeout, is_not, message)
15
15
  @page = PlaywrightApi.unwrap(page)
16
- @locator = @page.locator(":root")
16
+ @frame = @page.main_frame
17
17
  @default_expect_timeout = default_expect_timeout
18
18
  @is_not = is_not
19
19
  @custom_message = message
@@ -25,7 +25,7 @@ module Playwright
25
25
  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
- result = @locator.expect(expression, expect_options, title)
28
+ result = @frame.expect(nil, expression, expect_options, title)
29
29
 
30
30
  if result["matches"] == @is_not
31
31
  actual = result["received"]
@@ -43,7 +43,7 @@ module Playwright
43
43
  # Terminate playwright-cli driver.
44
44
  def stop
45
45
  [@stdin, @stdout, @stderr].each { |io| io.close unless io.closed? }
46
- @thread&.terminate
46
+ @thread&.join
47
47
  end
48
48
 
49
49
  # Start `playwright-cli run-driver`
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Playwright
4
- VERSION = '1.53.0'
5
- COMPATIBLE_PLAYWRIGHT_VERSION = '1.53.0'
4
+ VERSION = '1.54.1'
5
+ COMPATIBLE_PLAYWRIGHT_VERSION = '1.54.1'
6
6
  end
@@ -62,9 +62,12 @@ module Playwright
62
62
  STATE_CLOSING = 2
63
63
  STATE_CLOSED = 3
64
64
 
65
- def initialize(url:, max_payload_size:)
65
+ def initialize(url:, max_payload_size:, headers:)
66
66
  @impl = DriverImpl.new(url)
67
67
  @driver = ::WebSocket::Driver.client(@impl, max_length: max_payload_size)
68
+ headers.each do |key, value|
69
+ @driver.set_header(key, value)
70
+ end
68
71
 
69
72
  setup
70
73
  end
@@ -6,8 +6,9 @@ module Playwright
6
6
  # ref: https://github.com/microsoft/playwright-python/blob/master/playwright/_impl/_transport.py
7
7
  class WebSocketTransport
8
8
  # @param ws_endpoint [String] EndpointURL of WebSocket
9
- def initialize(ws_endpoint:)
9
+ def initialize(ws_endpoint:, headers:)
10
10
  @ws_endpoint = ws_endpoint
11
+ @headers = headers
11
12
  @debug = ENV['DEBUG'].to_s == 'true' || ENV['DEBUG'].to_s == '1'
12
13
  end
13
14
 
@@ -63,6 +64,7 @@ module Playwright
63
64
  ws = WebSocketClient.new(
64
65
  url: @ws_endpoint,
65
66
  max_payload_size: 256 * 1024 * 1024, # 256MB
67
+ headers: @headers,
66
68
  )
67
69
  promise = Concurrent::Promises.resolvable_future
68
70
  ws.on_open do
data/lib/playwright.rb CHANGED
@@ -102,14 +102,7 @@ module Playwright
102
102
  end
103
103
  end
104
104
 
105
- # Connects to Playwright server, launched by `npx playwright run-server` via WebSocket transport.
106
- #
107
- # Playwright.connect_to_playwright_server(...) do |playwright|
108
- # browser = playwright.chromium.launch
109
- # ...
110
- # end
111
- #
112
- # @experimental
105
+ # @Deprecated. Playwright >= 1.54 does not support this method.
113
106
  module_function def connect_to_playwright_server(ws_endpoint, &block)
114
107
  require 'playwright/web_socket_client'
115
108
  require 'playwright/web_socket_transport'
@@ -138,7 +131,7 @@ module Playwright
138
131
  end
139
132
  end
140
133
 
141
- # Connects to Playwright server, launched by `npx playwright launch-server chromium` or `playwright.chromium.launchServer()`
134
+ # Connects to Playwright server, launched by `npx playwright launch-server --browser chromium` or `npx playwright run-server`
142
135
  #
143
136
  # Playwright.connect_to_browser_server('ws://....') do |browser|
144
137
  # page = browser.new_page
@@ -146,11 +139,19 @@ module Playwright
146
139
  # end
147
140
  #
148
141
  # @experimental
149
- module_function def connect_to_browser_server(ws_endpoint, &block)
142
+ module_function def connect_to_browser_server(ws_endpoint, browser_type: 'chromium', &block)
143
+ known_browser_types = ['chromium', 'firefox', 'webkit']
144
+ unless known_browser_types.include?(browser_type)
145
+ raise ArgumentError, "Unknown browser type: #{browser_type}. Known types are: #{known_browser_types.join(', ')}"
146
+ end
147
+
150
148
  require 'playwright/web_socket_client'
151
149
  require 'playwright/web_socket_transport'
152
150
 
153
- transport = WebSocketTransport.new(ws_endpoint: ws_endpoint)
151
+ transport = WebSocketTransport.new(
152
+ ws_endpoint: ws_endpoint,
153
+ headers: { 'x-playwright-browser' => browser_type },
154
+ )
154
155
  connection = Connection.new(transport)
155
156
  connection.mark_as_remote
156
157
  connection.async_run
@@ -159,8 +160,7 @@ module Playwright
159
160
  begin
160
161
  playwright = connection.initialize_playwright
161
162
  browser = playwright.send(:pre_launched_browser)
162
- browser.send(:update_browser_type, playwright.chromium) # Just workaround for nil reference error.
163
- browser.browser_type.send(:did_launch_browser, browser)
163
+ browser.send(:connect_to_browser_type, playwright.send(browser_type), nil)
164
164
  browser.send(:should_close_connection_on_close!)
165
165
  Execution.new(connection, PlaywrightApi.wrap(playwright), PlaywrightApi.wrap(browser))
166
166
  rescue
@@ -179,7 +179,7 @@ module Playwright
179
179
  end
180
180
  end
181
181
 
182
- # Connects to Playwright server, launched by `npx playwright launch-server chromium` or `playwright.chromium.launchServer()`
182
+ # Connects to Playwright server, launched by `npx playwright launch-server --browser _android` or `playwright._android.launchServer()`
183
183
  #
184
184
  # Playwright.connect_to_android_server('ws://....') do |browser|
185
185
  # page = browser.new_page
@@ -80,7 +80,7 @@ module Playwright
80
80
  end
81
81
 
82
82
  #
83
- # Returns the browser instance of the context. If it was launched as a persistent context null gets returned.
83
+ # Gets the browser instance that owns the context. Returns `null` if the context is created outside of normal browser, e.g. Android or Electron.
84
84
  def browser
85
85
  wrap_impl(@impl.browser)
86
86
  end
@@ -45,10 +45,6 @@ module Playwright
45
45
  wrap_impl(@impl.text)
46
46
  end
47
47
 
48
- #
49
- # One of the following values: `'log'`, `'debug'`, `'info'`, `'error'`, `'warning'`, `'dir'`, `'dirxml'`, `'table'`,
50
- # `'trace'`, `'clear'`, `'startGroup'`, `'startGroupCollapsed'`, `'endGroup'`, `'assert'`, `'profile'`, `'profileEnd'`,
51
- # `'count'`, `'timeEnd'`.
52
48
  def type
53
49
  wrap_impl(@impl.type)
54
50
  end
@@ -487,6 +487,7 @@ module Playwright
487
487
  def get_by_test_id(testId)
488
488
  wrap_impl(@impl.get_by_test_id(unwrap_impl(testId)))
489
489
  end
490
+ alias_method :get_by_testid, :get_by_test_id
490
491
 
491
492
  #
492
493
  # Allows locating elements that contain given text.
@@ -1043,6 +1044,11 @@ module Playwright
1043
1044
  wrap_impl(@impl.highlight(unwrap_impl(selector)))
1044
1045
  end
1045
1046
 
1047
+ # @nodoc
1048
+ def expect(selector, expression, options, title)
1049
+ wrap_impl(@impl.expect(unwrap_impl(selector), unwrap_impl(expression), unwrap_impl(options), unwrap_impl(title)))
1050
+ end
1051
+
1046
1052
  # @nodoc
1047
1053
  def detached=(req)
1048
1054
  wrap_impl(@impl.detached=(unwrap_impl(req)))
@@ -170,6 +170,7 @@ module Playwright
170
170
  def get_by_test_id(testId)
171
171
  wrap_impl(@impl.get_by_test_id(unwrap_impl(testId)))
172
172
  end
173
+ alias_method :get_by_testid, :get_by_test_id
173
174
 
174
175
  #
175
176
  # Allows locating elements that contain given text.
@@ -661,6 +661,7 @@ module Playwright
661
661
  def get_by_test_id(testId)
662
662
  wrap_impl(@impl.get_by_test_id(unwrap_impl(testId)))
663
663
  end
664
+ alias_method :get_by_testid, :get_by_test_id
664
665
 
665
666
  #
666
667
  # Allows locating elements that contain given text.
@@ -2,6 +2,8 @@ module Playwright
2
2
  #
3
3
  # The Mouse class operates in main-frame CSS pixels relative to the top-left corner of the viewport.
4
4
  #
5
+ # **NOTE**: If you want to debug where the mouse moved, you can use the [Trace viewer](../trace-viewer-intro.md) or [Playwright Inspector](../running-tests.md). A red dot showing the location of the mouse will be shown for every mouse action.
6
+ #
5
7
  # Every `page` object has its own Mouse, accessible with [`property: Page.mouse`].
6
8
  #
7
9
  # ```python sync
@@ -716,6 +716,7 @@ module Playwright
716
716
  def get_by_test_id(testId)
717
717
  wrap_impl(@impl.get_by_test_id(unwrap_impl(testId)))
718
718
  end
719
+ alias_method :get_by_testid, :get_by_test_id
719
720
 
720
721
  #
721
722
  # Allows locating elements that contain given text.
data/sig/playwright.rbs CHANGED
@@ -170,6 +170,7 @@ module Playwright
170
170
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
171
171
  def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
172
172
  def get_by_test_id: ((String | Regexp) testId) -> Locator
173
+ def get_by_testid: ((String | Regexp) testId) -> Locator
173
174
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
174
175
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
175
176
  def goto: (String url, ?referer: String, ?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
@@ -239,7 +240,7 @@ module Playwright
239
240
  def location: -> Hash[untyped, untyped]
240
241
  def page: -> (nil | Page)
241
242
  def text: -> String
242
- def type: -> String
243
+ def type: -> ("log" | "debug" | "info" | "error" | "warning" | "dir" | "dirxml" | "table" | "trace" | "clear" | "startGroup" | "startGroupCollapsed" | "endGroup" | "assert" | "profile" | "profileEnd" | "count" | "timeEnd")
243
244
  end
244
245
 
245
246
  class Dialog
@@ -293,6 +294,7 @@ module Playwright
293
294
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
294
295
  def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
295
296
  def get_by_test_id: ((String | Regexp) testId) -> Locator
297
+ def get_by_testid: ((String | Regexp) testId) -> Locator
296
298
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
297
299
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
298
300
  def go_back: (?timeout: Float, ?waitUntil: ("load" | "domcontentloaded" | "networkidle" | "commit")) -> (nil | Response)
@@ -487,6 +489,7 @@ module Playwright
487
489
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
488
490
  def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
489
491
  def get_by_test_id: ((String | Regexp) testId) -> Locator
492
+ def get_by_testid: ((String | Regexp) testId) -> Locator
490
493
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
491
494
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
492
495
  def highlight: -> void
@@ -530,6 +533,7 @@ module Playwright
530
533
  def get_by_placeholder: ((String | Regexp) text, ?exact: bool) -> Locator
531
534
  def get_by_role: (("alert" | "alertdialog" | "application" | "article" | "banner" | "blockquote" | "button" | "caption" | "cell" | "checkbox" | "code" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "deletion" | "dialog" | "directory" | "document" | "emphasis" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "insertion" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "meter" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "navigation" | "none" | "note" | "option" | "paragraph" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "strong" | "subscript" | "superscript" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "time" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem") role, ?checked: bool, ?disabled: bool, ?exact: bool, ?expanded: bool, ?includeHidden: bool, ?level: Integer, ?name: (String | Regexp), ?pressed: bool, ?selected: bool) -> Locator
532
535
  def get_by_test_id: ((String | Regexp) testId) -> Locator
536
+ def get_by_testid: ((String | Regexp) testId) -> Locator
533
537
  def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
534
538
  def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
535
539
  def last: -> FrameLocator
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.53.0
4
+ version: 1.54.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - YusukeIwaki
@@ -409,5 +409,5 @@ required_rubygems_version: !ruby/object:Gem::Requirement
409
409
  requirements: []
410
410
  rubygems_version: 3.6.9
411
411
  specification_version: 4
412
- summary: The Ruby binding of playwright driver 1.53.0
412
+ summary: The Ruby binding of playwright driver 1.54.1
413
413
  test_files: []