playwright-ruby-client 1.32.0 → 1.33.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/frame.md +6 -1
- data/documentation/docs/api/frame_locator.md +6 -1
- data/documentation/docs/api/locator.md +35 -3
- data/documentation/docs/api/page.md +6 -1
- data/documentation/docs/api/route.md +1 -0
- data/documentation/docs/include/api_coverage.md +1 -0
- data/lib/playwright/channel_owners/frame.rb +14 -2
- data/lib/playwright/channel_owners/page.rb +12 -2
- data/lib/playwright/channel_owners/request.rb +6 -1
- data/lib/playwright/channel_owners/route.rb +5 -2
- data/lib/playwright/frame_locator_impl.rb +9 -3
- data/lib/playwright/locator_impl.rb +39 -10
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/frame.rb +7 -2
- data/lib/playwright_api/frame_locator.rb +7 -2
- data/lib/playwright_api/locator.rb +33 -5
- data/lib/playwright_api/page.rb +12 -7
- data/lib/playwright_api/route.rb +2 -1
- data/sig/playwright.rbs +7 -6
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ebc7a6ffab254ce53486bcaf8ad642a42fbadd77f33f48598ee721935f795c98
|
4
|
+
data.tar.gz: bf6473ce5c3ea31bdcca4f072b68aeb4b1b49b0ffb24cc39a7d17955e5de49cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1e36fed96c70031d7b78ffffe1b3408251fb86b64afb634304d8fe3434b263de696e99b42cb330bb75b2f68a80683caf56e050dddf1b9ead61d97f2dd885b270
|
7
|
+
data.tar.gz: eb7607a301b420b0c3c587dfa562eccf459a943e425da930c7739a2faccb46888dbfeb84bd83953ef8eb1446322cdc8cd4c4e58f3ca71515999e11dfcd3ba121
|
@@ -779,7 +779,12 @@ Returns whether the element is [visible](https://playwright.dev/python/docs/acti
|
|
779
779
|
## locator
|
780
780
|
|
781
781
|
```
|
782
|
-
def locator(
|
782
|
+
def locator(
|
783
|
+
selector,
|
784
|
+
has: nil,
|
785
|
+
hasNot: nil,
|
786
|
+
hasNotText: nil,
|
787
|
+
hasText: nil)
|
783
788
|
```
|
784
789
|
|
785
790
|
|
@@ -284,7 +284,12 @@ Returns locator to the last matching frame.
|
|
284
284
|
## locator
|
285
285
|
|
286
286
|
```
|
287
|
-
def locator(
|
287
|
+
def locator(
|
288
|
+
selectorOrLocator,
|
289
|
+
has: nil,
|
290
|
+
hasNot: nil,
|
291
|
+
hasNotText: nil,
|
292
|
+
hasText: nil)
|
288
293
|
```
|
289
294
|
|
290
295
|
|
@@ -20,7 +20,11 @@ def all
|
|
20
20
|
When locator points to a list of elements, returns array of locators, pointing
|
21
21
|
to respective elements.
|
22
22
|
|
23
|
-
|
23
|
+
**NOTE**: [Locator#all](./locator#all) does not wait for elements to match the locator, and instead immediately returns whatever is present in the page.
|
24
|
+
|
25
|
+
When the list of elements changes dynamically, [Locator#all](./locator#all) will produce unpredictable and flaky results.
|
26
|
+
|
27
|
+
When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before calling [Locator#all](./locator#all).
|
24
28
|
|
25
29
|
**Usage**
|
26
30
|
|
@@ -443,7 +447,7 @@ To send fine-grained keyboard events, use [Locator#type](./locator#type).
|
|
443
447
|
## filter
|
444
448
|
|
445
449
|
```
|
446
|
-
def filter(has: nil, hasText: nil)
|
450
|
+
def filter(has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
447
451
|
```
|
448
452
|
|
449
453
|
|
@@ -915,7 +919,12 @@ banana = page.get_by_role("listitem").last
|
|
915
919
|
## locator
|
916
920
|
|
917
921
|
```
|
918
|
-
def locator(
|
922
|
+
def locator(
|
923
|
+
selectorOrLocator,
|
924
|
+
has: nil,
|
925
|
+
hasNot: nil,
|
926
|
+
hasNotText: nil,
|
927
|
+
hasText: nil)
|
919
928
|
```
|
920
929
|
|
921
930
|
|
@@ -938,6 +947,29 @@ Returns locator to the n-th matching element. It's zero based, `nth(0)` selects
|
|
938
947
|
banana = page.get_by_role("listitem").nth(2)
|
939
948
|
```
|
940
949
|
|
950
|
+
## or
|
951
|
+
|
952
|
+
```
|
953
|
+
def or(locator)
|
954
|
+
```
|
955
|
+
|
956
|
+
|
957
|
+
Creates a locator that matches either of the two locators.
|
958
|
+
|
959
|
+
**Usage**
|
960
|
+
|
961
|
+
Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.
|
962
|
+
|
963
|
+
```ruby
|
964
|
+
new_email = page.get_by_role("button", name: "New")
|
965
|
+
dialog = page.get_by_text("Confirm security settings")
|
966
|
+
new_email.or(dialog).wait_for(state: 'visible')
|
967
|
+
if dialog.visible?
|
968
|
+
page.get_by_role("button", name: "Dismiss").click
|
969
|
+
end
|
970
|
+
new_email.click
|
971
|
+
```
|
972
|
+
|
941
973
|
## page
|
942
974
|
|
943
975
|
```
|
@@ -1015,7 +1015,12 @@ Returns whether the element is [visible](https://playwright.dev/python/docs/acti
|
|
1015
1015
|
## locator
|
1016
1016
|
|
1017
1017
|
```
|
1018
|
-
def locator(
|
1018
|
+
def locator(
|
1019
|
+
selector,
|
1020
|
+
has: nil,
|
1021
|
+
hasNot: nil,
|
1022
|
+
hasNotText: nil,
|
1023
|
+
hasText: nil)
|
1019
1024
|
```
|
1020
1025
|
|
1021
1026
|
|
@@ -418,8 +418,20 @@ module Playwright
|
|
418
418
|
nil
|
419
419
|
end
|
420
420
|
|
421
|
-
def locator(
|
422
|
-
|
421
|
+
def locator(
|
422
|
+
selector,
|
423
|
+
has: nil,
|
424
|
+
hasNot: nil,
|
425
|
+
hasNotText: nil,
|
426
|
+
hasText: nil)
|
427
|
+
LocatorImpl.new(
|
428
|
+
frame: self,
|
429
|
+
timeout_settings: @page.send(:timeout_settings),
|
430
|
+
selector: selector,
|
431
|
+
has: has,
|
432
|
+
hasNot: hasNot,
|
433
|
+
hasNotText: hasNotText,
|
434
|
+
hasText: hasText)
|
423
435
|
end
|
424
436
|
|
425
437
|
def frame_locator(selector)
|
@@ -614,8 +614,18 @@ module Playwright
|
|
614
614
|
timeout: timeout)
|
615
615
|
end
|
616
616
|
|
617
|
-
def locator(
|
618
|
-
|
617
|
+
def locator(
|
618
|
+
selector,
|
619
|
+
has: nil,
|
620
|
+
hasNot: nil,
|
621
|
+
hasNotText: nil,
|
622
|
+
hasText: nil)
|
623
|
+
@main_frame.locator(
|
624
|
+
selector,
|
625
|
+
has: has,
|
626
|
+
hasNot: hasNot,
|
627
|
+
hasNotText: hasNotText,
|
628
|
+
hasText: hasText)
|
619
629
|
end
|
620
630
|
|
621
631
|
def frame_locator(selector)
|
@@ -19,6 +19,7 @@ module Playwright
|
|
19
19
|
responseEnd: -1,
|
20
20
|
}
|
21
21
|
@fallback_overrides = {}
|
22
|
+
@url = @initializer['url']
|
22
23
|
end
|
23
24
|
|
24
25
|
private def fallback_overrides
|
@@ -35,7 +36,11 @@ module Playwright
|
|
35
36
|
end
|
36
37
|
|
37
38
|
def url
|
38
|
-
@fallback_overrides[:url] || @
|
39
|
+
@fallback_overrides[:url] || @url
|
40
|
+
end
|
41
|
+
|
42
|
+
private def internal_url
|
43
|
+
@url
|
39
44
|
end
|
40
45
|
|
41
46
|
def resource_type
|
@@ -21,7 +21,7 @@ module Playwright
|
|
21
21
|
|
22
22
|
def abort(errorCode: nil)
|
23
23
|
handling_with_result(true) do
|
24
|
-
params = { errorCode: errorCode }.compact
|
24
|
+
params = { requestUrl: request.send(:internal_url), errorCode: errorCode }.compact
|
25
25
|
# TODO _race_with_page_close
|
26
26
|
@channel.async_send_message_to_server('abort', params)
|
27
27
|
end
|
@@ -91,6 +91,7 @@ module Playwright
|
|
91
91
|
|
92
92
|
params[:status] = option_status || 200
|
93
93
|
params[:headers] = HttpHeaders.new(param_headers).as_serialized
|
94
|
+
params[:requestUrl] = request.send(:internal_url)
|
94
95
|
|
95
96
|
@channel.async_send_message_to_server('fulfill', params)
|
96
97
|
end
|
@@ -109,7 +110,7 @@ module Playwright
|
|
109
110
|
end
|
110
111
|
end
|
111
112
|
|
112
|
-
def fetch(headers: nil, method: nil, postData: nil, url: nil, maxRedirects: nil)
|
113
|
+
def fetch(headers: nil, method: nil, postData: nil, url: nil, maxRedirects: nil, timeout: nil)
|
113
114
|
api_request_context = request.frame.page.context.request
|
114
115
|
api_request_context.send(:_inner_fetch,
|
115
116
|
request,
|
@@ -118,6 +119,7 @@ module Playwright
|
|
118
119
|
method: method,
|
119
120
|
data: postData,
|
120
121
|
maxRedirects: maxRedirects,
|
122
|
+
timeout: timeout,
|
121
123
|
)
|
122
124
|
end
|
123
125
|
|
@@ -152,6 +154,7 @@ module Playwright
|
|
152
154
|
if post_data_for_wire
|
153
155
|
params[:postData] = post_data_for_wire
|
154
156
|
end
|
157
|
+
params[:requestUrl] = request.send(:internal_url)
|
155
158
|
|
156
159
|
# TODO _race_with_page_close
|
157
160
|
@channel.async_send_message_to_server('continue', params)
|
@@ -10,14 +10,20 @@ module Playwright
|
|
10
10
|
@frame_selector = frame_selector
|
11
11
|
end
|
12
12
|
|
13
|
-
def locator(
|
13
|
+
def locator(
|
14
|
+
selector,
|
15
|
+
has: nil,
|
16
|
+
hasNot: nil,
|
17
|
+
hasNotText: nil,
|
18
|
+
hasText: nil)
|
14
19
|
LocatorImpl.new(
|
15
20
|
frame: @frame,
|
16
21
|
timeout_settings: @timeout_settings,
|
17
22
|
selector: "#{@frame_selector} >> internal:control=enter-frame >> #{selector}",
|
18
|
-
hasText: hasText,
|
19
23
|
has: has,
|
20
|
-
|
24
|
+
hasNot: hasNot,
|
25
|
+
hasNotText: hasNotText,
|
26
|
+
hasText: hasText)
|
21
27
|
end
|
22
28
|
|
23
29
|
def frame_locator(selector)
|
@@ -5,7 +5,7 @@ module Playwright
|
|
5
5
|
define_api_implementation :LocatorImpl do
|
6
6
|
include LocatorUtils
|
7
7
|
|
8
|
-
def initialize(frame:, timeout_settings:, selector:,
|
8
|
+
def initialize(frame:, timeout_settings:, selector:, has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
9
9
|
@frame = frame
|
10
10
|
@timeout_settings = timeout_settings
|
11
11
|
selector_scopes = [selector]
|
@@ -16,11 +16,22 @@ module Playwright
|
|
16
16
|
|
17
17
|
if has
|
18
18
|
unless same_frame?(has)
|
19
|
-
raise DifferentFrameError.new
|
19
|
+
raise DifferentFrameError.new('has')
|
20
20
|
end
|
21
21
|
selector_scopes << "internal:has=#{has.send(:selector_json)}"
|
22
22
|
end
|
23
23
|
|
24
|
+
if hasNotText
|
25
|
+
selector_scopes << "internal:has-not-text=#{escape_for_text_selector(hasNotText, false)}"
|
26
|
+
end
|
27
|
+
|
28
|
+
if hasNot
|
29
|
+
unless same_frame?(hasNot)
|
30
|
+
raise DifferentFrameError.new('hasNot')
|
31
|
+
end
|
32
|
+
selector_scopes << "internal:has-not=#{hasNot.send(:selector_json)}"
|
33
|
+
end
|
34
|
+
|
24
35
|
@selector = selector_scopes.join(' >> ')
|
25
36
|
end
|
26
37
|
|
@@ -36,8 +47,8 @@ module Playwright
|
|
36
47
|
end
|
37
48
|
|
38
49
|
class DifferentFrameError < StandardError
|
39
|
-
def initialize
|
40
|
-
super(
|
50
|
+
def initialize(method_name)
|
51
|
+
super("Inner \"#{method_name}\" locator must belong to the same frame.")
|
41
52
|
end
|
42
53
|
end
|
43
54
|
|
@@ -190,14 +201,20 @@ module Playwright
|
|
190
201
|
@frame.fill(@selector, '', strict: true, force: force, noWaitAfter: noWaitAfter, timeout: timeout)
|
191
202
|
end
|
192
203
|
|
193
|
-
def locator(
|
204
|
+
def locator(
|
205
|
+
selector,
|
206
|
+
has: nil,
|
207
|
+
hasNot: nil,
|
208
|
+
hasNotText: nil,
|
209
|
+
hasText: nil)
|
194
210
|
LocatorImpl.new(
|
195
211
|
frame: @frame,
|
196
212
|
timeout_settings: @timeout_settings,
|
197
213
|
selector: "#{@selector} >> #{selector}",
|
198
|
-
hasText: hasText,
|
199
214
|
has: has,
|
200
|
-
|
215
|
+
hasNot: hasNot,
|
216
|
+
hasNotText: hasNotText,
|
217
|
+
hasText: hasText)
|
201
218
|
end
|
202
219
|
|
203
220
|
def frame_locator(selector)
|
@@ -216,14 +233,15 @@ module Playwright
|
|
216
233
|
@frame.query_selector_all(@selector)
|
217
234
|
end
|
218
235
|
|
219
|
-
def filter(has: nil, hasText: nil)
|
236
|
+
def filter(has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
220
237
|
LocatorImpl.new(
|
221
238
|
frame: @frame,
|
222
239
|
timeout_settings: @timeout_settings,
|
223
240
|
selector: @selector,
|
224
|
-
hasText: hasText,
|
225
241
|
has: has,
|
226
|
-
|
242
|
+
hasNot: hasNot,
|
243
|
+
hasNotText: hasNotText,
|
244
|
+
hasText: hasText)
|
227
245
|
end
|
228
246
|
|
229
247
|
def first
|
@@ -250,6 +268,17 @@ module Playwright
|
|
250
268
|
)
|
251
269
|
end
|
252
270
|
|
271
|
+
def or(locator)
|
272
|
+
unless same_frame?(locator)
|
273
|
+
raise DifferentFrameError.new('locator')
|
274
|
+
end
|
275
|
+
LocatorImpl.new(
|
276
|
+
frame: @frame,
|
277
|
+
timeout_settings: @timeout_settings,
|
278
|
+
selector: "#{@selector} >> internal:or=#{locator.send(:selector_json)}",
|
279
|
+
)
|
280
|
+
end
|
281
|
+
|
253
282
|
def focus(timeout: nil)
|
254
283
|
@frame.focus(@selector, strict: true, timeout: timeout)
|
255
284
|
end
|
data/lib/playwright/version.rb
CHANGED
data/lib/playwright_api/frame.rb
CHANGED
@@ -664,8 +664,13 @@ module Playwright
|
|
664
664
|
# [Learn more about locators](../locators.md).
|
665
665
|
#
|
666
666
|
# [Learn more about locators](../locators.md).
|
667
|
-
def locator(
|
668
|
-
|
667
|
+
def locator(
|
668
|
+
selector,
|
669
|
+
has: nil,
|
670
|
+
hasNot: nil,
|
671
|
+
hasNotText: nil,
|
672
|
+
hasText: nil)
|
673
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText)))
|
669
674
|
end
|
670
675
|
|
671
676
|
#
|
@@ -241,8 +241,13 @@ module Playwright
|
|
241
241
|
# The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to [`method: Locator.filter`] method.
|
242
242
|
#
|
243
243
|
# [Learn more about locators](../locators.md).
|
244
|
-
def locator(
|
245
|
-
|
244
|
+
def locator(
|
245
|
+
selectorOrLocator,
|
246
|
+
has: nil,
|
247
|
+
hasNot: nil,
|
248
|
+
hasNotText: nil,
|
249
|
+
hasText: nil)
|
250
|
+
wrap_impl(@impl.locator(unwrap_impl(selectorOrLocator), has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText)))
|
246
251
|
end
|
247
252
|
|
248
253
|
#
|
@@ -10,7 +10,11 @@ module Playwright
|
|
10
10
|
# When locator points to a list of elements, returns array of locators, pointing
|
11
11
|
# to respective elements.
|
12
12
|
#
|
13
|
-
#
|
13
|
+
# **NOTE**: [`method: Locator.all`] does not wait for elements to match the locator, and instead immediately returns whatever is present in the page.
|
14
|
+
#
|
15
|
+
# When the list of elements changes dynamically, [`method: Locator.all`] will produce unpredictable and flaky results.
|
16
|
+
#
|
17
|
+
# When the list of elements is stable, but loaded dynamically, wait for the full list to finish loading before calling [`method: Locator.all`].
|
14
18
|
#
|
15
19
|
# **Usage**
|
16
20
|
#
|
@@ -393,8 +397,8 @@ module Playwright
|
|
393
397
|
# .filter(has=page.get_by_role("button", name="column 2 button"))
|
394
398
|
# .screenshot()
|
395
399
|
# ```
|
396
|
-
def filter(has: nil, hasText: nil)
|
397
|
-
wrap_impl(@impl.filter(has: unwrap_impl(has), hasText: unwrap_impl(hasText)))
|
400
|
+
def filter(has: nil, hasNot: nil, hasNotText: nil, hasText: nil)
|
401
|
+
wrap_impl(@impl.filter(has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText)))
|
398
402
|
end
|
399
403
|
|
400
404
|
#
|
@@ -773,8 +777,13 @@ module Playwright
|
|
773
777
|
# The method finds an element matching the specified selector in the locator's subtree. It also accepts filter options, similar to [`method: Locator.filter`] method.
|
774
778
|
#
|
775
779
|
# [Learn more about locators](../locators.md).
|
776
|
-
def locator(
|
777
|
-
|
780
|
+
def locator(
|
781
|
+
selectorOrLocator,
|
782
|
+
has: nil,
|
783
|
+
hasNot: nil,
|
784
|
+
hasNotText: nil,
|
785
|
+
hasText: nil)
|
786
|
+
wrap_impl(@impl.locator(unwrap_impl(selectorOrLocator), has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText)))
|
778
787
|
end
|
779
788
|
|
780
789
|
#
|
@@ -789,6 +798,25 @@ module Playwright
|
|
789
798
|
wrap_impl(@impl.nth(unwrap_impl(index)))
|
790
799
|
end
|
791
800
|
|
801
|
+
#
|
802
|
+
# Creates a locator that matches either of the two locators.
|
803
|
+
#
|
804
|
+
# **Usage**
|
805
|
+
#
|
806
|
+
# Consider a scenario where you'd like to click on a "New email" button, but sometimes a security settings dialog shows up instead. In this case, you can wait for either a "New email" button, or a dialog and act accordingly.
|
807
|
+
#
|
808
|
+
# ```python sync
|
809
|
+
# new_email = page.get_by_role("button", name="New")
|
810
|
+
# dialog = page.get_by_text("Confirm security settings")
|
811
|
+
# expect(new_email.or_(dialog)).to_be_visible()
|
812
|
+
# if (dialog.is_visible())
|
813
|
+
# page.get_by_role("button", name="Dismiss").click()
|
814
|
+
# new_email.click()
|
815
|
+
# ```
|
816
|
+
def or(locator)
|
817
|
+
wrap_impl(@impl.or(unwrap_impl(locator)))
|
818
|
+
end
|
819
|
+
|
792
820
|
#
|
793
821
|
# A page this locator belongs to.
|
794
822
|
def page
|
data/lib/playwright_api/page.rb
CHANGED
@@ -916,8 +916,13 @@ module Playwright
|
|
916
916
|
# Locator is resolved to the element immediately before performing an action, so a series of actions on the same locator can in fact be performed on different DOM elements. That would happen if the DOM structure between those actions has changed.
|
917
917
|
#
|
918
918
|
# [Learn more about locators](../locators.md).
|
919
|
-
def locator(
|
920
|
-
|
919
|
+
def locator(
|
920
|
+
selector,
|
921
|
+
has: nil,
|
922
|
+
hasNot: nil,
|
923
|
+
hasNotText: nil,
|
924
|
+
hasText: nil)
|
925
|
+
wrap_impl(@impl.locator(unwrap_impl(selector), has: unwrap_impl(has), hasNot: unwrap_impl(hasNot), hasNotText: unwrap_impl(hasNotText), hasText: unwrap_impl(hasText)))
|
921
926
|
end
|
922
927
|
|
923
928
|
#
|
@@ -1667,6 +1672,11 @@ module Playwright
|
|
1667
1672
|
raise NotImplementedError.new('wait_for_event is not implemented yet.')
|
1668
1673
|
end
|
1669
1674
|
|
1675
|
+
# @nodoc
|
1676
|
+
def stop_css_coverage
|
1677
|
+
wrap_impl(@impl.stop_css_coverage)
|
1678
|
+
end
|
1679
|
+
|
1670
1680
|
# @nodoc
|
1671
1681
|
def owned_context=(req)
|
1672
1682
|
wrap_impl(@impl.owned_context=(unwrap_impl(req)))
|
@@ -1692,11 +1702,6 @@ module Playwright
|
|
1692
1702
|
wrap_impl(@impl.start_css_coverage(resetOnNavigation: unwrap_impl(resetOnNavigation), reportAnonymousScripts: unwrap_impl(reportAnonymousScripts)))
|
1693
1703
|
end
|
1694
1704
|
|
1695
|
-
# @nodoc
|
1696
|
-
def stop_css_coverage
|
1697
|
-
wrap_impl(@impl.stop_css_coverage)
|
1698
|
-
end
|
1699
|
-
|
1700
1705
|
# -- inherited from EventEmitter --
|
1701
1706
|
# @nodoc
|
1702
1707
|
def off(event, callback)
|
data/lib/playwright_api/route.rb
CHANGED
@@ -119,8 +119,9 @@ module Playwright
|
|
119
119
|
maxRedirects: nil,
|
120
120
|
method: nil,
|
121
121
|
postData: nil,
|
122
|
+
timeout: nil,
|
122
123
|
url: nil)
|
123
|
-
wrap_impl(@impl.fetch(headers: unwrap_impl(headers), maxRedirects: unwrap_impl(maxRedirects), method: unwrap_impl(method), postData: unwrap_impl(postData), url: unwrap_impl(url)))
|
124
|
+
wrap_impl(@impl.fetch(headers: unwrap_impl(headers), maxRedirects: unwrap_impl(maxRedirects), method: unwrap_impl(method), postData: unwrap_impl(postData), timeout: unwrap_impl(timeout), url: unwrap_impl(url)))
|
124
125
|
end
|
125
126
|
|
126
127
|
#
|
data/sig/playwright.rbs
CHANGED
@@ -47,7 +47,7 @@ module Playwright
|
|
47
47
|
def abort: (?errorCode: String) -> void
|
48
48
|
def continue: (?headers: Hash[untyped, untyped], ?method: String, ?postData: (String | String | untyped), ?url: String) -> void
|
49
49
|
def fallback: (?headers: Hash[untyped, untyped], ?method: String, ?postData: (String | String | untyped), ?url: String) -> void
|
50
|
-
def fetch: (?headers: Hash[untyped, untyped], ?maxRedirects: Integer, ?method: String, ?postData: (String | String | untyped), ?url: String) -> APIResponse
|
50
|
+
def fetch: (?headers: Hash[untyped, untyped], ?maxRedirects: Integer, ?method: String, ?postData: (String | String | untyped), ?timeout: Float, ?url: String) -> APIResponse
|
51
51
|
def fulfill: (?body: (String | String), ?contentType: String, ?headers: Hash[untyped, untyped], ?json: untyped, ?path: (String | File), ?response: APIResponse, ?status: Integer) -> void
|
52
52
|
def request: -> Request
|
53
53
|
end
|
@@ -184,7 +184,7 @@ module Playwright
|
|
184
184
|
def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
185
185
|
def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
186
186
|
def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
187
|
-
def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
|
187
|
+
def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
188
188
|
def name: -> String
|
189
189
|
def page: -> Page
|
190
190
|
def parent_frame: -> (nil | Frame)
|
@@ -293,7 +293,7 @@ module Playwright
|
|
293
293
|
def enabled?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
294
294
|
def hidden?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
295
295
|
def visible?: (String selector, ?strict: bool, ?timeout: Float) -> bool
|
296
|
-
def locator: (String selector, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
|
296
|
+
def locator: (String selector, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
297
297
|
def main_frame: -> Frame
|
298
298
|
def opener: -> (nil | Page)
|
299
299
|
def pause: -> void
|
@@ -449,7 +449,7 @@ module Playwright
|
|
449
449
|
def evaluate_all: (String expression, ?arg: untyped) -> untyped
|
450
450
|
def evaluate_handle: (String expression, ?arg: untyped, ?timeout: Float) -> JSHandle
|
451
451
|
def fill: (String value, ?force: bool, ?noWaitAfter: bool, ?timeout: Float) -> void
|
452
|
-
def filter: (?has: Locator, ?hasText: (String | Regexp)) -> Locator
|
452
|
+
def filter: (?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
453
453
|
def first: -> Locator
|
454
454
|
def focus: (?timeout: Float) -> void
|
455
455
|
def frame_locator: (String selector) -> FrameLocator
|
@@ -474,8 +474,9 @@ module Playwright
|
|
474
474
|
def hidden?: (?timeout: Float) -> bool
|
475
475
|
def visible?: (?timeout: Float) -> bool
|
476
476
|
def last: -> Locator
|
477
|
-
def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
|
477
|
+
def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
478
478
|
def nth: (Integer index) -> Locator
|
479
|
+
def or: (Locator locator) -> Locator
|
479
480
|
def page: -> Page
|
480
481
|
def press: (String key, ?delay: Float, ?noWaitAfter: bool, ?timeout: Float) -> void
|
481
482
|
def screenshot: (?animations: ("disabled" | "allow"), ?caret: ("hide" | "initial"), ?mask: Array[untyped], ?omitBackground: bool, ?path: (String | File), ?quality: Integer, ?scale: ("css" | "device"), ?timeout: Float, ?type: ("png" | "jpeg")) -> String
|
@@ -504,7 +505,7 @@ module Playwright
|
|
504
505
|
def get_by_text: ((String | Regexp) text, ?exact: bool) -> Locator
|
505
506
|
def get_by_title: ((String | Regexp) text, ?exact: bool) -> Locator
|
506
507
|
def last: -> FrameLocator
|
507
|
-
def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasText: (String | Regexp)) -> Locator
|
508
|
+
def locator: ((String | Locator) selectorOrLocator, ?has: Locator, ?hasNot: Locator, ?hasNotText: (String | Regexp), ?hasText: (String | Regexp)) -> Locator
|
508
509
|
def nth: (Integer index) -> FrameLocator
|
509
510
|
end
|
510
511
|
|
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.33.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- YusukeIwaki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-04-
|
11
|
+
date: 2023-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: concurrent-ruby
|
@@ -401,5 +401,5 @@ requirements: []
|
|
401
401
|
rubygems_version: 3.3.26
|
402
402
|
signing_key:
|
403
403
|
specification_version: 4
|
404
|
-
summary: The Ruby binding of playwright driver 1.
|
404
|
+
summary: The Ruby binding of playwright driver 1.33.0
|
405
405
|
test_files: []
|