puppeteer-ruby 0.0.13 → 0.0.14

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -12
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +52 -1
  6. data/lib/puppeteer.rb +1 -1
  7. data/lib/puppeteer/browser.rb +17 -25
  8. data/lib/puppeteer/cdp_session.rb +3 -19
  9. data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
  10. data/lib/puppeteer/connection.rb +3 -15
  11. data/lib/puppeteer/define_async_method.rb +23 -0
  12. data/lib/puppeteer/dom_world.rb +6 -21
  13. data/lib/puppeteer/element_handle.rb +15 -44
  14. data/lib/puppeteer/emulation_manager.rb +2 -6
  15. data/lib/puppeteer/execution_context.rb +1 -6
  16. data/lib/puppeteer/frame.rb +30 -16
  17. data/lib/puppeteer/frame_manager.rb +7 -25
  18. data/lib/puppeteer/js_handle.rb +3 -12
  19. data/lib/puppeteer/keyboard.rb +6 -27
  20. data/lib/puppeteer/mouse.rb +5 -25
  21. data/lib/puppeteer/page.rb +39 -63
  22. data/lib/puppeteer/remote_object.rb +2 -5
  23. data/lib/puppeteer/touch_screen.rb +2 -7
  24. data/lib/puppeteer/version.rb +1 -1
  25. data/lib/puppeteer/wait_task.rb +2 -4
  26. data/puppeteer-ruby.gemspec +1 -1
  27. metadata +7 -103
  28. data/docs/Puppeteer.html +0 -2338
  29. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  30. data/docs/Puppeteer/Browser.html +0 -2258
  31. data/docs/Puppeteer/BrowserContext.html +0 -809
  32. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  33. data/docs/Puppeteer/BrowserRunner.html +0 -914
  34. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  35. data/docs/Puppeteer/CDPSession.html +0 -813
  36. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  37. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
  38. data/docs/Puppeteer/Connection.html +0 -964
  39. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  40. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  41. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  42. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  43. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  44. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  45. data/docs/Puppeteer/DOMWorld.html +0 -2293
  46. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  47. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  48. data/docs/Puppeteer/DebugPrint.html +0 -233
  49. data/docs/Puppeteer/Device.html +0 -470
  50. data/docs/Puppeteer/Devices.html +0 -139
  51. data/docs/Puppeteer/ElementHandle.html +0 -2542
  52. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  53. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  54. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  55. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  56. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  57. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  58. data/docs/Puppeteer/EmulationManager.html +0 -454
  59. data/docs/Puppeteer/EventCallbackable.html +0 -499
  60. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  61. data/docs/Puppeteer/ExecutionContext.html +0 -998
  62. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  63. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  64. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  65. data/docs/Puppeteer/FileChooser.html +0 -455
  66. data/docs/Puppeteer/Frame.html +0 -3835
  67. data/docs/Puppeteer/FrameManager.html +0 -2410
  68. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  69. data/docs/Puppeteer/IfPresent.html +0 -222
  70. data/docs/Puppeteer/JSHandle.html +0 -1352
  71. data/docs/Puppeteer/Keyboard.html +0 -1557
  72. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  73. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  74. data/docs/Puppeteer/Launcher.html +0 -237
  75. data/docs/Puppeteer/Launcher/Base.html +0 -385
  76. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  77. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  78. data/docs/Puppeteer/Launcher/Chrome.html +0 -674
  79. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  80. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  81. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  82. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  83. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  84. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  85. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  86. data/docs/Puppeteer/Mouse.html +0 -1095
  87. data/docs/Puppeteer/Mouse/Button.html +0 -136
  88. data/docs/Puppeteer/NetworkManager.html +0 -901
  89. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  90. data/docs/Puppeteer/Page.html +0 -6173
  91. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  92. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  93. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  94. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  95. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  96. data/docs/Puppeteer/RemoteObject.html +0 -1087
  97. data/docs/Puppeteer/Target.html +0 -1336
  98. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  99. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  100. data/docs/Puppeteer/TimeoutError.html +0 -135
  101. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  102. data/docs/Puppeteer/TouchScreen.html +0 -464
  103. data/docs/Puppeteer/Viewport.html +0 -837
  104. data/docs/Puppeteer/WaitTask.html +0 -637
  105. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  106. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  107. data/docs/Puppeteer/WebSocket.html +0 -673
  108. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  109. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  110. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  111. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  112. data/docs/_index.html +0 -816
  113. data/docs/class_list.html +0 -51
  114. data/docs/css/common.css +0 -1
  115. data/docs/css/full_list.css +0 -58
  116. data/docs/css/style.css +0 -496
  117. data/docs/file.README.html +0 -125
  118. data/docs/file_list.html +0 -56
  119. data/docs/frames.html +0 -17
  120. data/docs/index.html +0 -125
  121. data/docs/js/app.js +0 -314
  122. data/docs/js/full_list.js +0 -216
  123. data/docs/js/jquery.js +0 -4
  124. data/docs/method_list.html +0 -4123
  125. data/docs/top-level-namespace.html +0 -126
  126. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,809 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Puppeteer::BrowserContext
8
-
9
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::BrowserContext";
19
- relpath = '../';
20
- </script>
21
-
22
-
23
- <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
-
25
- <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
-
27
-
28
- </head>
29
- <body>
30
- <div class="nav_wrap">
31
- <iframe id="nav" src="../class_list.html?1"></iframe>
32
- <div id="resizer"></div>
33
- </div>
34
-
35
- <div id="main" tabindex="-1">
36
- <div id="header">
37
- <div id="menu">
38
-
39
- <a href="../_index.html">Index (B)</a> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
41
- &raquo;
42
- <span class="title">BrowserContext</span>
43
-
44
- </div>
45
-
46
- <div id="search">
47
-
48
- <a class="full_list_link" id="class_list_link"
49
- href="../class_list.html">
50
-
51
- <svg width="24" height="24">
52
- <rect x="0" y="4" width="24" height="4" rx="1" ry="1"></rect>
53
- <rect x="0" y="12" width="24" height="4" rx="1" ry="1"></rect>
54
- <rect x="0" y="20" width="24" height="4" rx="1" ry="1"></rect>
55
- </svg>
56
- </a>
57
-
58
- </div>
59
- <div class="clear"></div>
60
- </div>
61
-
62
- <div id="content"><h1>Class: Puppeteer::BrowserContext
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">Object</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">Puppeteer::BrowserContext</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
- <dl>
91
- <dt>Includes:</dt>
92
- <dd><span class='object_link'><a href="EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/puppeteer/browser_context.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
-
115
- <h2>
116
- Instance Method Summary
117
- <small><a href="#" class="summary_toggle">collapse</a></small>
118
- </h2>
119
-
120
- <ul class="summary">
121
-
122
- <li class="public ">
123
- <span class="summary_signature">
124
-
125
- <a href="#browser-instance_method" title="#browser (instance method)">#<strong>browser</strong> &#x21d2; Browser </a>
126
-
127
-
128
-
129
- </span>
130
-
131
-
132
-
133
-
134
-
135
-
136
-
137
-
138
-
139
- <span class="summary_desc"><div class='inline'></div></span>
140
-
141
- </li>
142
-
143
-
144
- <li class="public ">
145
- <span class="summary_signature">
146
-
147
- <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> &#x21d2; Object </a>
148
-
149
-
150
-
151
- </span>
152
-
153
-
154
-
155
-
156
-
157
-
158
-
159
-
160
-
161
- <span class="summary_desc"><div class='inline'></div></span>
162
-
163
- </li>
164
-
165
-
166
- <li class="public ">
167
- <span class="summary_signature">
168
-
169
- <a href="#incognito%3F-instance_method" title="#incognito? (instance method)">#<strong>incognito?</strong> &#x21d2; Boolean </a>
170
-
171
-
172
-
173
- </span>
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
-
182
-
183
- <span class="summary_desc"><div class='inline'></div></span>
184
-
185
- </li>
186
-
187
-
188
- <li class="public ">
189
- <span class="summary_signature">
190
-
191
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(connection, browser, context_id) &#x21d2; BrowserContext </a>
192
-
193
-
194
-
195
- </span>
196
-
197
-
198
- <span class="note title constructor">constructor</span>
199
-
200
-
201
-
202
-
203
-
204
-
205
-
206
-
207
- <span class="summary_desc"><div class='inline'>
208
- <p>A new instance of BrowserContext.</p>
209
- </div></span>
210
-
211
- </li>
212
-
213
-
214
- <li class="public ">
215
- <span class="summary_signature">
216
-
217
- <a href="#new_page-instance_method" title="#new_page (instance method)">#<strong>new_page</strong> &#x21d2; Future&lt;Puppeteer::Page&gt; </a>
218
-
219
-
220
-
221
- </span>
222
-
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
- <span class="summary_desc"><div class='inline'></div></span>
232
-
233
- </li>
234
-
235
-
236
- <li class="public ">
237
- <span class="summary_signature">
238
-
239
- <a href="#pages-instance_method" title="#pages (instance method)">#<strong>pages</strong> &#x21d2; !Promise&lt;!Array&lt;!Puppeteer.Page&gt;&gt; </a>
240
-
241
-
242
-
243
- </span>
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
- <span class="summary_desc"><div class='inline'></div></span>
254
-
255
- </li>
256
-
257
-
258
- <li class="public ">
259
- <span class="summary_signature">
260
-
261
- <a href="#targets-instance_method" title="#targets (instance method)">#<strong>targets</strong> &#x21d2; !Array&lt;!Target&gt; </a>
262
-
263
-
264
-
265
- </span>
266
-
267
-
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
- <span class="summary_desc"><div class='inline'>
276
- <p>Target.</p>
277
- </div></span>
278
-
279
- </li>
280
-
281
-
282
- <li class="public ">
283
- <span class="summary_signature">
284
-
285
- <a href="#wait_for_target-instance_method" title="#wait_for_target (instance method)">#<strong>wait_for_target</strong>(predicate:, timeout: nil) &#x21d2; !Promise&lt;!Target&gt; </a>
286
-
287
-
288
-
289
- </span>
290
-
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
- <span class="summary_desc"><div class='inline'></div></span>
300
-
301
- </li>
302
-
303
-
304
- </ul>
305
-
306
-
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
- <h3 class="inherited">Methods included from <span class='object_link'><a href="EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></h3>
317
- <p class="inherited"><span class='object_link'><a href="EventCallbackable.html#add_event_listener-instance_method" title="Puppeteer::EventCallbackable#add_event_listener (method)">#add_event_listener</a></span>, <span class='object_link'><a href="EventCallbackable.html#emit_event-instance_method" title="Puppeteer::EventCallbackable#emit_event (method)">#emit_event</a></span>, <span class='object_link'><a href="EventCallbackable.html#observe_first-instance_method" title="Puppeteer::EventCallbackable#observe_first (method)">#observe_first</a></span>, <span class='object_link'><a href="EventCallbackable.html#on_event-instance_method" title="Puppeteer::EventCallbackable#on_event (method)">#on_event</a></span>, <span class='object_link'><a href="EventCallbackable.html#remove_event_listener-instance_method" title="Puppeteer::EventCallbackable#remove_event_listener (method)">#remove_event_listener</a></span></p>
318
- <div id="constructor_details" class="method_details_list">
319
- <h2>Constructor Details</h2>
320
-
321
- <div class="method_details first">
322
- <h3 class="signature first" id="initialize-instance_method">
323
-
324
- #<strong>initialize</strong>(connection, browser, context_id) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>
325
-
326
-
327
-
328
-
329
-
330
- </h3><div class="docstring">
331
- <div class="discussion">
332
-
333
- <p>Returns a new instance of BrowserContext.</p>
334
-
335
-
336
- </div>
337
- </div>
338
- <div class="tags">
339
- <p class="tag_title">Parameters:</p>
340
- <ul class="param">
341
-
342
- <li>
343
-
344
- <span class='name'>connection</span>
345
-
346
-
347
- <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Connection.html" title="Puppeteer::Connection (class)">Connection</a></span></tt>)</span>
348
-
349
-
350
-
351
- </li>
352
-
353
- <li>
354
-
355
- <span class='name'>browser</span>
356
-
357
-
358
- <span class='type'>(<tt>!<span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>)</span>
359
-
360
-
361
-
362
- </li>
363
-
364
- <li>
365
-
366
- <span class='name'>contextId</span>
367
-
368
-
369
- <span class='type'>(<tt>?string</tt>)</span>
370
-
371
-
372
-
373
- </li>
374
-
375
- </ul>
376
-
377
-
378
- </div><table class="source_code">
379
- <tr>
380
- <td>
381
- <pre class="lines">
382
-
383
-
384
- 7
385
- 8
386
- 9
387
- 10
388
- 11</pre>
389
- </td>
390
- <td>
391
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 7</span>
392
-
393
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_connection'>connection</span><span class='comma'>,</span> <span class='id identifier rubyid_browser'>browser</span><span class='comma'>,</span> <span class='id identifier rubyid_context_id'>context_id</span><span class='rparen'>)</span>
394
- <span class='ivar'>@connection</span> <span class='op'>=</span> <span class='id identifier rubyid_connection'>connection</span>
395
- <span class='ivar'>@browser</span> <span class='op'>=</span> <span class='id identifier rubyid_browser'>browser</span>
396
- <span class='ivar'>@id</span> <span class='op'>=</span> <span class='id identifier rubyid_context_id'>context_id</span>
397
- <span class='kw'>end</span></pre>
398
- </td>
399
- </tr>
400
- </table>
401
- </div>
402
-
403
- </div>
404
-
405
-
406
- <div id="instance_method_details" class="method_details_list">
407
- <h2>Instance Method Details</h2>
408
-
409
-
410
- <div class="method_details first">
411
- <h3 class="signature first" id="browser-instance_method">
412
-
413
- #<strong>browser</strong> &#x21d2; <tt><span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>
414
-
415
-
416
-
417
-
418
-
419
- </h3><div class="docstring">
420
- <div class="discussion">
421
-
422
-
423
- </div>
424
- </div>
425
- <div class="tags">
426
-
427
- <p class="tag_title">Returns:</p>
428
- <ul class="return">
429
-
430
- <li>
431
-
432
-
433
- <span class='type'>(<tt><span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>)</span>
434
-
435
-
436
-
437
- </li>
438
-
439
- </ul>
440
-
441
- </div><table class="source_code">
442
- <tr>
443
- <td>
444
- <pre class="lines">
445
-
446
-
447
- 80
448
- 81
449
- 82</pre>
450
- </td>
451
- <td>
452
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 80</span>
453
-
454
- <span class='kw'>def</span> <span class='id identifier rubyid_browser'>browser</span>
455
- <span class='ivar'>@browser</span>
456
- <span class='kw'>end</span></pre>
457
- </td>
458
- </tr>
459
- </table>
460
- </div>
461
-
462
- <div class="method_details ">
463
- <h3 class="signature " id="close-instance_method">
464
-
465
- #<strong>close</strong> &#x21d2; <tt>Object</tt>
466
-
467
-
468
-
469
-
470
-
471
- </h3><table class="source_code">
472
- <tr>
473
- <td>
474
- <pre class="lines">
475
-
476
-
477
- 84
478
- 85
479
- 86
480
- 87
481
- 88
482
- 89</pre>
483
- </td>
484
- <td>
485
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 84</span>
486
-
487
- <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
488
- <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@id</span>
489
- <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Non-incognito profiles cannot be closed!</span><span class='tstring_end'>&#39;</span></span>
490
- <span class='kw'>end</span>
491
- <span class='ivar'>@browser</span><span class='period'>.</span><span class='id identifier rubyid_dispose_context'>dispose_context</span><span class='lparen'>(</span><span class='ivar'>@id</span><span class='rparen'>)</span>
492
- <span class='kw'>end</span></pre>
493
- </td>
494
- </tr>
495
- </table>
496
- </div>
497
-
498
- <div class="method_details ">
499
- <h3 class="signature " id="incognito?-instance_method">
500
-
501
- #<strong>incognito?</strong> &#x21d2; <tt>Boolean</tt>
502
-
503
-
504
-
505
-
506
-
507
- </h3><div class="docstring">
508
- <div class="discussion">
509
-
510
-
511
- </div>
512
- </div>
513
- <div class="tags">
514
-
515
- <p class="tag_title">Returns:</p>
516
- <ul class="return">
517
-
518
- <li>
519
-
520
-
521
- <span class='type'>(<tt>Boolean</tt>)</span>
522
-
523
-
524
-
525
- </li>
526
-
527
- </ul>
528
-
529
- </div><table class="source_code">
530
- <tr>
531
- <td>
532
- <pre class="lines">
533
-
534
-
535
- 33
536
- 34
537
- 35</pre>
538
- </td>
539
- <td>
540
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 33</span>
541
-
542
- <span class='kw'>def</span> <span class='id identifier rubyid_incognito?'>incognito?</span>
543
- <span class='op'>!</span><span class='ivar'>@id</span>
544
- <span class='kw'>end</span></pre>
545
- </td>
546
- </tr>
547
- </table>
548
- </div>
549
-
550
- <div class="method_details ">
551
- <h3 class="signature " id="new_page-instance_method">
552
-
553
- #<strong>new_page</strong> &#x21d2; <tt>Future&lt;<span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Puppeteer::Page</a></span>&gt;</tt>
554
-
555
-
556
-
557
-
558
-
559
- </h3><div class="docstring">
560
- <div class="discussion">
561
-
562
-
563
- </div>
564
- </div>
565
- <div class="tags">
566
-
567
- <p class="tag_title">Returns:</p>
568
- <ul class="return">
569
-
570
- <li>
571
-
572
-
573
- <span class='type'>(<tt>Future&lt;<span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Puppeteer::Page</a></span>&gt;</tt>)</span>
574
-
575
-
576
-
577
- </li>
578
-
579
- </ul>
580
-
581
- </div><table class="source_code">
582
- <tr>
583
- <td>
584
- <pre class="lines">
585
-
586
-
587
- 75
588
- 76
589
- 77</pre>
590
- </td>
591
- <td>
592
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 75</span>
593
-
594
- <span class='kw'>def</span> <span class='id identifier rubyid_new_page'>new_page</span>
595
- <span class='ivar'>@browser</span><span class='period'>.</span><span class='id identifier rubyid_create_page_in_context'>create_page_in_context</span><span class='lparen'>(</span><span class='ivar'>@id</span><span class='rparen'>)</span>
596
- <span class='kw'>end</span></pre>
597
- </td>
598
- </tr>
599
- </table>
600
- </div>
601
-
602
- <div class="method_details ">
603
- <h3 class="signature " id="pages-instance_method">
604
-
605
- #<strong>pages</strong> &#x21d2; <tt>!Promise&lt;!Array&lt;!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Page</a></span>&gt;&gt;</tt>
606
-
607
-
608
-
609
-
610
-
611
- </h3><div class="docstring">
612
- <div class="discussion">
613
-
614
-
615
- </div>
616
- </div>
617
- <div class="tags">
618
-
619
- <p class="tag_title">Returns:</p>
620
- <ul class="return">
621
-
622
- <li>
623
-
624
-
625
- <span class='type'>(<tt>!Promise&lt;!Array&lt;!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Page</a></span>&gt;&gt;</tt>)</span>
626
-
627
-
628
-
629
- </li>
630
-
631
- </ul>
632
-
633
- </div><table class="source_code">
634
- <tr>
635
- <td>
636
- <pre class="lines">
637
-
638
-
639
- 29
640
- 30
641
- 31</pre>
642
- </td>
643
- <td>
644
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 29</span>
645
-
646
- <span class='kw'>def</span> <span class='id identifier rubyid_pages'>pages</span>
647
- <span class='id identifier rubyid_targets'>targets</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_target'>target</span><span class='op'>|</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>page</span><span class='tstring_end'>&#39;</span></span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:page</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_page'>page</span><span class='op'>|</span> <span class='op'>!</span><span class='id identifier rubyid_page'>page</span> <span class='rbrace'>}</span>
648
- <span class='kw'>end</span></pre>
649
- </td>
650
- </tr>
651
- </table>
652
- </div>
653
-
654
- <div class="method_details ">
655
- <h3 class="signature " id="targets-instance_method">
656
-
657
- #<strong>targets</strong> &#x21d2; <tt>!Array&lt;!<span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span>&gt;</tt>
658
-
659
-
660
-
661
-
662
-
663
- </h3><div class="docstring">
664
- <div class="discussion">
665
-
666
- <p>Returns target.</p>
667
-
668
-
669
- </div>
670
- </div>
671
- <div class="tags">
672
-
673
- <p class="tag_title">Returns:</p>
674
- <ul class="return">
675
-
676
- <li>
677
-
678
-
679
- <span class='type'>(<tt>!Array&lt;!<span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span>&gt;</tt>)</span>
680
-
681
-
682
-
683
- &mdash;
684
- <div class='inline'>
685
- <p>target</p>
686
- </div>
687
-
688
- </li>
689
-
690
- </ul>
691
-
692
- </div><table class="source_code">
693
- <tr>
694
- <td>
695
- <pre class="lines">
696
-
697
-
698
- 14
699
- 15
700
- 16</pre>
701
- </td>
702
- <td>
703
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 14</span>
704
-
705
- <span class='kw'>def</span> <span class='id identifier rubyid_targets'>targets</span>
706
- <span class='ivar'>@browser</span><span class='period'>.</span><span class='id identifier rubyid_targets'>targets</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_target'>target</span><span class='op'>|</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_browser_context'>browser_context</span> <span class='op'>==</span> <span class='kw'>self</span> <span class='rbrace'>}</span>
707
- <span class='kw'>end</span></pre>
708
- </td>
709
- </tr>
710
- </table>
711
- </div>
712
-
713
- <div class="method_details ">
714
- <h3 class="signature " id="wait_for_target-instance_method">
715
-
716
- #<strong>wait_for_target</strong>(predicate:, timeout: nil) &#x21d2; <tt>!Promise&lt;!<span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span>&gt;</tt>
717
-
718
-
719
-
720
-
721
-
722
- </h3><div class="docstring">
723
- <div class="discussion">
724
-
725
-
726
- </div>
727
- </div>
728
- <div class="tags">
729
- <p class="tag_title">Parameters:</p>
730
- <ul class="param">
731
-
732
- <li>
733
-
734
- <span class='name'>predicate</span>
735
-
736
-
737
- <span class='type'>(<tt>function(!<span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span>):boolean</tt>)</span>
738
-
739
-
740
-
741
- </li>
742
-
743
- <li>
744
-
745
- <span class='name'>options</span>
746
-
747
-
748
- <span class='type'>(<tt>{timeout?: number}=</tt>)</span>
749
-
750
-
751
-
752
- </li>
753
-
754
- </ul>
755
-
756
- <p class="tag_title">Returns:</p>
757
- <ul class="return">
758
-
759
- <li>
760
-
761
-
762
- <span class='type'>(<tt>!Promise&lt;!<span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span>&gt;</tt>)</span>
763
-
764
-
765
-
766
- </li>
767
-
768
- </ul>
769
-
770
- </div><table class="source_code">
771
- <tr>
772
- <td>
773
- <pre class="lines">
774
-
775
-
776
- 21
777
- 22
778
- 23
779
- 24
780
- 25
781
- 26</pre>
782
- </td>
783
- <td>
784
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_context.rb', line 21</span>
785
-
786
- <span class='kw'>def</span> <span class='id identifier rubyid_wait_for_target'>wait_for_target</span><span class='lparen'>(</span><span class='label'>predicate:</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
787
- <span class='ivar'>@browser</span><span class='period'>.</span><span class='id identifier rubyid_wait_for_target'>wait_for_target</span><span class='lparen'>(</span>
788
- <span class='label'>predicate:</span> <span class='tlambda'>-&gt;</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span> <span class='tlambeg'>{</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_browser_context'>browser_context</span> <span class='op'>==</span> <span class='kw'>self</span> <span class='op'>&amp;&amp;</span> <span class='id identifier rubyid_predicate'>predicate</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='id identifier rubyid_target'>target</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='comma'>,</span>
789
- <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span>
790
- <span class='rparen'>)</span>
791
- <span class='kw'>end</span></pre>
792
- </td>
793
- </tr>
794
- </table>
795
- </div>
796
-
797
- </div>
798
-
799
- </div>
800
-
801
- <div id="footer">
802
- Generated on Wed Jun 24 03:08:01 2020 by
803
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
804
- 0.9.24 (ruby-2.6.3).
805
- </div>
806
-
807
- </div>
808
- </body>
809
- </html>