playwright-ruby-client 0.8.1 → 0.9.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/download.md +97 -0
- data/documentation/docs/api/element_handle.md +27 -2
- data/documentation/docs/api/frame.md +50 -17
- data/documentation/docs/api/locator.md +650 -0
- data/documentation/docs/api/page.md +68 -18
- data/documentation/docs/article/guides/inspector.md +31 -0
- data/documentation/docs/article/guides/playwright_on_alpine_linux.md +1 -1
- data/documentation/docs/article/guides/semi_automation.md +1 -1
- data/documentation/docs/include/api_coverage.md +57 -1
- data/lib/playwright.rb +0 -1
- data/lib/playwright/channel_owners/browser_context.rb +25 -0
- data/lib/playwright/channel_owners/frame.rb +70 -33
- data/lib/playwright/channel_owners/page.rb +102 -40
- data/lib/playwright/{download.rb → download_impl.rb} +1 -1
- data/lib/playwright/javascript/expression.rb +5 -4
- data/lib/playwright/locator_impl.rb +314 -0
- data/lib/playwright/timeout_settings.rb +4 -4
- data/lib/playwright/version.rb +2 -2
- data/lib/playwright_api/android.rb +6 -6
- data/lib/playwright_api/android_device.rb +6 -6
- data/lib/playwright_api/browser.rb +6 -6
- data/lib/playwright_api/browser_context.rb +16 -11
- data/lib/playwright_api/browser_type.rb +6 -6
- data/lib/playwright_api/cdp_session.rb +6 -6
- data/lib/playwright_api/console_message.rb +6 -6
- data/lib/playwright_api/dialog.rb +6 -6
- data/lib/playwright_api/download.rb +70 -0
- data/lib/playwright_api/element_handle.rb +33 -19
- data/lib/playwright_api/frame.rb +81 -51
- data/lib/playwright_api/js_handle.rb +6 -6
- data/lib/playwright_api/locator.rb +509 -0
- data/lib/playwright_api/page.rb +84 -52
- data/lib/playwright_api/playwright.rb +6 -6
- data/lib/playwright_api/request.rb +6 -6
- data/lib/playwright_api/response.rb +6 -6
- data/lib/playwright_api/route.rb +6 -6
- data/lib/playwright_api/selectors.rb +6 -6
- data/lib/playwright_api/web_socket.rb +6 -6
- data/lib/playwright_api/worker.rb +6 -6
- metadata +10 -4
@@ -139,8 +139,12 @@ module Playwright
|
|
139
139
|
JavaScript::Expression.new(pageFunction, arg).evaluate_handle(@channel)
|
140
140
|
end
|
141
141
|
|
142
|
-
def query_selector(selector)
|
143
|
-
|
142
|
+
def query_selector(selector, strict: nil)
|
143
|
+
params = {
|
144
|
+
selector: selector,
|
145
|
+
strict: strict,
|
146
|
+
}.compact
|
147
|
+
resp = @channel.send_message_to_server('querySelector', params)
|
144
148
|
ChannelOwners::ElementHandle.from_nullable(resp)
|
145
149
|
end
|
146
150
|
|
@@ -150,48 +154,53 @@ module Playwright
|
|
150
154
|
end
|
151
155
|
end
|
152
156
|
|
153
|
-
def wait_for_selector(selector, state: nil, timeout: nil)
|
154
|
-
params = { selector: selector, state: state, timeout: timeout }.compact
|
157
|
+
def wait_for_selector(selector, state: nil, strict: nil, timeout: nil)
|
158
|
+
params = { selector: selector, state: state, strict: strict, timeout: timeout }.compact
|
155
159
|
resp = @channel.send_message_to_server('waitForSelector', params)
|
156
160
|
|
157
161
|
ChannelOwners::ElementHandle.from_nullable(resp)
|
158
162
|
end
|
159
163
|
|
160
|
-
def checked?(selector, timeout: nil)
|
161
|
-
params = { selector: selector, timeout: timeout }.compact
|
164
|
+
def checked?(selector, strict: nil, timeout: nil)
|
165
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
162
166
|
@channel.send_message_to_server('isChecked', params)
|
163
167
|
end
|
164
168
|
|
165
|
-
def disabled?(selector, timeout: nil)
|
166
|
-
params = { selector: selector, timeout: timeout }.compact
|
169
|
+
def disabled?(selector, strict: nil, timeout: nil)
|
170
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
167
171
|
@channel.send_message_to_server('isDisabled', params)
|
168
172
|
end
|
169
173
|
|
170
|
-
def editable?(selector, timeout: nil)
|
171
|
-
params = { selector: selector, timeout: timeout }.compact
|
174
|
+
def editable?(selector, strict: nil, timeout: nil)
|
175
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
172
176
|
@channel.send_message_to_server('isEditable', params)
|
173
177
|
end
|
174
178
|
|
175
|
-
def enabled?(selector, timeout: nil)
|
176
|
-
params = { selector: selector, timeout: timeout }.compact
|
179
|
+
def enabled?(selector, strict: nil, timeout: nil)
|
180
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
177
181
|
@channel.send_message_to_server('isEnabled', params)
|
178
182
|
end
|
179
183
|
|
180
|
-
def hidden?(selector, timeout: nil)
|
181
|
-
params = { selector: selector, timeout: timeout }.compact
|
184
|
+
def hidden?(selector, strict: nil, timeout: nil)
|
185
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
182
186
|
@channel.send_message_to_server('isHidden', params)
|
183
187
|
end
|
184
188
|
|
185
|
-
def visible?(selector, timeout: nil)
|
186
|
-
params = { selector: selector, timeout: timeout }.compact
|
189
|
+
def visible?(selector, strict: nil, timeout: nil)
|
190
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
187
191
|
@channel.send_message_to_server('isVisible', params)
|
188
192
|
end
|
189
193
|
|
190
|
-
def
|
194
|
+
def locator(selector)
|
195
|
+
LocatorImpl.new(frame: self, timeout_settings: @page.send(:timeout_settings), selector: selector)
|
196
|
+
end
|
197
|
+
|
198
|
+
def dispatch_event(selector, type, eventInit: nil, strict: nil, timeout: nil)
|
191
199
|
params = {
|
192
200
|
selector: selector,
|
193
201
|
type: type,
|
194
202
|
eventInit: JavaScript::ValueSerializer.new(eventInit).serialize,
|
203
|
+
strict: strict,
|
195
204
|
timeout: timeout,
|
196
205
|
}.compact
|
197
206
|
@channel.send_message_to_server('dispatchEvent', params)
|
@@ -199,8 +208,8 @@ module Playwright
|
|
199
208
|
nil
|
200
209
|
end
|
201
210
|
|
202
|
-
def eval_on_selector(selector, pageFunction, arg: nil)
|
203
|
-
JavaScript::Expression.new(pageFunction, arg).eval_on_selector(@channel, selector)
|
211
|
+
def eval_on_selector(selector, pageFunction, arg: nil, strict: nil)
|
212
|
+
JavaScript::Expression.new(pageFunction, arg).eval_on_selector(@channel, selector, strict: strict)
|
204
213
|
end
|
205
214
|
|
206
215
|
def eval_on_selector_all(selector, pageFunction, arg: nil)
|
@@ -273,6 +282,7 @@ module Playwright
|
|
273
282
|
modifiers: nil,
|
274
283
|
noWaitAfter: nil,
|
275
284
|
position: nil,
|
285
|
+
strict: nil,
|
276
286
|
timeout: nil,
|
277
287
|
trial: nil)
|
278
288
|
|
@@ -285,6 +295,7 @@ module Playwright
|
|
285
295
|
modifiers: modifiers,
|
286
296
|
noWaitAfter: noWaitAfter,
|
287
297
|
position: position,
|
298
|
+
strict: strict,
|
288
299
|
timeout: timeout,
|
289
300
|
trial: trial,
|
290
301
|
}.compact
|
@@ -298,6 +309,7 @@ module Playwright
|
|
298
309
|
target,
|
299
310
|
force: nil,
|
300
311
|
noWaitAfter: nil,
|
312
|
+
strict: nil,
|
301
313
|
timeout: nil,
|
302
314
|
trial: nil)
|
303
315
|
params = {
|
@@ -305,6 +317,7 @@ module Playwright
|
|
305
317
|
target: target,
|
306
318
|
force: force,
|
307
319
|
noWaitAfter: noWaitAfter,
|
320
|
+
strict: strict,
|
308
321
|
timeout: timeout,
|
309
322
|
trial: trial,
|
310
323
|
}.compact
|
@@ -321,6 +334,7 @@ module Playwright
|
|
321
334
|
modifiers: nil,
|
322
335
|
noWaitAfter: nil,
|
323
336
|
position: nil,
|
337
|
+
strict: nil,
|
324
338
|
timeout: nil,
|
325
339
|
trial: nil)
|
326
340
|
|
@@ -332,6 +346,7 @@ module Playwright
|
|
332
346
|
modifiers: modifiers,
|
333
347
|
noWaitAfter: noWaitAfter,
|
334
348
|
position: position,
|
349
|
+
strict: strict,
|
335
350
|
timeout: timeout,
|
336
351
|
trial: trial,
|
337
352
|
}.compact
|
@@ -346,6 +361,7 @@ module Playwright
|
|
346
361
|
modifiers: nil,
|
347
362
|
noWaitAfter: nil,
|
348
363
|
position: nil,
|
364
|
+
strict: nil,
|
349
365
|
timeout: nil,
|
350
366
|
trial: nil)
|
351
367
|
params = {
|
@@ -354,6 +370,7 @@ module Playwright
|
|
354
370
|
modifiers: modifiers,
|
355
371
|
noWaitAfter: noWaitAfter,
|
356
372
|
position: position,
|
373
|
+
strict: strict,
|
357
374
|
timeout: timeout,
|
358
375
|
trial: trial,
|
359
376
|
}.compact
|
@@ -367,12 +384,14 @@ module Playwright
|
|
367
384
|
value,
|
368
385
|
force: nil,
|
369
386
|
noWaitAfter: nil,
|
387
|
+
strict: nil,
|
370
388
|
timeout: nil)
|
371
389
|
params = {
|
372
390
|
selector: selector,
|
373
391
|
value: value,
|
374
392
|
force: force,
|
375
393
|
noWaitAfter: noWaitAfter,
|
394
|
+
strict: strict,
|
376
395
|
timeout: timeout,
|
377
396
|
}.compact
|
378
397
|
@channel.send_message_to_server('fill', params)
|
@@ -380,31 +399,32 @@ module Playwright
|
|
380
399
|
nil
|
381
400
|
end
|
382
401
|
|
383
|
-
def focus(selector, timeout: nil)
|
384
|
-
params = { selector: selector, timeout: timeout }.compact
|
402
|
+
def focus(selector, strict: nil, timeout: nil)
|
403
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
385
404
|
@channel.send_message_to_server('focus', params)
|
386
405
|
nil
|
387
406
|
end
|
388
407
|
|
389
|
-
def text_content(selector, timeout: nil)
|
390
|
-
params = { selector: selector, timeout: timeout }.compact
|
408
|
+
def text_content(selector, strict: nil, timeout: nil)
|
409
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
391
410
|
@channel.send_message_to_server('textContent', params)
|
392
411
|
end
|
393
412
|
|
394
|
-
def inner_text(selector, timeout: nil)
|
395
|
-
params = { selector: selector, timeout: timeout }.compact
|
413
|
+
def inner_text(selector, strict: nil, timeout: nil)
|
414
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
396
415
|
@channel.send_message_to_server('innerText', params)
|
397
416
|
end
|
398
417
|
|
399
|
-
def inner_html(selector, timeout: nil)
|
400
|
-
params = { selector: selector, timeout: timeout }.compact
|
418
|
+
def inner_html(selector, strict: nil, timeout: nil)
|
419
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
401
420
|
@channel.send_message_to_server('innerHTML', params)
|
402
421
|
end
|
403
422
|
|
404
|
-
def get_attribute(selector, name, timeout: nil)
|
423
|
+
def get_attribute(selector, name, strict: nil, timeout: nil)
|
405
424
|
params = {
|
406
425
|
selector: selector,
|
407
426
|
name: name,
|
427
|
+
strict: strict,
|
408
428
|
timeout: timeout,
|
409
429
|
}.compact
|
410
430
|
@channel.send_message_to_server('getAttribute', params)
|
@@ -415,6 +435,7 @@ module Playwright
|
|
415
435
|
force: nil,
|
416
436
|
modifiers: nil,
|
417
437
|
position: nil,
|
438
|
+
strict: nil,
|
418
439
|
timeout: nil,
|
419
440
|
trial: nil)
|
420
441
|
params = {
|
@@ -422,6 +443,7 @@ module Playwright
|
|
422
443
|
force: force,
|
423
444
|
modifiers: modifiers,
|
424
445
|
position: position,
|
446
|
+
strict: strict,
|
425
447
|
timeout: timeout,
|
426
448
|
trial: trial,
|
427
449
|
}.compact
|
@@ -438,6 +460,7 @@ module Playwright
|
|
438
460
|
label: nil,
|
439
461
|
force: nil,
|
440
462
|
noWaitAfter: nil,
|
463
|
+
strict: nil,
|
441
464
|
timeout: nil)
|
442
465
|
base_params = SelectOptionValues.new(
|
443
466
|
element: element,
|
@@ -445,18 +468,24 @@ module Playwright
|
|
445
468
|
value: value,
|
446
469
|
label: label,
|
447
470
|
).as_params
|
448
|
-
params = base_params.merge({ selector: selector, force: force, noWaitAfter: noWaitAfter, timeout: timeout }.compact)
|
471
|
+
params = base_params.merge({ selector: selector, force: force, noWaitAfter: noWaitAfter, strict: strict, timeout: timeout }.compact)
|
449
472
|
@channel.send_message_to_server('selectOption', params)
|
450
473
|
end
|
451
474
|
|
452
|
-
def input_value(selector, timeout: nil)
|
453
|
-
params = { selector: selector, timeout: timeout }.compact
|
475
|
+
def input_value(selector, strict: nil, timeout: nil)
|
476
|
+
params = { selector: selector, strict: strict, timeout: timeout }.compact
|
454
477
|
@channel.send_message_to_server('inputValue', params)
|
455
478
|
end
|
456
479
|
|
457
|
-
def set_input_files(selector, files, noWaitAfter: nil, timeout: nil)
|
480
|
+
def set_input_files(selector, files, noWaitAfter: nil, strict: nil, timeout: nil)
|
458
481
|
file_payloads = InputFiles.new(files).as_params
|
459
|
-
params = {
|
482
|
+
params = {
|
483
|
+
files: file_payloads,
|
484
|
+
selector: selector,
|
485
|
+
noWaitAfter: noWaitAfter,
|
486
|
+
strict: strict,
|
487
|
+
timeout: timeout,
|
488
|
+
}.compact
|
460
489
|
@channel.send_message_to_server('setInputFiles', params)
|
461
490
|
|
462
491
|
nil
|
@@ -467,6 +496,7 @@ module Playwright
|
|
467
496
|
text,
|
468
497
|
delay: nil,
|
469
498
|
noWaitAfter: nil,
|
499
|
+
strict: nil,
|
470
500
|
timeout: nil)
|
471
501
|
|
472
502
|
params = {
|
@@ -474,6 +504,7 @@ module Playwright
|
|
474
504
|
text: text,
|
475
505
|
delay: delay,
|
476
506
|
noWaitAfter: noWaitAfter,
|
507
|
+
strict: strict,
|
477
508
|
timeout: timeout,
|
478
509
|
}.compact
|
479
510
|
@channel.send_message_to_server('type', params)
|
@@ -486,6 +517,7 @@ module Playwright
|
|
486
517
|
key,
|
487
518
|
delay: nil,
|
488
519
|
noWaitAfter: nil,
|
520
|
+
strict: nil,
|
489
521
|
timeout: nil)
|
490
522
|
|
491
523
|
params = {
|
@@ -493,6 +525,7 @@ module Playwright
|
|
493
525
|
key: key,
|
494
526
|
delay: delay,
|
495
527
|
noWaitAfter: noWaitAfter,
|
528
|
+
strict: strict,
|
496
529
|
timeout: timeout,
|
497
530
|
}.compact
|
498
531
|
@channel.send_message_to_server('press', params)
|
@@ -505,6 +538,7 @@ module Playwright
|
|
505
538
|
force: nil,
|
506
539
|
noWaitAfter: nil,
|
507
540
|
position: nil,
|
541
|
+
strict: nil,
|
508
542
|
timeout: nil,
|
509
543
|
trial: nil)
|
510
544
|
|
@@ -513,6 +547,7 @@ module Playwright
|
|
513
547
|
force: force,
|
514
548
|
noWaitAfter: noWaitAfter,
|
515
549
|
position: position,
|
550
|
+
strict: strict,
|
516
551
|
timeout: timeout,
|
517
552
|
trial: trial,
|
518
553
|
}.compact
|
@@ -526,6 +561,7 @@ module Playwright
|
|
526
561
|
force: nil,
|
527
562
|
noWaitAfter: nil,
|
528
563
|
position: nil,
|
564
|
+
strict: nil,
|
529
565
|
timeout: nil,
|
530
566
|
trial: nil)
|
531
567
|
|
@@ -534,6 +570,7 @@ module Playwright
|
|
534
570
|
force: force,
|
535
571
|
noWaitAfter: noWaitAfter,
|
536
572
|
position: position,
|
573
|
+
strict: strict,
|
537
574
|
timeout: timeout,
|
538
575
|
trial: trial,
|
539
576
|
}.compact
|
@@ -124,7 +124,7 @@ module Playwright
|
|
124
124
|
end
|
125
125
|
|
126
126
|
private def on_download(params)
|
127
|
-
download =
|
127
|
+
download = DownloadImpl.new(
|
128
128
|
page: self,
|
129
129
|
url: params['url'],
|
130
130
|
suggested_filename: params['suggestedFilename'],
|
@@ -205,44 +205,48 @@ module Playwright
|
|
205
205
|
@channel.send_message_to_server('setDefaultTimeoutNoReply', timeout: timeout)
|
206
206
|
end
|
207
207
|
|
208
|
-
def query_selector(selector)
|
209
|
-
@main_frame.query_selector(selector)
|
208
|
+
def query_selector(selector, strict: nil)
|
209
|
+
@main_frame.query_selector(selector, strict: strict)
|
210
210
|
end
|
211
211
|
|
212
212
|
def query_selector_all(selector)
|
213
213
|
@main_frame.query_selector_all(selector)
|
214
214
|
end
|
215
215
|
|
216
|
-
def wait_for_selector(selector, state: nil, timeout: nil)
|
217
|
-
@main_frame.wait_for_selector(selector, state: state, timeout: timeout)
|
216
|
+
def wait_for_selector(selector, state: nil, strict: nil, timeout: nil)
|
217
|
+
@main_frame.wait_for_selector(selector, state: state, strict: strict, timeout: timeout)
|
218
218
|
end
|
219
219
|
|
220
|
-
def checked?(selector, timeout: nil)
|
221
|
-
@main_frame.checked?(selector, timeout: timeout)
|
220
|
+
def checked?(selector, strict: nil, timeout: nil)
|
221
|
+
@main_frame.checked?(selector, strict: strict, timeout: timeout)
|
222
222
|
end
|
223
223
|
|
224
|
-
def disabled?(selector, timeout: nil)
|
225
|
-
@main_frame.disabled?(selector, timeout: timeout)
|
224
|
+
def disabled?(selector, strict: nil, timeout: nil)
|
225
|
+
@main_frame.disabled?(selector, strict: strict, timeout: timeout)
|
226
226
|
end
|
227
227
|
|
228
|
-
def editable?(selector, timeout: nil)
|
229
|
-
@main_frame.editable?(selector, timeout: timeout)
|
228
|
+
def editable?(selector, strict: nil, timeout: nil)
|
229
|
+
@main_frame.editable?(selector, strict: strict, timeout: timeout)
|
230
230
|
end
|
231
231
|
|
232
|
-
def enabled?(selector, timeout: nil)
|
233
|
-
@main_frame.enabled?(selector, timeout: timeout)
|
232
|
+
def enabled?(selector, strict: nil, timeout: nil)
|
233
|
+
@main_frame.enabled?(selector, strict: strict, timeout: timeout)
|
234
234
|
end
|
235
235
|
|
236
|
-
def hidden?(selector, timeout: nil)
|
237
|
-
@main_frame.hidden?(selector, timeout: timeout)
|
236
|
+
def hidden?(selector, strict: nil, timeout: nil)
|
237
|
+
@main_frame.hidden?(selector, strict: strict, timeout: timeout)
|
238
238
|
end
|
239
239
|
|
240
|
-
def visible?(selector, timeout: nil)
|
241
|
-
@main_frame.visible?(selector, timeout: timeout)
|
240
|
+
def visible?(selector, strict: nil, timeout: nil)
|
241
|
+
@main_frame.visible?(selector, strict: strict, timeout: timeout)
|
242
242
|
end
|
243
243
|
|
244
|
-
def
|
245
|
-
@main_frame.
|
244
|
+
def locator(selector)
|
245
|
+
@main_frame.locator(selector)
|
246
|
+
end
|
247
|
+
|
248
|
+
def dispatch_event(selector, type, eventInit: nil, strict: nil, timeout: nil)
|
249
|
+
@main_frame.dispatch_event(selector, type, eventInit: eventInit, strict: strict, timeout: timeout)
|
246
250
|
end
|
247
251
|
|
248
252
|
def evaluate(pageFunction, arg: nil)
|
@@ -253,8 +257,8 @@ module Playwright
|
|
253
257
|
@main_frame.evaluate_handle(pageFunction, arg: arg)
|
254
258
|
end
|
255
259
|
|
256
|
-
def eval_on_selector(selector, pageFunction, arg: nil)
|
257
|
-
@main_frame.eval_on_selector(selector, pageFunction, arg: arg)
|
260
|
+
def eval_on_selector(selector, pageFunction, arg: nil, strict: nil)
|
261
|
+
@main_frame.eval_on_selector(selector, pageFunction, arg: arg, strict: strict)
|
258
262
|
end
|
259
263
|
|
260
264
|
def eval_on_selector_all(selector, pageFunction, arg: nil)
|
@@ -439,6 +443,7 @@ module Playwright
|
|
439
443
|
modifiers: nil,
|
440
444
|
noWaitAfter: nil,
|
441
445
|
position: nil,
|
446
|
+
strict: nil,
|
442
447
|
timeout: nil,
|
443
448
|
trial: nil)
|
444
449
|
|
@@ -451,6 +456,7 @@ module Playwright
|
|
451
456
|
modifiers: modifiers,
|
452
457
|
noWaitAfter: noWaitAfter,
|
453
458
|
position: position,
|
459
|
+
strict: strict,
|
454
460
|
timeout: timeout,
|
455
461
|
trial: trial,
|
456
462
|
)
|
@@ -461,6 +467,7 @@ module Playwright
|
|
461
467
|
target,
|
462
468
|
force: nil,
|
463
469
|
noWaitAfter: nil,
|
470
|
+
strict: nil,
|
464
471
|
timeout: nil,
|
465
472
|
trial: nil)
|
466
473
|
|
@@ -469,6 +476,7 @@ module Playwright
|
|
469
476
|
target,
|
470
477
|
force: force,
|
471
478
|
noWaitAfter: noWaitAfter,
|
479
|
+
strict: strict,
|
472
480
|
timeout: timeout,
|
473
481
|
trial: trial)
|
474
482
|
end
|
@@ -481,6 +489,7 @@ module Playwright
|
|
481
489
|
modifiers: nil,
|
482
490
|
noWaitAfter: nil,
|
483
491
|
position: nil,
|
492
|
+
strict: nil,
|
484
493
|
timeout: nil,
|
485
494
|
trial: nil)
|
486
495
|
@main_frame.dblclick(
|
@@ -491,6 +500,7 @@ module Playwright
|
|
491
500
|
modifiers: modifiers,
|
492
501
|
noWaitAfter: noWaitAfter,
|
493
502
|
position: position,
|
503
|
+
strict: strict,
|
494
504
|
timeout: timeout,
|
495
505
|
trial: trial,
|
496
506
|
)
|
@@ -502,6 +512,7 @@ module Playwright
|
|
502
512
|
modifiers: nil,
|
503
513
|
noWaitAfter: nil,
|
504
514
|
position: nil,
|
515
|
+
strict: nil,
|
505
516
|
timeout: nil,
|
506
517
|
trial: nil)
|
507
518
|
@main_frame.tap_point(
|
@@ -510,6 +521,7 @@ module Playwright
|
|
510
521
|
modifiers: modifiers,
|
511
522
|
noWaitAfter: noWaitAfter,
|
512
523
|
position: position,
|
524
|
+
strict: strict,
|
513
525
|
timeout: timeout,
|
514
526
|
trial: trial,
|
515
527
|
)
|
@@ -520,28 +532,35 @@ module Playwright
|
|
520
532
|
value,
|
521
533
|
force: nil,
|
522
534
|
noWaitAfter: nil,
|
535
|
+
strict: nil,
|
523
536
|
timeout: nil)
|
524
|
-
@main_frame.fill(
|
537
|
+
@main_frame.fill(
|
538
|
+
selector,
|
539
|
+
value,
|
540
|
+
force: force,
|
541
|
+
noWaitAfter: noWaitAfter,
|
542
|
+
strict: strict,
|
543
|
+
timeout: timeout)
|
525
544
|
end
|
526
545
|
|
527
|
-
def focus(selector, timeout: nil)
|
528
|
-
@main_frame.focus(selector, timeout: timeout)
|
546
|
+
def focus(selector, strict: nil, timeout: nil)
|
547
|
+
@main_frame.focus(selector, strict: strict, timeout: timeout)
|
529
548
|
end
|
530
549
|
|
531
|
-
def text_content(selector, timeout: nil)
|
532
|
-
@main_frame.text_content(selector, timeout: timeout)
|
550
|
+
def text_content(selector, strict: nil, timeout: nil)
|
551
|
+
@main_frame.text_content(selector, strict: strict, timeout: timeout)
|
533
552
|
end
|
534
553
|
|
535
|
-
def inner_text(selector, timeout: nil)
|
536
|
-
@main_frame.inner_text(selector, timeout: timeout)
|
554
|
+
def inner_text(selector, strict: nil, timeout: nil)
|
555
|
+
@main_frame.inner_text(selector, strict: strict, timeout: timeout)
|
537
556
|
end
|
538
557
|
|
539
|
-
def inner_html(selector, timeout: nil)
|
540
|
-
@main_frame.inner_html(selector, timeout: timeout)
|
558
|
+
def inner_html(selector, strict: nil, timeout: nil)
|
559
|
+
@main_frame.inner_html(selector, strict: strict, timeout: timeout)
|
541
560
|
end
|
542
561
|
|
543
|
-
def get_attribute(selector, name, timeout: nil)
|
544
|
-
@main_frame.get_attribute(selector, name, timeout: timeout)
|
562
|
+
def get_attribute(selector, name, strict: nil, timeout: nil)
|
563
|
+
@main_frame.get_attribute(selector, name, strict: strict, timeout: timeout)
|
545
564
|
end
|
546
565
|
|
547
566
|
def hover(
|
@@ -549,6 +568,7 @@ module Playwright
|
|
549
568
|
force: nil,
|
550
569
|
modifiers: nil,
|
551
570
|
position: nil,
|
571
|
+
strict: nil,
|
552
572
|
timeout: nil,
|
553
573
|
trial: nil)
|
554
574
|
@main_frame.hover(
|
@@ -556,6 +576,7 @@ module Playwright
|
|
556
576
|
force: force,
|
557
577
|
modifiers: modifiers,
|
558
578
|
position: position,
|
579
|
+
strict: strict,
|
559
580
|
timeout: timeout,
|
560
581
|
trial: trial,
|
561
582
|
)
|
@@ -569,6 +590,7 @@ module Playwright
|
|
569
590
|
label: nil,
|
570
591
|
force: nil,
|
571
592
|
noWaitAfter: nil,
|
593
|
+
strict: nil,
|
572
594
|
timeout: nil)
|
573
595
|
@main_frame.select_option(
|
574
596
|
selector,
|
@@ -578,16 +600,22 @@ module Playwright
|
|
578
600
|
label: label,
|
579
601
|
force: force,
|
580
602
|
noWaitAfter: noWaitAfter,
|
603
|
+
strict: strict,
|
581
604
|
timeout: timeout,
|
582
605
|
)
|
583
606
|
end
|
584
607
|
|
585
|
-
def input_value(selector, timeout: nil)
|
586
|
-
@main_frame.input_value(selector, timeout: timeout)
|
608
|
+
def input_value(selector, strict: nil, timeout: nil)
|
609
|
+
@main_frame.input_value(selector, strict: strict, timeout: timeout)
|
587
610
|
end
|
588
611
|
|
589
|
-
def set_input_files(selector, files, noWaitAfter: nil, timeout: nil)
|
590
|
-
@main_frame.set_input_files(
|
612
|
+
def set_input_files(selector, files, noWaitAfter: nil, strict: nil,timeout: nil)
|
613
|
+
@main_frame.set_input_files(
|
614
|
+
selector,
|
615
|
+
files,
|
616
|
+
noWaitAfter: noWaitAfter,
|
617
|
+
strict: strict,
|
618
|
+
timeout: timeout)
|
591
619
|
end
|
592
620
|
|
593
621
|
def type(
|
@@ -595,9 +623,16 @@ module Playwright
|
|
595
623
|
text,
|
596
624
|
delay: nil,
|
597
625
|
noWaitAfter: nil,
|
626
|
+
strict: nil,
|
598
627
|
timeout: nil)
|
599
628
|
|
600
|
-
@main_frame.type(
|
629
|
+
@main_frame.type(
|
630
|
+
selector,
|
631
|
+
text,
|
632
|
+
delay: delay,
|
633
|
+
noWaitAfter: noWaitAfter,
|
634
|
+
strict: strict,
|
635
|
+
timeout: timeout)
|
601
636
|
end
|
602
637
|
|
603
638
|
def press(
|
@@ -605,9 +640,16 @@ module Playwright
|
|
605
640
|
key,
|
606
641
|
delay: nil,
|
607
642
|
noWaitAfter: nil,
|
643
|
+
strict: nil,
|
608
644
|
timeout: nil)
|
609
645
|
|
610
|
-
@main_frame.press(
|
646
|
+
@main_frame.press(
|
647
|
+
selector,
|
648
|
+
key,
|
649
|
+
delay: delay,
|
650
|
+
noWaitAfter: noWaitAfter,
|
651
|
+
strict: strict,
|
652
|
+
timeout: timeout)
|
611
653
|
end
|
612
654
|
|
613
655
|
def check(
|
@@ -615,10 +657,18 @@ module Playwright
|
|
615
657
|
force: nil,
|
616
658
|
noWaitAfter: nil,
|
617
659
|
position: nil,
|
660
|
+
strict: nil,
|
618
661
|
timeout: nil,
|
619
662
|
trial: nil)
|
620
663
|
|
621
|
-
@main_frame.check(
|
664
|
+
@main_frame.check(
|
665
|
+
selector,
|
666
|
+
force: force,
|
667
|
+
noWaitAfter: noWaitAfter,
|
668
|
+
position: position,
|
669
|
+
strict: strict,
|
670
|
+
timeout: timeout,
|
671
|
+
trial: trial)
|
622
672
|
end
|
623
673
|
|
624
674
|
def uncheck(
|
@@ -626,16 +676,28 @@ module Playwright
|
|
626
676
|
force: nil,
|
627
677
|
noWaitAfter: nil,
|
628
678
|
position: nil,
|
679
|
+
strict: nil,
|
629
680
|
timeout: nil,
|
630
681
|
trial: nil)
|
631
682
|
|
632
|
-
@main_frame.uncheck(
|
683
|
+
@main_frame.uncheck(
|
684
|
+
selector,
|
685
|
+
force: force,
|
686
|
+
noWaitAfter: noWaitAfter,
|
687
|
+
position: position,
|
688
|
+
strict: strict,
|
689
|
+
timeout: timeout,
|
690
|
+
trial: trial)
|
633
691
|
end
|
634
692
|
|
635
693
|
def wait_for_function(pageFunction, arg: nil, polling: nil, timeout: nil)
|
636
694
|
@main_frame.wait_for_function(pageFunction, arg: arg, polling: polling, timeout: timeout)
|
637
695
|
end
|
638
696
|
|
697
|
+
def pause
|
698
|
+
@browser_context.send(:pause)
|
699
|
+
end
|
700
|
+
|
639
701
|
def pdf(
|
640
702
|
displayHeaderFooter: nil,
|
641
703
|
footerTemplate: nil,
|