puppeteer-ruby 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +71 -0
  3. data/.github/stale.yml +16 -0
  4. data/.gitignore +19 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +302 -0
  7. data/.travis.yml +7 -0
  8. data/Dockerfile +6 -0
  9. data/Gemfile +6 -0
  10. data/README.md +54 -0
  11. data/Rakefile +1 -0
  12. data/bin/console +11 -0
  13. data/bin/setup +8 -0
  14. data/docker-compose.yml +15 -0
  15. data/docs/Puppeteer.html +2020 -0
  16. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  17. data/docs/Puppeteer/Browser.html +2148 -0
  18. data/docs/Puppeteer/BrowserContext.html +809 -0
  19. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  20. data/docs/Puppeteer/BrowserRunner.html +914 -0
  21. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  22. data/docs/Puppeteer/CDPSession.html +813 -0
  23. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  24. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  25. data/docs/Puppeteer/Connection.html +960 -0
  26. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  27. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  28. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  29. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  30. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  31. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  32. data/docs/Puppeteer/DOMWorld.html +2219 -0
  33. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  34. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  35. data/docs/Puppeteer/DebugPrint.html +233 -0
  36. data/docs/Puppeteer/Device.html +470 -0
  37. data/docs/Puppeteer/Devices.html +139 -0
  38. data/docs/Puppeteer/ElementHandle.html +2542 -0
  39. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  40. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  41. data/docs/Puppeteer/ElementHandle/Point.html +492 -0
  42. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  43. data/docs/Puppeteer/EmulationManager.html +454 -0
  44. data/docs/Puppeteer/EventCallbackable.html +433 -0
  45. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  46. data/docs/Puppeteer/ExecutionContext.html +998 -0
  47. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  48. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  49. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  50. data/docs/Puppeteer/FileChooser.html +455 -0
  51. data/docs/Puppeteer/Frame.html +3677 -0
  52. data/docs/Puppeteer/FrameManager.html +2410 -0
  53. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  54. data/docs/Puppeteer/IfPresent.html +222 -0
  55. data/docs/Puppeteer/JSHandle.html +1352 -0
  56. data/docs/Puppeteer/Keyboard.html +1557 -0
  57. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  58. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  59. data/docs/Puppeteer/Launcher.html +237 -0
  60. data/docs/Puppeteer/Launcher/Base.html +385 -0
  61. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  62. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  63. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  64. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  65. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  66. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  67. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  68. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  69. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  70. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  71. data/docs/Puppeteer/Mouse.html +1105 -0
  72. data/docs/Puppeteer/Mouse/Button.html +136 -0
  73. data/docs/Puppeteer/NetworkManager.html +901 -0
  74. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  75. data/docs/Puppeteer/Page.html +5970 -0
  76. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  77. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  78. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  79. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  80. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  81. data/docs/Puppeteer/RemoteObject.html +1087 -0
  82. data/docs/Puppeteer/Target.html +1336 -0
  83. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  84. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  85. data/docs/Puppeteer/TimeoutError.html +135 -0
  86. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  87. data/docs/Puppeteer/TouchScreen.html +464 -0
  88. data/docs/Puppeteer/Viewport.html +837 -0
  89. data/docs/Puppeteer/WaitTask.html +637 -0
  90. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  91. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  92. data/docs/Puppeteer/WebSocket.html +673 -0
  93. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  94. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  95. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  96. data/docs/_index.html +823 -0
  97. data/docs/class_list.html +51 -0
  98. data/docs/css/common.css +1 -0
  99. data/docs/css/full_list.css +58 -0
  100. data/docs/css/style.css +496 -0
  101. data/docs/file.README.html +123 -0
  102. data/docs/file_list.html +56 -0
  103. data/docs/frames.html +17 -0
  104. data/docs/index.html +123 -0
  105. data/docs/js/app.js +314 -0
  106. data/docs/js/full_list.js +216 -0
  107. data/docs/js/jquery.js +4 -0
  108. data/docs/method_list.html +4075 -0
  109. data/docs/top-level-namespace.html +126 -0
  110. data/lib/puppeteer.rb +200 -0
  111. data/lib/puppeteer/async_await_behavior.rb +38 -0
  112. data/lib/puppeteer/browser.rb +259 -0
  113. data/lib/puppeteer/browser_context.rb +90 -0
  114. data/lib/puppeteer/browser_fetcher.rb +6 -0
  115. data/lib/puppeteer/browser_runner.rb +161 -0
  116. data/lib/puppeteer/cdp_session.rb +100 -0
  117. data/lib/puppeteer/concurrent_ruby_utils.rb +37 -0
  118. data/lib/puppeteer/connection.rb +254 -0
  119. data/lib/puppeteer/console_message.rb +24 -0
  120. data/lib/puppeteer/debug_print.rb +20 -0
  121. data/lib/puppeteer/device.rb +12 -0
  122. data/lib/puppeteer/devices.rb +885 -0
  123. data/lib/puppeteer/dom_world.rb +484 -0
  124. data/lib/puppeteer/element_handle.rb +433 -0
  125. data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
  126. data/lib/puppeteer/element_handle/box_model.rb +19 -0
  127. data/lib/puppeteer/element_handle/point.rb +26 -0
  128. data/lib/puppeteer/emulation_manager.rb +46 -0
  129. data/lib/puppeteer/errors.rb +2 -0
  130. data/lib/puppeteer/event_callbackable.rb +88 -0
  131. data/lib/puppeteer/execution_context.rb +254 -0
  132. data/lib/puppeteer/file_chooser.rb +29 -0
  133. data/lib/puppeteer/frame.rb +286 -0
  134. data/lib/puppeteer/frame_manager.rb +378 -0
  135. data/lib/puppeteer/if_present.rb +18 -0
  136. data/lib/puppeteer/js_handle.rb +142 -0
  137. data/lib/puppeteer/keyboard.rb +183 -0
  138. data/lib/puppeteer/keyboard/key_description.rb +19 -0
  139. data/lib/puppeteer/keyboard/us_keyboard_layout.rb +283 -0
  140. data/lib/puppeteer/launcher.rb +25 -0
  141. data/lib/puppeteer/launcher/base.rb +48 -0
  142. data/lib/puppeteer/launcher/browser_options.rb +41 -0
  143. data/lib/puppeteer/launcher/chrome.rb +211 -0
  144. data/lib/puppeteer/launcher/chrome_arg_options.rb +49 -0
  145. data/lib/puppeteer/launcher/launch_options.rb +68 -0
  146. data/lib/puppeteer/lifecycle_watcher.rb +171 -0
  147. data/lib/puppeteer/mouse.rb +123 -0
  148. data/lib/puppeteer/network_manager.rb +122 -0
  149. data/lib/puppeteer/page.rb +1065 -0
  150. data/lib/puppeteer/page/screenshot_options.rb +78 -0
  151. data/lib/puppeteer/remote_object.rb +143 -0
  152. data/lib/puppeteer/target.rb +150 -0
  153. data/lib/puppeteer/timeout_settings.rb +15 -0
  154. data/lib/puppeteer/touch_screen.rb +43 -0
  155. data/lib/puppeteer/version.rb +3 -0
  156. data/lib/puppeteer/viewport.rb +54 -0
  157. data/lib/puppeteer/wait_task.rb +188 -0
  158. data/lib/puppeteer/web_socket.rb +122 -0
  159. data/lib/puppeteer/web_socket_transport.rb +49 -0
  160. data/puppeteer-ruby.gemspec +32 -0
  161. metadata +355 -0
@@ -0,0 +1,809 @@
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#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 Fri Jun 12 12:38:35 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>