puppeteer-ruby 0.0.3 → 0.0.9

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 +30 -0
  3. data/.github/stale.yml +16 -0
  4. data/.rubocop.yml +4 -5
  5. data/README.md +4 -1
  6. data/docs/Puppeteer.html +2020 -0
  7. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  8. data/docs/Puppeteer/Browser.html +2148 -0
  9. data/docs/Puppeteer/BrowserContext.html +809 -0
  10. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  11. data/docs/Puppeteer/BrowserRunner.html +914 -0
  12. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  13. data/docs/Puppeteer/CDPSession.html +813 -0
  14. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  15. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  16. data/docs/Puppeteer/Connection.html +960 -0
  17. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  18. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  19. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  20. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  21. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  22. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  23. data/docs/Puppeteer/DOMWorld.html +2219 -0
  24. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  25. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  26. data/docs/Puppeteer/DebugPrint.html +233 -0
  27. data/docs/Puppeteer/Device.html +470 -0
  28. data/docs/Puppeteer/Devices.html +139 -0
  29. data/docs/Puppeteer/ElementHandle.html +2224 -0
  30. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  31. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  32. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  33. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  34. data/docs/Puppeteer/EmulationManager.html +454 -0
  35. data/docs/Puppeteer/EventCallbackable.html +433 -0
  36. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  37. data/docs/Puppeteer/ExecutionContext.html +998 -0
  38. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  39. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  40. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  41. data/docs/Puppeteer/FileChooser.html +455 -0
  42. data/docs/Puppeteer/Frame.html +3677 -0
  43. data/docs/Puppeteer/FrameManager.html +2410 -0
  44. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  45. data/docs/Puppeteer/IfPresent.html +222 -0
  46. data/docs/Puppeteer/JSHandle.html +1352 -0
  47. data/docs/Puppeteer/Keyboard.html +1557 -0
  48. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  49. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  50. data/docs/Puppeteer/Launcher.html +237 -0
  51. data/docs/Puppeteer/Launcher/Base.html +385 -0
  52. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  53. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  54. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  55. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  56. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  57. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  58. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  59. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  60. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  61. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  62. data/docs/Puppeteer/Mouse.html +1105 -0
  63. data/docs/Puppeteer/Mouse/Button.html +136 -0
  64. data/docs/Puppeteer/NetworkManager.html +901 -0
  65. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  66. data/docs/Puppeteer/Page.html +5970 -0
  67. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  68. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  69. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  70. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  71. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  72. data/docs/Puppeteer/RemoteObject.html +1016 -0
  73. data/docs/Puppeteer/Target.html +1314 -0
  74. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  75. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  76. data/docs/Puppeteer/TimeoutError.html +135 -0
  77. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  78. data/docs/Puppeteer/TouchScreen.html +464 -0
  79. data/docs/Puppeteer/Viewport.html +757 -0
  80. data/docs/Puppeteer/WaitTask.html +637 -0
  81. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  82. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  83. data/docs/Puppeteer/WebSocket.html +673 -0
  84. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  85. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  86. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  87. data/docs/_index.html +809 -0
  88. data/docs/class_list.html +51 -0
  89. data/docs/css/common.css +1 -0
  90. data/docs/css/full_list.css +58 -0
  91. data/docs/css/style.css +496 -0
  92. data/docs/file.README.html +123 -0
  93. data/docs/file_list.html +56 -0
  94. data/docs/frames.html +17 -0
  95. data/docs/index.html +123 -0
  96. data/docs/js/app.js +314 -0
  97. data/docs/js/full_list.js +216 -0
  98. data/docs/js/jquery.js +4 -0
  99. data/docs/method_list.html +3971 -0
  100. data/docs/top-level-namespace.html +126 -0
  101. data/lib/puppeteer.rb +16 -8
  102. data/lib/puppeteer/async_await_behavior.rb +6 -0
  103. data/lib/puppeteer/browser.rb +24 -5
  104. data/lib/puppeteer/browser_runner.rb +1 -1
  105. data/lib/puppeteer/cdp_session.rb +33 -11
  106. data/lib/puppeteer/connection.rb +1 -1
  107. data/lib/puppeteer/dom_world.rb +142 -121
  108. data/lib/puppeteer/element_handle.rb +223 -181
  109. data/lib/puppeteer/execution_context.rb +41 -17
  110. data/lib/puppeteer/file_chooser.rb +29 -0
  111. data/lib/puppeteer/frame.rb +23 -15
  112. data/lib/puppeteer/frame_manager.rb +7 -9
  113. data/lib/puppeteer/js_handle.rb +3 -3
  114. data/lib/puppeteer/keyboard.rb +1 -1
  115. data/lib/puppeteer/keyboard/us_keyboard_layout.rb +4 -4
  116. data/lib/puppeteer/launcher.rb +0 -1
  117. data/lib/puppeteer/launcher/chrome.rb +48 -2
  118. data/lib/puppeteer/lifecycle_watcher.rb +9 -4
  119. data/lib/puppeteer/mouse.rb +10 -7
  120. data/lib/puppeteer/page.rb +134 -70
  121. data/lib/puppeteer/remote_object.rb +11 -1
  122. data/lib/puppeteer/target.rb +16 -13
  123. data/lib/puppeteer/version.rb +1 -1
  124. data/lib/puppeteer/wait_task.rb +183 -1
  125. data/puppeteer-ruby.gemspec +4 -1
  126. metadata +143 -4
@@ -0,0 +1,1314 @@
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::Target
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::Target";
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 (T)</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">Target</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::Target
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::Target</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+ <dl>
96
+ <dt>Defined in:</dt>
97
+ <dd>lib/puppeteer/target.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p><a href="https://github.com/puppeteer/puppeteer/blob/master/lib/Target.js">github.com/puppeteer/puppeteer/blob/master/lib/Target.js</a></p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><h2>Defined Under Namespace</h2>
114
+ <p class="children">
115
+
116
+
117
+
118
+
119
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="Target/InitializeFailure.html" title="Puppeteer::Target::InitializeFailure (class)">InitializeFailure</a></span>, <span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span>
120
+
121
+
122
+ </p>
123
+
124
+
125
+
126
+
127
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
128
+ <ul class="summary">
129
+
130
+ <li class="public ">
131
+ <span class="summary_signature">
132
+
133
+ <a href="#initialized_promise-instance_method" title="#initialized_promise (instance method)">#<strong>initialized_promise</strong> &#x21d2; Object </a>
134
+
135
+
136
+
137
+ </span>
138
+
139
+
140
+
141
+
142
+ <span class="note title readonly">readonly</span>
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+ <span class="summary_desc"><div class='inline'>
153
+ <p>Returns the value of attribute initialized_promise.</p>
154
+ </div></span>
155
+
156
+ </li>
157
+
158
+
159
+ <li class="public ">
160
+ <span class="summary_signature">
161
+
162
+ <a href="#target_id-instance_method" title="#target_id (instance method)">#<strong>target_id</strong> &#x21d2; Object </a>
163
+
164
+
165
+
166
+ </span>
167
+
168
+
169
+
170
+
171
+ <span class="note title readonly">readonly</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+ <span class="summary_desc"><div class='inline'>
182
+ <p>Returns the value of attribute target_id.</p>
183
+ </div></span>
184
+
185
+ </li>
186
+
187
+
188
+ </ul>
189
+
190
+
191
+
192
+
193
+
194
+ <h2>
195
+ Instance Method Summary
196
+ <small><a href="#" class="summary_toggle">collapse</a></small>
197
+ </h2>
198
+
199
+ <ul class="summary">
200
+
201
+ <li class="public ">
202
+ <span class="summary_signature">
203
+
204
+ <a href="#browser-instance_method" title="#browser (instance method)">#<strong>browser</strong> &#x21d2; !Puppeteer.Browser </a>
205
+
206
+
207
+
208
+ </span>
209
+
210
+
211
+
212
+
213
+
214
+
215
+
216
+
217
+
218
+ <span class="summary_desc"><div class='inline'></div></span>
219
+
220
+ </li>
221
+
222
+
223
+ <li class="public ">
224
+ <span class="summary_signature">
225
+
226
+ <a href="#browser_context-instance_method" title="#browser_context (instance method)">#<strong>browser_context</strong> &#x21d2; !Puppeteer.BrowserContext </a>
227
+
228
+
229
+
230
+ </span>
231
+
232
+
233
+
234
+
235
+
236
+
237
+
238
+
239
+
240
+ <span class="summary_desc"><div class='inline'></div></span>
241
+
242
+ </li>
243
+
244
+
245
+ <li class="public ">
246
+ <span class="summary_signature">
247
+
248
+ <a href="#create_cdp_session-instance_method" title="#create_cdp_session (instance method)">#<strong>create_cdp_session</strong> &#x21d2; Object </a>
249
+
250
+
251
+
252
+ </span>
253
+
254
+
255
+
256
+
257
+
258
+
259
+
260
+
261
+
262
+ <span class="summary_desc"><div class='inline'></div></span>
263
+
264
+ </li>
265
+
266
+
267
+ <li class="public ">
268
+ <span class="summary_signature">
269
+
270
+ <a href="#handle_closed-instance_method" title="#handle_closed (instance method)">#<strong>handle_closed</strong> &#x21d2; Object </a>
271
+
272
+
273
+
274
+ </span>
275
+
276
+
277
+
278
+
279
+
280
+
281
+
282
+
283
+
284
+ <span class="summary_desc"><div class='inline'></div></span>
285
+
286
+ </li>
287
+
288
+
289
+ <li class="public ">
290
+ <span class="summary_signature">
291
+
292
+ <a href="#handle_target_info_changed-instance_method" title="#handle_target_info_changed (instance method)">#<strong>handle_target_info_changed</strong>(target_info) &#x21d2; Object </a>
293
+
294
+
295
+
296
+ </span>
297
+
298
+
299
+
300
+
301
+
302
+
303
+
304
+
305
+
306
+ <span class="summary_desc"><div class='inline'></div></span>
307
+
308
+ </li>
309
+
310
+
311
+ <li class="public ">
312
+ <span class="summary_signature">
313
+
314
+ <a href="#ignore_initialize_callback_promise-instance_method" title="#ignore_initialize_callback_promise (instance method)">#<strong>ignore_initialize_callback_promise</strong> &#x21d2; Object </a>
315
+
316
+
317
+
318
+ </span>
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+
327
+
328
+ <span class="summary_desc"><div class='inline'></div></span>
329
+
330
+ </li>
331
+
332
+
333
+ <li class="public ">
334
+ <span class="summary_signature">
335
+
336
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(target_info:, browser_context:, session_factory:, ignore_https_errors:, default_viewport:, screenshot_task_queue:) &#x21d2; Target </a>
337
+
338
+
339
+
340
+ </span>
341
+
342
+
343
+ <span class="note title constructor">constructor</span>
344
+
345
+
346
+
347
+
348
+
349
+
350
+
351
+
352
+ <span class="summary_desc"><div class='inline'>
353
+ <p>A new instance of Target.</p>
354
+ </div></span>
355
+
356
+ </li>
357
+
358
+
359
+ <li class="public ">
360
+ <span class="summary_signature">
361
+
362
+ <a href="#initialized%3F-instance_method" title="#initialized? (instance method)">#<strong>initialized?</strong> &#x21d2; Boolean </a>
363
+
364
+
365
+
366
+ </span>
367
+
368
+
369
+
370
+
371
+
372
+
373
+
374
+
375
+
376
+ <span class="summary_desc"><div class='inline'></div></span>
377
+
378
+ </li>
379
+
380
+
381
+ <li class="public ">
382
+ <span class="summary_signature">
383
+
384
+ <a href="#on_close-instance_method" title="#on_close (instance method)">#<strong>on_close</strong>(&amp;block) &#x21d2; Object </a>
385
+
386
+
387
+
388
+ </span>
389
+
390
+
391
+
392
+
393
+
394
+
395
+
396
+
397
+
398
+ <span class="summary_desc"><div class='inline'></div></span>
399
+
400
+ </li>
401
+
402
+
403
+ <li class="public ">
404
+ <span class="summary_signature">
405
+
406
+ <a href="#opener-instance_method" title="#opener (instance method)">#<strong>opener</strong> &#x21d2; ?Puppeteer.Target </a>
407
+
408
+
409
+
410
+ </span>
411
+
412
+
413
+
414
+
415
+
416
+
417
+
418
+
419
+
420
+ <span class="summary_desc"><div class='inline'></div></span>
421
+
422
+ </li>
423
+
424
+
425
+ <li class="public ">
426
+ <span class="summary_signature">
427
+
428
+ <a href="#page-instance_method" title="#page (instance method)">#<strong>page</strong> &#x21d2; Object </a>
429
+
430
+
431
+
432
+ </span>
433
+
434
+
435
+
436
+
437
+
438
+
439
+
440
+
441
+
442
+ <span class="summary_desc"><div class='inline'></div></span>
443
+
444
+ </li>
445
+
446
+
447
+ <li class="public ">
448
+ <span class="summary_signature">
449
+
450
+ <a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> &#x21d2; &quot;page&quot;|&quot;background_page&quot;|&quot;service_worker&quot;|&quot;shared_worker&quot;|&quot;other&quot;|&quot;browser&quot; </a>
451
+
452
+
453
+
454
+ </span>
455
+
456
+
457
+
458
+
459
+
460
+
461
+
462
+
463
+
464
+ <span class="summary_desc"><div class='inline'></div></span>
465
+
466
+ </li>
467
+
468
+
469
+ <li class="public ">
470
+ <span class="summary_signature">
471
+
472
+ <a href="#url-instance_method" title="#url (instance method)">#<strong>url</strong> &#x21d2; string </a>
473
+
474
+
475
+
476
+ </span>
477
+
478
+
479
+
480
+
481
+
482
+
483
+
484
+
485
+
486
+ <span class="summary_desc"><div class='inline'></div></span>
487
+
488
+ </li>
489
+
490
+
491
+ </ul>
492
+
493
+
494
+ <div id="constructor_details" class="method_details_list">
495
+ <h2>Constructor Details</h2>
496
+
497
+ <div class="method_details first">
498
+ <h3 class="signature first" id="initialize-instance_method">
499
+
500
+ #<strong>initialize</strong>(target_info:, browser_context:, session_factory:, ignore_https_errors:, default_viewport:, screenshot_task_queue:) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>
501
+
502
+
503
+
504
+
505
+
506
+ </h3><div class="docstring">
507
+ <div class="discussion">
508
+
509
+ <p>Returns a new instance of Target.</p>
510
+
511
+
512
+ </div>
513
+ </div>
514
+ <div class="tags">
515
+ <p class="tag_title">Parameters:</p>
516
+ <ul class="param">
517
+
518
+ <li>
519
+
520
+ <span class='name'>targetInfo</span>
521
+
522
+
523
+ <span class='type'>(<tt>!Protocol.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span>.<span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></tt>)</span>
524
+
525
+
526
+
527
+ </li>
528
+
529
+ <li>
530
+
531
+ <span class='name'>browserContext</span>
532
+
533
+
534
+ <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>)</span>
535
+
536
+
537
+
538
+ </li>
539
+
540
+ <li>
541
+
542
+ <span class='name'>sessionFactory</span>
543
+
544
+
545
+ <span class='type'>(<tt>!function():!Promise&lt;!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span>&gt;</tt>)</span>
546
+
547
+
548
+
549
+ </li>
550
+
551
+ <li>
552
+
553
+ <span class='name'>ignoreHTTPSErrors</span>
554
+
555
+
556
+ <span class='type'>(<tt>boolean</tt>)</span>
557
+
558
+
559
+
560
+ </li>
561
+
562
+ <li>
563
+
564
+ <span class='name'>defaultViewport</span>
565
+
566
+
567
+ <span class='type'>(<tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Viewport.html" title="Puppeteer::Viewport (class)">Viewport</a></span></tt>)</span>
568
+
569
+
570
+
571
+ </li>
572
+
573
+ <li>
574
+
575
+ <span class='name'>screenshotTaskQueue</span>
576
+
577
+
578
+ <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.TaskQueue</tt>)</span>
579
+
580
+
581
+
582
+ </li>
583
+
584
+ </ul>
585
+
586
+
587
+ </div><table class="source_code">
588
+ <tr>
589
+ <td>
590
+ <pre class="lines">
591
+
592
+
593
+ 22
594
+ 23
595
+ 24
596
+ 25
597
+ 26
598
+ 27
599
+ 28
600
+ 29
601
+ 30
602
+ 31
603
+ 32
604
+ 33
605
+ 34
606
+ 35
607
+ 36
608
+ 37
609
+ 38
610
+ 39
611
+ 40
612
+ 41
613
+ 42
614
+ 43
615
+ 44
616
+ 45
617
+ 46
618
+ 47</pre>
619
+ </td>
620
+ <td>
621
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 22</span>
622
+
623
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>target_info:</span><span class='comma'>,</span> <span class='label'>browser_context:</span><span class='comma'>,</span> <span class='label'>session_factory:</span><span class='comma'>,</span> <span class='label'>ignore_https_errors:</span><span class='comma'>,</span> <span class='label'>default_viewport:</span><span class='comma'>,</span> <span class='label'>screenshot_task_queue:</span><span class='rparen'>)</span>
624
+ <span class='ivar'>@target_info</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span>
625
+ <span class='ivar'>@browser_context</span> <span class='op'>=</span> <span class='id identifier rubyid_browser_context'>browser_context</span>
626
+ <span class='ivar'>@target_id</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span><span class='period'>.</span><span class='id identifier rubyid_target_id'>target_id</span>
627
+ <span class='ivar'>@session_factory</span> <span class='op'>=</span> <span class='id identifier rubyid_session_factory'>session_factory</span>
628
+ <span class='ivar'>@ignore_https_errors</span> <span class='op'>=</span> <span class='id identifier rubyid_ignore_https_errors'>ignore_https_errors</span>
629
+ <span class='ivar'>@default_viewport</span> <span class='op'>=</span> <span class='id identifier rubyid_default_viewport'>default_viewport</span>
630
+ <span class='ivar'>@screenshot_task_queue</span> <span class='op'>=</span> <span class='id identifier rubyid_screenshot_task_queue'>screenshot_task_queue</span>
631
+
632
+
633
+ <span class='comment'># /** @type {?Promise&lt;!Puppeteer.Page&gt;} */
634
+ </span> <span class='comment'># this._pagePromise = null;
635
+ </span> <span class='comment'># /** @type {?Promise&lt;!Worker&gt;} */
636
+ </span> <span class='comment'># this._workerPromise = null;
637
+ </span> <span class='ivar'>@initialize_callback_promise</span> <span class='op'>=</span> <span class='id identifier rubyid_resolvable_future'><span class='object_link'><a href="ConcurrentRubyUtils.html#resolvable_future-instance_method" title="Puppeteer::ConcurrentRubyUtils#resolvable_future (method)">resolvable_future</a></span></span>
638
+ <span class='ivar'>@initialized_promise</span> <span class='op'>=</span> <span class='ivar'>@initialize_callback_promise</span><span class='period'>.</span><span class='id identifier rubyid_then'>then</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_success'>success</span><span class='op'>|</span>
639
+ <span class='id identifier rubyid_handle_initialized'>handle_initialized</span><span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span><span class='rparen'>)</span>
640
+ <span class='kw'>end</span>
641
+ <span class='comment'># this._isClosedPromise = new Promise(fulfill =&gt; this._closedCallback = fulfill);
642
+ </span>
643
+ <span class='ivar'>@is_initialized</span> <span class='op'>=</span> <span class='ivar'>@target_info</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='op'>||</span> <span class='op'>!</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
644
+
645
+ <span class='kw'>if</span> <span class='ivar'>@is_initialized</span>
646
+ <span class='ivar'>@initialize_callback_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
647
+ <span class='kw'>end</span>
648
+ <span class='kw'>end</span></pre>
649
+ </td>
650
+ </tr>
651
+ </table>
652
+ </div>
653
+
654
+ </div>
655
+
656
+ <div id="instance_attr_details" class="attr_details">
657
+ <h2>Instance Attribute Details</h2>
658
+
659
+
660
+ <span id=""></span>
661
+ <div class="method_details first">
662
+ <h3 class="signature first" id="initialized_promise-instance_method">
663
+
664
+ #<strong>initialized_promise</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
665
+
666
+
667
+
668
+
669
+
670
+ </h3><div class="docstring">
671
+ <div class="discussion">
672
+
673
+ <p>Returns the value of attribute initialized_promise.</p>
674
+
675
+
676
+ </div>
677
+ </div>
678
+ <div class="tags">
679
+
680
+
681
+ </div><table class="source_code">
682
+ <tr>
683
+ <td>
684
+ <pre class="lines">
685
+
686
+
687
+ 49
688
+ 50
689
+ 51</pre>
690
+ </td>
691
+ <td>
692
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 49</span>
693
+
694
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialized_promise'>initialized_promise</span>
695
+ <span class='ivar'>@initialized_promise</span>
696
+ <span class='kw'>end</span></pre>
697
+ </td>
698
+ </tr>
699
+ </table>
700
+ </div>
701
+
702
+
703
+ <span id=""></span>
704
+ <div class="method_details ">
705
+ <h3 class="signature " id="target_id-instance_method">
706
+
707
+ #<strong>target_id</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
708
+
709
+
710
+
711
+
712
+
713
+ </h3><div class="docstring">
714
+ <div class="discussion">
715
+
716
+ <p>Returns the value of attribute target_id.</p>
717
+
718
+
719
+ </div>
720
+ </div>
721
+ <div class="tags">
722
+
723
+
724
+ </div><table class="source_code">
725
+ <tr>
726
+ <td>
727
+ <pre class="lines">
728
+
729
+
730
+ 49
731
+ 50
732
+ 51</pre>
733
+ </td>
734
+ <td>
735
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 49</span>
736
+
737
+ <span class='kw'>def</span> <span class='id identifier rubyid_target_id'>target_id</span>
738
+ <span class='ivar'>@target_id</span>
739
+ <span class='kw'>end</span></pre>
740
+ </td>
741
+ </tr>
742
+ </table>
743
+ </div>
744
+
745
+ </div>
746
+
747
+
748
+ <div id="instance_method_details" class="method_details_list">
749
+ <h2>Instance Method Details</h2>
750
+
751
+
752
+ <div class="method_details first">
753
+ <h3 class="signature first" id="browser-instance_method">
754
+
755
+ #<strong>browser</strong> &#x21d2; <tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>
756
+
757
+
758
+
759
+
760
+
761
+ </h3><div class="docstring">
762
+ <div class="discussion">
763
+
764
+
765
+ </div>
766
+ </div>
767
+ <div class="tags">
768
+
769
+ <p class="tag_title">Returns:</p>
770
+ <ul class="return">
771
+
772
+ <li>
773
+
774
+
775
+ <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>)</span>
776
+
777
+
778
+
779
+ </li>
780
+
781
+ </ul>
782
+
783
+ </div><table class="source_code">
784
+ <tr>
785
+ <td>
786
+ <pre class="lines">
787
+
788
+
789
+ 128
790
+ 129
791
+ 130</pre>
792
+ </td>
793
+ <td>
794
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 128</span>
795
+
796
+ <span class='kw'>def</span> <span class='id identifier rubyid_browser'>browser</span>
797
+ <span class='ivar'>@browser_context</span><span class='period'>.</span><span class='id identifier rubyid_browser'>browser</span>
798
+ <span class='kw'>end</span></pre>
799
+ </td>
800
+ </tr>
801
+ </table>
802
+ </div>
803
+
804
+ <div class="method_details ">
805
+ <h3 class="signature " id="browser_context-instance_method">
806
+
807
+ #<strong>browser_context</strong> &#x21d2; <tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>
808
+
809
+
810
+
811
+
812
+
813
+ </h3><div class="docstring">
814
+ <div class="discussion">
815
+
816
+
817
+ </div>
818
+ </div>
819
+ <div class="tags">
820
+
821
+ <p class="tag_title">Returns:</p>
822
+ <ul class="return">
823
+
824
+ <li>
825
+
826
+
827
+ <span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>)</span>
828
+
829
+
830
+
831
+ </li>
832
+
833
+ </ul>
834
+
835
+ </div><table class="source_code">
836
+ <tr>
837
+ <td>
838
+ <pre class="lines">
839
+
840
+
841
+ 133
842
+ 134
843
+ 135</pre>
844
+ </td>
845
+ <td>
846
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 133</span>
847
+
848
+ <span class='kw'>def</span> <span class='id identifier rubyid_browser_context'>browser_context</span>
849
+ <span class='ivar'>@browser_context</span>
850
+ <span class='kw'>end</span></pre>
851
+ </td>
852
+ </tr>
853
+ </table>
854
+ </div>
855
+
856
+ <div class="method_details ">
857
+ <h3 class="signature " id="create_cdp_session-instance_method">
858
+
859
+ #<strong>create_cdp_session</strong> &#x21d2; <tt>Object</tt>
860
+
861
+
862
+
863
+
864
+
865
+ </h3><table class="source_code">
866
+ <tr>
867
+ <td>
868
+ <pre class="lines">
869
+
870
+
871
+ 86
872
+ 87
873
+ 88</pre>
874
+ </td>
875
+ <td>
876
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 86</span>
877
+
878
+ <span class='kw'>def</span> <span class='id identifier rubyid_create_cdp_session'>create_cdp_session</span>
879
+ <span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
880
+ <span class='kw'>end</span></pre>
881
+ </td>
882
+ </tr>
883
+ </table>
884
+ </div>
885
+
886
+ <div class="method_details ">
887
+ <h3 class="signature " id="handle_closed-instance_method">
888
+
889
+ #<strong>handle_closed</strong> &#x21d2; <tt>Object</tt>
890
+
891
+
892
+
893
+
894
+
895
+ </h3><table class="source_code">
896
+ <tr>
897
+ <td>
898
+ <pre class="lines">
899
+
900
+
901
+ 73
902
+ 74
903
+ 75
904
+ 76</pre>
905
+ </td>
906
+ <td>
907
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 73</span>
908
+
909
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_closed'>handle_closed</span>
910
+ <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>true</span>
911
+ <span class='ivar'>@on_close</span><span class='op'>&amp;.</span><span class='id identifier rubyid_call'>call</span>
912
+ <span class='kw'>end</span></pre>
913
+ </td>
914
+ </tr>
915
+ </table>
916
+ </div>
917
+
918
+ <div class="method_details ">
919
+ <h3 class="signature " id="handle_target_info_changed-instance_method">
920
+
921
+ #<strong>handle_target_info_changed</strong>(target_info) &#x21d2; <tt>Object</tt>
922
+
923
+
924
+
925
+
926
+
927
+ </h3><div class="docstring">
928
+ <div class="discussion">
929
+
930
+
931
+ </div>
932
+ </div>
933
+ <div class="tags">
934
+ <p class="tag_title">Parameters:</p>
935
+ <ul class="param">
936
+
937
+ <li>
938
+
939
+ <span class='name'>targetInfo</span>
940
+
941
+
942
+ <span class='type'>(<tt>!Protocol.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span>.<span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></tt>)</span>
943
+
944
+
945
+
946
+ </li>
947
+
948
+ </ul>
949
+
950
+
951
+ </div><table class="source_code">
952
+ <tr>
953
+ <td>
954
+ <pre class="lines">
955
+
956
+
957
+ 145
958
+ 146
959
+ 147
960
+ 148
961
+ 149
962
+ 150
963
+ 151
964
+ 152</pre>
965
+ </td>
966
+ <td>
967
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 145</span>
968
+
969
+ <span class='kw'>def</span> <span class='id identifier rubyid_handle_target_info_changed'>handle_target_info_changed</span><span class='lparen'>(</span><span class='id identifier rubyid_target_info'>target_info</span><span class='rparen'>)</span>
970
+ <span class='ivar'>@target_info</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span>
971
+
972
+ <span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@is_initialized</span> <span class='op'>&amp;&amp;</span> <span class='lparen'>(</span><span class='ivar'>@target_info</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='op'>||</span> <span class='op'>!</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span><span class='rparen'>)</span>
973
+ <span class='ivar'>@is_initialized</span> <span class='op'>=</span> <span class='kw'>true</span>
974
+ <span class='ivar'>@initialize_callback_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
975
+ <span class='kw'>end</span>
976
+ <span class='kw'>end</span></pre>
977
+ </td>
978
+ </tr>
979
+ </table>
980
+ </div>
981
+
982
+ <div class="method_details ">
983
+ <h3 class="signature " id="ignore_initialize_callback_promise-instance_method">
984
+
985
+ #<strong>ignore_initialize_callback_promise</strong> &#x21d2; <tt>Object</tt>
986
+
987
+
988
+
989
+
990
+
991
+ </h3><table class="source_code">
992
+ <tr>
993
+ <td>
994
+ <pre class="lines">
995
+
996
+
997
+ 53
998
+ 54
999
+ 55</pre>
1000
+ </td>
1001
+ <td>
1002
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 53</span>
1003
+
1004
+ <span class='kw'>def</span> <span class='id identifier rubyid_ignore_initialize_callback_promise'>ignore_initialize_callback_promise</span>
1005
+ <span class='ivar'>@initialize_callback_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='kw'>false</span><span class='rparen'>)</span>
1006
+ <span class='kw'>end</span></pre>
1007
+ </td>
1008
+ </tr>
1009
+ </table>
1010
+ </div>
1011
+
1012
+ <div class="method_details ">
1013
+ <h3 class="signature " id="initialized?-instance_method">
1014
+
1015
+ #<strong>initialized?</strong> &#x21d2; <tt>Boolean</tt>
1016
+
1017
+
1018
+
1019
+
1020
+
1021
+ </h3><div class="docstring">
1022
+ <div class="discussion">
1023
+
1024
+
1025
+ </div>
1026
+ </div>
1027
+ <div class="tags">
1028
+
1029
+ <p class="tag_title">Returns:</p>
1030
+ <ul class="return">
1031
+
1032
+ <li>
1033
+
1034
+
1035
+ <span class='type'>(<tt>Boolean</tt>)</span>
1036
+
1037
+
1038
+
1039
+ </li>
1040
+
1041
+ </ul>
1042
+
1043
+ </div><table class="source_code">
1044
+ <tr>
1045
+ <td>
1046
+ <pre class="lines">
1047
+
1048
+
1049
+ 82
1050
+ 83
1051
+ 84</pre>
1052
+ </td>
1053
+ <td>
1054
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 82</span>
1055
+
1056
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialized?'>initialized?</span>
1057
+ <span class='ivar'>@is_initialized</span>
1058
+ <span class='kw'>end</span></pre>
1059
+ </td>
1060
+ </tr>
1061
+ </table>
1062
+ </div>
1063
+
1064
+ <div class="method_details ">
1065
+ <h3 class="signature " id="on_close-instance_method">
1066
+
1067
+ #<strong>on_close</strong>(&amp;block) &#x21d2; <tt>Object</tt>
1068
+
1069
+
1070
+
1071
+
1072
+
1073
+ </h3><table class="source_code">
1074
+ <tr>
1075
+ <td>
1076
+ <pre class="lines">
1077
+
1078
+
1079
+ 78
1080
+ 79
1081
+ 80</pre>
1082
+ </td>
1083
+ <td>
1084
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 78</span>
1085
+
1086
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_close'>on_close</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
1087
+ <span class='ivar'>@on_close</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
1088
+ <span class='kw'>end</span></pre>
1089
+ </td>
1090
+ </tr>
1091
+ </table>
1092
+ </div>
1093
+
1094
+ <div class="method_details ">
1095
+ <h3 class="signature " id="opener-instance_method">
1096
+
1097
+ #<strong>opener</strong> &#x21d2; <tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>
1098
+
1099
+
1100
+
1101
+
1102
+
1103
+ </h3><div class="docstring">
1104
+ <div class="discussion">
1105
+
1106
+
1107
+ </div>
1108
+ </div>
1109
+ <div class="tags">
1110
+
1111
+ <p class="tag_title">Returns:</p>
1112
+ <ul class="return">
1113
+
1114
+ <li>
1115
+
1116
+
1117
+ <span class='type'>(<tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>)</span>
1118
+
1119
+
1120
+
1121
+ </li>
1122
+
1123
+ </ul>
1124
+
1125
+ </div><table class="source_code">
1126
+ <tr>
1127
+ <td>
1128
+ <pre class="lines">
1129
+
1130
+
1131
+ 138
1132
+ 139
1133
+ 140
1134
+ 141
1135
+ 142</pre>
1136
+ </td>
1137
+ <td>
1138
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 138</span>
1139
+
1140
+ <span class='kw'>def</span> <span class='id identifier rubyid_opener'>opener</span>
1141
+ <span class='id identifier rubyid_opener_id'>opener_id</span> <span class='op'>=</span> <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_opener_id'>opener_id</span>
1142
+ <span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_opener_id'>opener_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1143
+ <span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier rubyid_targets'>targets</span><span class='lbracket'>[</span><span class='id identifier rubyid_opener_id'>opener_id</span><span class='rbracket'>]</span>
1144
+ <span class='kw'>end</span></pre>
1145
+ </td>
1146
+ </tr>
1147
+ </table>
1148
+ </div>
1149
+
1150
+ <div class="method_details ">
1151
+ <h3 class="signature " id="page-instance_method">
1152
+
1153
+ #<strong>page</strong> &#x21d2; <tt>Object</tt>
1154
+
1155
+
1156
+
1157
+
1158
+
1159
+ </h3><table class="source_code">
1160
+ <tr>
1161
+ <td>
1162
+ <pre class="lines">
1163
+
1164
+
1165
+ 90
1166
+ 91
1167
+ 92
1168
+ 93
1169
+ 94
1170
+ 95
1171
+ 96</pre>
1172
+ </td>
1173
+ <td>
1174
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 90</span>
1175
+
1176
+ <span class='kw'>def</span> <span class='id identifier rubyid_page'>page</span>
1177
+ <span class='kw'>if</span> <span class='lbracket'>[</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='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>background_page</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>webview</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='op'>&amp;&amp;</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
1178
+ <span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
1179
+ <span class='ivar'>@page</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Page</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="Page.html#create-class_method" title="Puppeteer::Page.create (method)">create</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='ivar'>@ignore_https_errors</span><span class='comma'>,</span> <span class='ivar'>@default_viewport</span><span class='comma'>,</span> <span class='ivar'>@screenshot_task_queue</span><span class='rparen'>)</span>
1180
+ <span class='kw'>end</span>
1181
+ <span class='ivar'>@page</span>
1182
+ <span class='kw'>end</span></pre>
1183
+ </td>
1184
+ </tr>
1185
+ </table>
1186
+ </div>
1187
+
1188
+ <div class="method_details ">
1189
+ <h3 class="signature " id="type-instance_method">
1190
+
1191
+ #<strong>type</strong> &#x21d2; <tt>"<span class='object_link'><a href="#page-instance_method" title="Puppeteer::Target#page (method)">page</a></span>"|"background_page"|"service_worker"|"shared_worker"|"other"|"<span class='object_link'><a href="#browser-instance_method" title="Puppeteer::Target#browser (method)">browser</a></span>"</tt>
1192
+
1193
+
1194
+
1195
+
1196
+
1197
+ </h3><div class="docstring">
1198
+ <div class="discussion">
1199
+
1200
+
1201
+ </div>
1202
+ </div>
1203
+ <div class="tags">
1204
+
1205
+ <p class="tag_title">Returns:</p>
1206
+ <ul class="return">
1207
+
1208
+ <li>
1209
+
1210
+
1211
+ <span class='type'>(<tt>"<span class='object_link'><a href="#page-instance_method" title="Puppeteer::Target#page (method)">page</a></span>"|"background_page"|"service_worker"|"shared_worker"|"other"|"<span class='object_link'><a href="#browser-instance_method" title="Puppeteer::Target#browser (method)">browser</a></span>"</tt>)</span>
1212
+
1213
+
1214
+
1215
+ </li>
1216
+
1217
+ </ul>
1218
+
1219
+ </div><table class="source_code">
1220
+ <tr>
1221
+ <td>
1222
+ <pre class="lines">
1223
+
1224
+
1225
+ 118
1226
+ 119
1227
+ 120
1228
+ 121
1229
+ 122
1230
+ 123
1231
+ 124
1232
+ 125</pre>
1233
+ </td>
1234
+ <td>
1235
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 118</span>
1236
+
1237
+ <span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
1238
+ <span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
1239
+ <span class='kw'>if</span> <span class='lbracket'>[</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='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>background_page</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>service_worker</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>shared_worker</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>browser</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
1240
+ <span class='id identifier rubyid_type'>type</span>
1241
+ <span class='kw'>else</span>
1242
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>other</span><span class='tstring_end'>&#39;</span></span>
1243
+ <span class='kw'>end</span>
1244
+ <span class='kw'>end</span></pre>
1245
+ </td>
1246
+ </tr>
1247
+ </table>
1248
+ </div>
1249
+
1250
+ <div class="method_details ">
1251
+ <h3 class="signature " id="url-instance_method">
1252
+
1253
+ #<strong>url</strong> &#x21d2; <tt>string</tt>
1254
+
1255
+
1256
+
1257
+
1258
+
1259
+ </h3><div class="docstring">
1260
+ <div class="discussion">
1261
+
1262
+
1263
+ </div>
1264
+ </div>
1265
+ <div class="tags">
1266
+
1267
+ <p class="tag_title">Returns:</p>
1268
+ <ul class="return">
1269
+
1270
+ <li>
1271
+
1272
+
1273
+ <span class='type'>(<tt>string</tt>)</span>
1274
+
1275
+
1276
+
1277
+ </li>
1278
+
1279
+ </ul>
1280
+
1281
+ </div><table class="source_code">
1282
+ <tr>
1283
+ <td>
1284
+ <pre class="lines">
1285
+
1286
+
1287
+ 113
1288
+ 114
1289
+ 115</pre>
1290
+ </td>
1291
+ <td>
1292
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 113</span>
1293
+
1294
+ <span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
1295
+ <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span>
1296
+ <span class='kw'>end</span></pre>
1297
+ </td>
1298
+ </tr>
1299
+ </table>
1300
+ </div>
1301
+
1302
+ </div>
1303
+
1304
+ </div>
1305
+
1306
+ <div id="footer">
1307
+ Generated on Tue Jun 9 00:13:39 2020 by
1308
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1309
+ 0.9.24 (ruby-2.6.3).
1310
+ </div>
1311
+
1312
+ </div>
1313
+ </body>
1314
+ </html>