puppeteer-ruby 0.0.8 → 0.0.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/docs/Puppeteer.html +415 -97
- data/docs/Puppeteer/AsyncAwaitBehavior.html +1 -1
- data/docs/Puppeteer/Browser.html +261 -153
- data/docs/Puppeteer/BrowserContext.html +2 -2
- data/docs/Puppeteer/BrowserFetcher.html +1 -1
- data/docs/Puppeteer/BrowserRunner.html +1 -1
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +1 -1
- data/docs/Puppeteer/CDPSession.html +2 -2
- data/docs/Puppeteer/CDPSession/Error.html +1 -1
- data/docs/Puppeteer/ConcurrentRubyUtils.html +14 -6
- data/docs/Puppeteer/Connection.html +66 -62
- data/docs/Puppeteer/Connection/MessageCallback.html +1 -1
- data/docs/Puppeteer/Connection/ProtocolError.html +1 -1
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +5 -5
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +12 -12
- data/docs/Puppeteer/ConsoleMessage.html +1 -1
- data/docs/Puppeteer/ConsoleMessage/Location.html +1 -1
- data/docs/Puppeteer/DOMWorld.html +106 -32
- data/docs/Puppeteer/DOMWorld/DetachedError.html +1 -1
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +1 -1
- data/docs/Puppeteer/DebugPrint.html +1 -1
- data/docs/Puppeteer/Device.html +1 -1
- data/docs/Puppeteer/Devices.html +1 -1
- data/docs/Puppeteer/ElementHandle.html +525 -207
- data/docs/Puppeteer/ElementHandle/BoundingBox.html +507 -0
- data/docs/Puppeteer/ElementHandle/BoxModel.html +404 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +5 -5
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +5 -5
- data/docs/Puppeteer/ElementHandle/Point.html +40 -29
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +1 -1
- data/docs/Puppeteer/EmulationManager.html +1 -1
- data/docs/Puppeteer/EventCallbackable.html +83 -17
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +1 -1
- data/docs/Puppeteer/ExecutionContext.html +1 -1
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +1 -1
- data/docs/Puppeteer/FileChooser.html +1 -1
- data/docs/Puppeteer/Frame.html +450 -292
- data/docs/Puppeteer/FrameManager.html +23 -27
- data/docs/Puppeteer/FrameManager/NavigationError.html +1 -1
- data/docs/Puppeteer/IfPresent.html +1 -1
- data/docs/Puppeteer/JSHandle.html +1 -1
- data/docs/Puppeteer/Keyboard.html +1 -1
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +1 -1
- data/docs/Puppeteer/Keyboard/KeyDescription.html +1 -1
- data/docs/Puppeteer/Launcher.html +1 -1
- data/docs/Puppeteer/Launcher/Base.html +1 -1
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +1 -1
- data/docs/Puppeteer/Launcher/BrowserOptions.html +1 -1
- data/docs/Puppeteer/Launcher/Chrome.html +36 -31
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +1 -1
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +1 -1
- data/docs/Puppeteer/Launcher/LaunchOptions.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +1 -1
- data/docs/Puppeteer/Mouse.html +31 -41
- data/docs/Puppeteer/Mouse/Button.html +1 -1
- data/docs/Puppeteer/NetworkManager.html +2 -2
- data/docs/Puppeteer/NetworkManager/Credentials.html +1 -1
- data/docs/Puppeteer/Page.html +502 -299
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +5 -5
- data/docs/Puppeteer/Page/ScreenshotOptions.html +1 -1
- data/docs/Puppeteer/Page/ScriptTag.html +24 -24
- data/docs/Puppeteer/Page/StyleTag.html +19 -19
- data/docs/Puppeteer/Page/TargetCrashedError.html +1 -1
- data/docs/Puppeteer/RemoteObject.html +110 -39
- data/docs/Puppeteer/Target.html +150 -198
- data/docs/Puppeteer/Target/InitializeFailure.html +1 -1
- data/docs/Puppeteer/Target/TargetInfo.html +1 -1
- data/docs/Puppeteer/TimeoutError.html +2 -2
- data/docs/Puppeteer/TimeoutSettings.html +1 -1
- data/docs/Puppeteer/TouchScreen.html +1 -1
- data/docs/Puppeteer/Viewport.html +81 -1
- data/docs/Puppeteer/WaitTask.html +1 -1
- data/docs/Puppeteer/WaitTask/TerminatedError.html +1 -1
- data/docs/Puppeteer/WaitTask/TimeoutError.html +1 -1
- data/docs/Puppeteer/WebSocket.html +26 -26
- data/docs/Puppeteer/WebSocket/DriverImpl.html +1 -1
- data/docs/Puppeteer/WebSocket/TransportError.html +124 -0
- data/docs/Puppeteer/WebSocketTransport.html +9 -9
- data/docs/Puppeteer/WebSocktTransportError.html +1 -1
- data/docs/_index.html +28 -21
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +3 -1
- data/docs/index.html +3 -1
- data/docs/method_list.html +659 -515
- data/docs/top-level-namespace.html +1 -1
- data/lib/puppeteer.rb +36 -12
- data/lib/puppeteer/browser.rb +26 -6
- data/lib/puppeteer/concurrent_ruby_utils.rb +6 -2
- data/lib/puppeteer/connection.rb +13 -1
- data/lib/puppeteer/dom_world.rb +11 -12
- data/lib/puppeteer/element_handle.rb +66 -108
- data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
- data/lib/puppeteer/element_handle/box_model.rb +19 -0
- data/lib/puppeteer/element_handle/point.rb +26 -0
- data/lib/puppeteer/errors.rb +1 -3
- data/lib/puppeteer/event_callbackable.rb +11 -0
- data/lib/puppeteer/frame.rb +20 -1
- data/lib/puppeteer/launcher.rb +6 -6
- data/lib/puppeteer/launcher/chrome.rb +10 -8
- data/lib/puppeteer/mouse.rb +3 -8
- data/lib/puppeteer/page.rb +43 -4
- data/lib/puppeteer/remote_object.rb +9 -0
- data/lib/puppeteer/target.rb +25 -25
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/viewport.rb +18 -0
- data/lib/puppeteer/web_socket.rb +3 -1
- data/lib/puppeteer/web_socket_transport.rb +8 -8
- data/puppeteer-ruby.png +0 -0
- metadata +9 -4
- data/Dockerfile +0 -6
- data/docker-compose.yml +0 -15
|
@@ -175,12 +175,12 @@
|
|
|
175
175
|
<pre class="lines">
|
|
176
176
|
|
|
177
177
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
178
|
+
181
|
|
179
|
+
182
|
|
180
|
+
183</pre>
|
|
181
181
|
</td>
|
|
182
182
|
<td>
|
|
183
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
183
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 181</span>
|
|
184
184
|
|
|
185
185
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>timeout:</span><span class='rparen'>)</span>
|
|
186
186
|
<span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>waiting for filechooser failed: timeout </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timeout'>timeout</span><span class='embexpr_end'>}</span><span class='tstring_content'>ms exceeded</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
|
@@ -196,7 +196,7 @@
|
|
|
196
196
|
</div>
|
|
197
197
|
|
|
198
198
|
<div id="footer">
|
|
199
|
-
Generated on
|
|
199
|
+
Generated on Wed Jun 24 03:07:59 2020 by
|
|
200
200
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
201
201
|
0.9.24 (ruby-2.6.3).
|
|
202
202
|
</div>
|
|
@@ -835,7 +835,7 @@
|
|
|
835
835
|
</div>
|
|
836
836
|
|
|
837
837
|
<div id="footer">
|
|
838
|
-
Generated on
|
|
838
|
+
Generated on Wed Jun 24 03:08:01 2020 by
|
|
839
839
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
840
840
|
0.9.24 (ruby-2.6.3).
|
|
841
841
|
</div>
|
|
@@ -341,15 +341,15 @@ if (items.length)
|
|
|
341
341
|
<pre class="lines">
|
|
342
342
|
|
|
343
343
|
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
344
|
+
413
|
|
345
|
+
414
|
|
346
|
+
415
|
|
347
|
+
416
|
|
348
|
+
417
|
|
349
|
+
418</pre>
|
|
350
350
|
</td>
|
|
351
351
|
<td>
|
|
352
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
352
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 413</span>
|
|
353
353
|
|
|
354
354
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>content:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>type:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>url:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
355
355
|
<span class='ivar'>@content</span> <span class='op'>=</span> <span class='id identifier rubyid_content'>content</span>
|
|
@@ -395,12 +395,12 @@ if (items.length)
|
|
|
395
395
|
<pre class="lines">
|
|
396
396
|
|
|
397
397
|
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
398
|
+
419
|
|
399
|
+
420
|
|
400
|
+
421</pre>
|
|
401
401
|
</td>
|
|
402
402
|
<td>
|
|
403
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
403
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 419</span>
|
|
404
404
|
|
|
405
405
|
<span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span>
|
|
406
406
|
<span class='ivar'>@content</span>
|
|
@@ -438,12 +438,12 @@ if (items.length)
|
|
|
438
438
|
<pre class="lines">
|
|
439
439
|
|
|
440
440
|
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
441
|
+
419
|
|
442
|
+
420
|
|
443
|
+
421</pre>
|
|
444
444
|
</td>
|
|
445
445
|
<td>
|
|
446
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
446
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 419</span>
|
|
447
447
|
|
|
448
448
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
|
449
449
|
<span class='ivar'>@path</span>
|
|
@@ -481,12 +481,12 @@ if (items.length)
|
|
|
481
481
|
<pre class="lines">
|
|
482
482
|
|
|
483
483
|
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
484
|
+
419
|
|
485
|
+
420
|
|
486
|
+
421</pre>
|
|
487
487
|
</td>
|
|
488
488
|
<td>
|
|
489
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
489
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 419</span>
|
|
490
490
|
|
|
491
491
|
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
|
492
492
|
<span class='ivar'>@type</span>
|
|
@@ -524,12 +524,12 @@ if (items.length)
|
|
|
524
524
|
<pre class="lines">
|
|
525
525
|
|
|
526
526
|
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
527
|
+
419
|
|
528
|
+
420
|
|
529
|
+
421</pre>
|
|
530
530
|
</td>
|
|
531
531
|
<td>
|
|
532
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
532
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 419</span>
|
|
533
533
|
|
|
534
534
|
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
|
535
535
|
<span class='ivar'>@url</span>
|
|
@@ -545,7 +545,7 @@ if (items.length)
|
|
|
545
545
|
</div>
|
|
546
546
|
|
|
547
547
|
<div id="footer">
|
|
548
|
-
Generated on
|
|
548
|
+
Generated on Wed Jun 24 03:07:59 2020 by
|
|
549
549
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
550
550
|
0.9.24 (ruby-2.6.3).
|
|
551
551
|
</div>
|
|
@@ -279,14 +279,14 @@
|
|
|
279
279
|
<pre class="lines">
|
|
280
280
|
|
|
281
281
|
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
282
|
+
430
|
|
283
|
+
431
|
|
284
|
+
432
|
|
285
|
+
433
|
|
286
|
+
434</pre>
|
|
287
287
|
</td>
|
|
288
288
|
<td>
|
|
289
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
289
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 430</span>
|
|
290
290
|
|
|
291
291
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>content:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>path:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>url:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
|
292
292
|
<span class='ivar'>@content</span> <span class='op'>=</span> <span class='id identifier rubyid_content'>content</span>
|
|
@@ -331,12 +331,12 @@
|
|
|
331
331
|
<pre class="lines">
|
|
332
332
|
|
|
333
333
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
334
|
+
435
|
|
335
|
+
436
|
|
336
|
+
437</pre>
|
|
337
337
|
</td>
|
|
338
338
|
<td>
|
|
339
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
339
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 435</span>
|
|
340
340
|
|
|
341
341
|
<span class='kw'>def</span> <span class='id identifier rubyid_content'>content</span>
|
|
342
342
|
<span class='ivar'>@content</span>
|
|
@@ -374,12 +374,12 @@
|
|
|
374
374
|
<pre class="lines">
|
|
375
375
|
|
|
376
376
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
377
|
+
435
|
|
378
|
+
436
|
|
379
|
+
437</pre>
|
|
380
380
|
</td>
|
|
381
381
|
<td>
|
|
382
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
382
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 435</span>
|
|
383
383
|
|
|
384
384
|
<span class='kw'>def</span> <span class='id identifier rubyid_path'>path</span>
|
|
385
385
|
<span class='ivar'>@path</span>
|
|
@@ -417,12 +417,12 @@
|
|
|
417
417
|
<pre class="lines">
|
|
418
418
|
|
|
419
419
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
420
|
+
435
|
|
421
|
+
436
|
|
422
|
+
437</pre>
|
|
423
423
|
</td>
|
|
424
424
|
<td>
|
|
425
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line
|
|
425
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/page.rb', line 435</span>
|
|
426
426
|
|
|
427
427
|
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
|
428
428
|
<span class='ivar'>@url</span>
|
|
@@ -438,7 +438,7 @@
|
|
|
438
438
|
</div>
|
|
439
439
|
|
|
440
440
|
<div id="footer">
|
|
441
|
-
Generated on
|
|
441
|
+
Generated on Wed Jun 24 03:07:59 2020 by
|
|
442
442
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
443
443
|
0.9.24 (ruby-2.6.3).
|
|
444
444
|
</div>
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
</div>
|
|
115
115
|
|
|
116
116
|
<div id="footer">
|
|
117
|
-
Generated on
|
|
117
|
+
Generated on Wed Jun 24 03:07:59 2020 by
|
|
118
118
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
119
119
|
0.9.24 (ruby-2.6.3).
|
|
120
120
|
</div>
|
|
@@ -167,6 +167,30 @@
|
|
|
167
167
|
<li class="public ">
|
|
168
168
|
<span class="summary_signature">
|
|
169
169
|
|
|
170
|
+
<a href="#box_model-instance_method" title="#box_model (instance method)">#<strong>box_model</strong>(client) ⇒ Object </a>
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
</span>
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
|
|
179
|
+
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
<span class="summary_desc"><div class='inline'>
|
|
185
|
+
<p>used in ElementHandle#_box_model.</p>
|
|
186
|
+
</div></span>
|
|
187
|
+
|
|
188
|
+
</li>
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
<li class="public ">
|
|
192
|
+
<span class="summary_signature">
|
|
193
|
+
|
|
170
194
|
<a href="#content_quads-instance_method" title="#content_quads (instance method)">#<strong>content_quads</strong>(client) ⇒ Object </a>
|
|
171
195
|
|
|
172
196
|
|
|
@@ -511,7 +535,54 @@
|
|
|
511
535
|
|
|
512
536
|
|
|
513
537
|
<div class="method_details first">
|
|
514
|
-
<h3 class="signature first" id="
|
|
538
|
+
<h3 class="signature first" id="box_model-instance_method">
|
|
539
|
+
|
|
540
|
+
#<strong>box_model</strong>(client) ⇒ <tt>Object</tt>
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
|
|
545
|
+
|
|
546
|
+
</h3><div class="docstring">
|
|
547
|
+
<div class="discussion">
|
|
548
|
+
|
|
549
|
+
<p>used in ElementHandle#_box_model</p>
|
|
550
|
+
|
|
551
|
+
|
|
552
|
+
</div>
|
|
553
|
+
</div>
|
|
554
|
+
<div class="tags">
|
|
555
|
+
|
|
556
|
+
|
|
557
|
+
</div><table class="source_code">
|
|
558
|
+
<tr>
|
|
559
|
+
<td>
|
|
560
|
+
<pre class="lines">
|
|
561
|
+
|
|
562
|
+
|
|
563
|
+
66
|
|
564
|
+
67
|
|
565
|
+
68
|
|
566
|
+
69
|
|
567
|
+
70
|
|
568
|
+
71</pre>
|
|
569
|
+
</td>
|
|
570
|
+
<td>
|
|
571
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 66</span>
|
|
572
|
+
|
|
573
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_box_model'>box_model</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
|
|
574
|
+
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOM.getBoxModel</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='rparen'>)</span>
|
|
575
|
+
<span class='kw'>rescue</span> <span class='op'>=></span> <span class='id identifier rubyid_err'>err</span>
|
|
576
|
+
<span class='id identifier rubyid_debug_puts'>debug_puts</span><span class='lparen'>(</span><span class='id identifier rubyid_err'>err</span><span class='rparen'>)</span>
|
|
577
|
+
<span class='kw'>nil</span>
|
|
578
|
+
<span class='kw'>end</span></pre>
|
|
579
|
+
</td>
|
|
580
|
+
</tr>
|
|
581
|
+
</table>
|
|
582
|
+
</div>
|
|
583
|
+
|
|
584
|
+
<div class="method_details ">
|
|
585
|
+
<h3 class="signature " id="content_quads-instance_method">
|
|
515
586
|
|
|
516
587
|
#<strong>content_quads</strong>(client) ⇒ <tt>Object</tt>
|
|
517
588
|
|
|
@@ -566,15 +637,6 @@
|
|
|
566
637
|
<pre class="lines">
|
|
567
638
|
|
|
568
639
|
|
|
569
|
-
110
|
|
570
|
-
111
|
|
571
|
-
112
|
|
572
|
-
113
|
|
573
|
-
114
|
|
574
|
-
115
|
|
575
|
-
116
|
|
576
|
-
117
|
|
577
|
-
118
|
|
578
640
|
119
|
|
579
641
|
120
|
|
580
642
|
121
|
|
@@ -584,10 +646,19 @@
|
|
|
584
646
|
125
|
|
585
647
|
126
|
|
586
648
|
127
|
|
587
|
-
128
|
|
649
|
+
128
|
|
650
|
+
129
|
|
651
|
+
130
|
|
652
|
+
131
|
|
653
|
+
132
|
|
654
|
+
133
|
|
655
|
+
134
|
|
656
|
+
135
|
|
657
|
+
136
|
|
658
|
+
137</pre>
|
|
588
659
|
</td>
|
|
589
660
|
<td>
|
|
590
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line
|
|
661
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 119</span>
|
|
591
662
|
|
|
592
663
|
<span class='kw'>def</span> <span class='id identifier rubyid_converted_arg'>converted_arg</span>
|
|
593
664
|
<span class='comment'># ported logic from ExecutionContext#convertArgument
|
|
@@ -844,24 +915,24 @@
|
|
|
844
915
|
<pre class="lines">
|
|
845
916
|
|
|
846
917
|
|
|
847
|
-
89
|
|
848
|
-
90
|
|
849
|
-
91
|
|
850
|
-
92
|
|
851
|
-
93
|
|
852
|
-
94
|
|
853
|
-
95
|
|
854
|
-
96
|
|
855
|
-
97
|
|
856
918
|
98
|
|
857
919
|
99
|
|
858
920
|
100
|
|
859
921
|
101
|
|
860
922
|
102
|
|
861
|
-
103
|
|
923
|
+
103
|
|
924
|
+
104
|
|
925
|
+
105
|
|
926
|
+
106
|
|
927
|
+
107
|
|
928
|
+
108
|
|
929
|
+
109
|
|
930
|
+
110
|
|
931
|
+
111
|
|
932
|
+
112</pre>
|
|
862
933
|
</td>
|
|
863
934
|
<td>
|
|
864
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line
|
|
935
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 98</span>
|
|
865
936
|
|
|
866
937
|
<span class='kw'>def</span> <span class='id identifier rubyid_release'>release</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
|
|
867
938
|
<span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@object_id</span>
|
|
@@ -909,12 +980,12 @@
|
|
|
909
980
|
<pre class="lines">
|
|
910
981
|
|
|
911
982
|
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
983
|
+
140
|
|
984
|
+
141
|
|
985
|
+
142</pre>
|
|
915
986
|
</td>
|
|
916
987
|
<td>
|
|
917
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line
|
|
988
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 140</span>
|
|
918
989
|
|
|
919
990
|
<span class='kw'>def</span> <span class='id identifier rubyid_set_file_input_files'>set_file_input_files</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='rparen'>)</span>
|
|
920
991
|
<span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOM.setFileInputFiles</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='comma'>,</span> <span class='label'>files:</span> <span class='id identifier rubyid_files'>files</span><span class='comma'>,</span> <span class='label'>backendNodeId:</span> <span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='rparen'>)</span>
|
|
@@ -950,15 +1021,6 @@
|
|
|
950
1021
|
<pre class="lines">
|
|
951
1022
|
|
|
952
1023
|
|
|
953
|
-
66
|
|
954
|
-
67
|
|
955
|
-
68
|
|
956
|
-
69
|
|
957
|
-
70
|
|
958
|
-
71
|
|
959
|
-
72
|
|
960
|
-
73
|
|
961
|
-
74
|
|
962
1024
|
75
|
|
963
1025
|
76
|
|
964
1026
|
77
|
|
@@ -970,10 +1032,19 @@
|
|
|
970
1032
|
83
|
|
971
1033
|
84
|
|
972
1034
|
85
|
|
973
|
-
86
|
|
1035
|
+
86
|
|
1036
|
+
87
|
|
1037
|
+
88
|
|
1038
|
+
89
|
|
1039
|
+
90
|
|
1040
|
+
91
|
|
1041
|
+
92
|
|
1042
|
+
93
|
|
1043
|
+
94
|
|
1044
|
+
95</pre>
|
|
974
1045
|
</td>
|
|
975
1046
|
<td>
|
|
976
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line
|
|
1047
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 75</span>
|
|
977
1048
|
|
|
978
1049
|
<span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
|
|
979
1050
|
<span class='kw'>if</span> <span class='ivar'>@unserializable_value</span>
|
|
@@ -1006,7 +1077,7 @@
|
|
|
1006
1077
|
</div>
|
|
1007
1078
|
|
|
1008
1079
|
<div id="footer">
|
|
1009
|
-
Generated on
|
|
1080
|
+
Generated on Wed Jun 24 03:08:01 2020 by
|
|
1010
1081
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1011
1082
|
0.9.24 (ruby-2.6.3).
|
|
1012
1083
|
</div>
|
data/docs/Puppeteer/Target.html
CHANGED
|
@@ -153,6 +153,35 @@
|
|
|
153
153
|
<p>Returns the value of attribute initialized_promise.</p>
|
|
154
154
|
</div></span>
|
|
155
155
|
|
|
156
|
+
</li>
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<li class="public ">
|
|
160
|
+
<span class="summary_signature">
|
|
161
|
+
|
|
162
|
+
<a href="#is_closed_promise-instance_method" title="#is_closed_promise (instance method)">#<strong>is_closed_promise</strong> ⇒ 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 is_closed_promise.</p>
|
|
183
|
+
</div></span>
|
|
184
|
+
|
|
156
185
|
</li>
|
|
157
186
|
|
|
158
187
|
|
|
@@ -245,7 +274,7 @@
|
|
|
245
274
|
<li class="public ">
|
|
246
275
|
<span class="summary_signature">
|
|
247
276
|
|
|
248
|
-
<a href="#
|
|
277
|
+
<a href="#closed_callback-instance_method" title="#closed_callback (instance method)">#<strong>closed_callback</strong> ⇒ Object </a>
|
|
249
278
|
|
|
250
279
|
|
|
251
280
|
|
|
@@ -267,7 +296,7 @@
|
|
|
267
296
|
<li class="public ">
|
|
268
297
|
<span class="summary_signature">
|
|
269
298
|
|
|
270
|
-
<a href="#
|
|
299
|
+
<a href="#create_cdp_session-instance_method" title="#create_cdp_session (instance method)">#<strong>create_cdp_session</strong> ⇒ Object </a>
|
|
271
300
|
|
|
272
301
|
|
|
273
302
|
|
|
@@ -289,7 +318,7 @@
|
|
|
289
318
|
<li class="public ">
|
|
290
319
|
<span class="summary_signature">
|
|
291
320
|
|
|
292
|
-
<a href="#
|
|
321
|
+
<a href="#handle_target_info_changed-instance_method" title="#handle_target_info_changed (instance method)">#<strong>handle_target_info_changed</strong>(target_info) ⇒ Object </a>
|
|
293
322
|
|
|
294
323
|
|
|
295
324
|
|
|
@@ -311,7 +340,7 @@
|
|
|
311
340
|
<li class="public ">
|
|
312
341
|
<span class="summary_signature">
|
|
313
342
|
|
|
314
|
-
<a href="#
|
|
343
|
+
<a href="#ignore_initialize_callback_promise-instance_method" title="#ignore_initialize_callback_promise (instance method)">#<strong>ignore_initialize_callback_promise</strong> ⇒ Object </a>
|
|
315
344
|
|
|
316
345
|
|
|
317
346
|
|
|
@@ -373,50 +402,6 @@
|
|
|
373
402
|
|
|
374
403
|
|
|
375
404
|
|
|
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>(&block) ⇒ 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="#on_initialize_succeeded-instance_method" title="#on_initialize_succeeded (instance method)">#<strong>on_initialize_succeeded</strong>(&block) ⇒ Object </a>
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
</span>
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
405
|
<span class="summary_desc"><div class='inline'></div></span>
|
|
421
406
|
|
|
422
407
|
</li>
|
|
@@ -634,7 +619,10 @@
|
|
|
634
619
|
41
|
|
635
620
|
42
|
|
636
621
|
43
|
|
637
|
-
44
|
|
622
|
+
44
|
|
623
|
+
45
|
|
624
|
+
46
|
|
625
|
+
47</pre>
|
|
638
626
|
</td>
|
|
639
627
|
<td>
|
|
640
628
|
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 22</span>
|
|
@@ -653,13 +641,16 @@
|
|
|
653
641
|
</span> <span class='comment'># this._pagePromise = null;
|
|
654
642
|
</span> <span class='comment'># /** @type {?Promise<!Worker>} */
|
|
655
643
|
</span> <span class='comment'># this._workerPromise = null;
|
|
656
|
-
</span> <span class='ivar'>@
|
|
657
|
-
<span class='
|
|
658
|
-
</span>
|
|
644
|
+
</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>
|
|
645
|
+
<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>
|
|
646
|
+
<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>
|
|
647
|
+
<span class='kw'>end</span>
|
|
648
|
+
<span class='ivar'>@is_closed_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>
|
|
649
|
+
|
|
659
650
|
<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'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</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>
|
|
660
651
|
|
|
661
652
|
<span class='kw'>if</span> <span class='ivar'>@is_initialized</span>
|
|
662
|
-
<span class='id identifier
|
|
653
|
+
<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>
|
|
663
654
|
<span class='kw'>end</span>
|
|
664
655
|
<span class='kw'>end</span></pre>
|
|
665
656
|
</td>
|
|
@@ -700,12 +691,12 @@
|
|
|
700
691
|
<pre class="lines">
|
|
701
692
|
|
|
702
693
|
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
694
|
+
49
|
|
695
|
+
50
|
|
696
|
+
51</pre>
|
|
706
697
|
</td>
|
|
707
698
|
<td>
|
|
708
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line
|
|
699
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 49</span>
|
|
709
700
|
|
|
710
701
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialized_promise'>initialized_promise</span>
|
|
711
702
|
<span class='ivar'>@initialized_promise</span>
|
|
@@ -716,6 +707,49 @@
|
|
|
716
707
|
</div>
|
|
717
708
|
|
|
718
709
|
|
|
710
|
+
<span id=""></span>
|
|
711
|
+
<div class="method_details ">
|
|
712
|
+
<h3 class="signature " id="is_closed_promise-instance_method">
|
|
713
|
+
|
|
714
|
+
#<strong>is_closed_promise</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
|
715
|
+
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
|
|
719
|
+
|
|
720
|
+
</h3><div class="docstring">
|
|
721
|
+
<div class="discussion">
|
|
722
|
+
|
|
723
|
+
<p>Returns the value of attribute is_closed_promise.</p>
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
</div>
|
|
727
|
+
</div>
|
|
728
|
+
<div class="tags">
|
|
729
|
+
|
|
730
|
+
|
|
731
|
+
</div><table class="source_code">
|
|
732
|
+
<tr>
|
|
733
|
+
<td>
|
|
734
|
+
<pre class="lines">
|
|
735
|
+
|
|
736
|
+
|
|
737
|
+
49
|
|
738
|
+
50
|
|
739
|
+
51</pre>
|
|
740
|
+
</td>
|
|
741
|
+
<td>
|
|
742
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 49</span>
|
|
743
|
+
|
|
744
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_is_closed_promise'>is_closed_promise</span>
|
|
745
|
+
<span class='ivar'>@is_closed_promise</span>
|
|
746
|
+
<span class='kw'>end</span></pre>
|
|
747
|
+
</td>
|
|
748
|
+
</tr>
|
|
749
|
+
</table>
|
|
750
|
+
</div>
|
|
751
|
+
|
|
752
|
+
|
|
719
753
|
<span id=""></span>
|
|
720
754
|
<div class="method_details ">
|
|
721
755
|
<h3 class="signature " id="target_id-instance_method">
|
|
@@ -743,12 +777,12 @@
|
|
|
743
777
|
<pre class="lines">
|
|
744
778
|
|
|
745
779
|
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
780
|
+
49
|
|
781
|
+
50
|
|
782
|
+
51</pre>
|
|
749
783
|
</td>
|
|
750
784
|
<td>
|
|
751
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line
|
|
785
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 49</span>
|
|
752
786
|
|
|
753
787
|
<span class='kw'>def</span> <span class='id identifier rubyid_target_id'>target_id</span>
|
|
754
788
|
<span class='ivar'>@target_id</span>
|
|
@@ -870,9 +904,9 @@
|
|
|
870
904
|
</div>
|
|
871
905
|
|
|
872
906
|
<div class="method_details ">
|
|
873
|
-
<h3 class="signature " id="
|
|
907
|
+
<h3 class="signature " id="closed_callback-instance_method">
|
|
874
908
|
|
|
875
|
-
#<strong>
|
|
909
|
+
#<strong>closed_callback</strong> ⇒ <tt>Object</tt>
|
|
876
910
|
|
|
877
911
|
|
|
878
912
|
|
|
@@ -884,47 +918,15 @@
|
|
|
884
918
|
<pre class="lines">
|
|
885
919
|
|
|
886
920
|
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
</td>
|
|
891
|
-
<td>
|
|
892
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 83</span>
|
|
893
|
-
|
|
894
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_create_cdp_session'>create_cdp_session</span>
|
|
895
|
-
<span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
|
896
|
-
<span class='kw'>end</span></pre>
|
|
897
|
-
</td>
|
|
898
|
-
</tr>
|
|
899
|
-
</table>
|
|
900
|
-
</div>
|
|
901
|
-
|
|
902
|
-
<div class="method_details ">
|
|
903
|
-
<h3 class="signature " id="handle_closed-instance_method">
|
|
904
|
-
|
|
905
|
-
#<strong>handle_closed</strong> ⇒ <tt>Object</tt>
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
</h3><table class="source_code">
|
|
912
|
-
<tr>
|
|
913
|
-
<td>
|
|
914
|
-
<pre class="lines">
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
70
|
|
918
|
-
71
|
|
919
|
-
72
|
|
920
|
-
73</pre>
|
|
921
|
+
51
|
|
922
|
+
52
|
|
923
|
+
53</pre>
|
|
921
924
|
</td>
|
|
922
925
|
<td>
|
|
923
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line
|
|
926
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 51</span>
|
|
924
927
|
|
|
925
|
-
<span class='kw'>def</span> <span class='id identifier
|
|
926
|
-
<span class='ivar'>@
|
|
927
|
-
<span class='ivar'>@on_close</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span>
|
|
928
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_closed_callback'>closed_callback</span>
|
|
929
|
+
<span class='ivar'>@is_closed_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>
|
|
928
930
|
<span class='kw'>end</span></pre>
|
|
929
931
|
</td>
|
|
930
932
|
</tr>
|
|
@@ -932,9 +934,9 @@
|
|
|
932
934
|
</div>
|
|
933
935
|
|
|
934
936
|
<div class="method_details ">
|
|
935
|
-
<h3 class="signature " id="
|
|
937
|
+
<h3 class="signature " id="create_cdp_session-instance_method">
|
|
936
938
|
|
|
937
|
-
#<strong>
|
|
939
|
+
#<strong>create_cdp_session</strong> ⇒ <tt>Object</tt>
|
|
938
940
|
|
|
939
941
|
|
|
940
942
|
|
|
@@ -946,39 +948,15 @@
|
|
|
946
948
|
<pre class="lines">
|
|
947
949
|
|
|
948
950
|
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
53
|
|
953
|
-
54
|
|
954
|
-
55
|
|
955
|
-
56
|
|
956
|
-
57
|
|
957
|
-
58
|
|
958
|
-
59
|
|
959
|
-
60
|
|
960
|
-
61
|
|
961
|
-
62
|
|
962
|
-
63
|
|
963
|
-
64</pre>
|
|
951
|
+
83
|
|
952
|
+
84
|
|
953
|
+
85</pre>
|
|
964
954
|
</td>
|
|
965
955
|
<td>
|
|
966
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line
|
|
956
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 83</span>
|
|
967
957
|
|
|
968
|
-
<span class='kw'>def</span> <span class='id identifier
|
|
969
|
-
<span class='
|
|
970
|
-
<span class='ivar'>@initialized_promise</span><span class='period'>.</span><span class='id identifier rubyid_reject'>reject</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="Target/InitializeFailure.html" title="Puppeteer::Target::InitializeFailure (class)">InitializeFailure</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::Target#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Failed to create target for page</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
|
971
|
-
<span class='kw'>end</span>
|
|
972
|
-
<span class='ivar'>@on_initialize_succeeded</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span>
|
|
973
|
-
<span class='ivar'>@initialized_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>
|
|
974
|
-
<span class='id identifier rubyid_opener_page'>opener_page</span> <span class='op'>=</span> <span class='id identifier rubyid_opener'>opener</span><span class='op'>&.</span><span class='id identifier rubyid_page'>page</span>
|
|
975
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_opener_page'>opener_page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span>
|
|
976
|
-
<span class='kw'>return</span>
|
|
977
|
-
<span class='kw'>end</span>
|
|
978
|
-
<span class='comment'># if (!openerPage.listenerCount(Events.Page.Popup))
|
|
979
|
-
</span> <span class='comment'># return true;
|
|
980
|
-
</span> <span class='id identifier rubyid_popup_page'>popup_page</span> <span class='op'>=</span> <span class='id identifier rubyid_page'>page</span>
|
|
981
|
-
<span class='id identifier rubyid_opener_page'>opener_page</span><span class='period'>.</span><span class='id identifier rubyid_emit_event'>emit_event</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Page.Popup</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_popup_page'>popup_page</span><span class='rparen'>)</span>
|
|
958
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_cdp_session'>create_cdp_session</span>
|
|
959
|
+
<span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
|
982
960
|
<span class='kw'>end</span></pre>
|
|
983
961
|
</td>
|
|
984
962
|
</tr>
|
|
@@ -1039,9 +1017,43 @@
|
|
|
1039
1017
|
<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>
|
|
1040
1018
|
<span class='ivar'>@target_info</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span>
|
|
1041
1019
|
|
|
1042
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@is_initialized</span> <span class='op'>&&</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'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='op'>!</span><span class='
|
|
1020
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@is_initialized</span> <span class='op'>&&</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'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</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>
|
|
1043
1021
|
<span class='ivar'>@is_initialized</span> <span class='op'>=</span> <span class='kw'>true</span>
|
|
1044
|
-
<span class='id identifier
|
|
1022
|
+
<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>
|
|
1023
|
+
<span class='kw'>end</span>
|
|
1024
|
+
<span class='kw'>end</span></pre>
|
|
1025
|
+
</td>
|
|
1026
|
+
</tr>
|
|
1027
|
+
</table>
|
|
1028
|
+
</div>
|
|
1029
|
+
|
|
1030
|
+
<div class="method_details ">
|
|
1031
|
+
<h3 class="signature " id="ignore_initialize_callback_promise-instance_method">
|
|
1032
|
+
|
|
1033
|
+
#<strong>ignore_initialize_callback_promise</strong> ⇒ <tt>Object</tt>
|
|
1034
|
+
|
|
1035
|
+
|
|
1036
|
+
|
|
1037
|
+
|
|
1038
|
+
|
|
1039
|
+
</h3><table class="source_code">
|
|
1040
|
+
<tr>
|
|
1041
|
+
<td>
|
|
1042
|
+
<pre class="lines">
|
|
1043
|
+
|
|
1044
|
+
|
|
1045
|
+
57
|
|
1046
|
+
58
|
|
1047
|
+
59
|
|
1048
|
+
60
|
|
1049
|
+
61</pre>
|
|
1050
|
+
</td>
|
|
1051
|
+
<td>
|
|
1052
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 57</span>
|
|
1053
|
+
|
|
1054
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_ignore_initialize_callback_promise'>ignore_initialize_callback_promise</span>
|
|
1055
|
+
<span class='kw'>unless</span> <span class='ivar'>@initialize_callback_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfilled?'>fulfilled?</span>
|
|
1056
|
+
<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>
|
|
1045
1057
|
<span class='kw'>end</span>
|
|
1046
1058
|
<span class='kw'>end</span></pre>
|
|
1047
1059
|
</td>
|
|
@@ -1099,66 +1111,6 @@
|
|
|
1099
1111
|
</td>
|
|
1100
1112
|
</tr>
|
|
1101
1113
|
</table>
|
|
1102
|
-
</div>
|
|
1103
|
-
|
|
1104
|
-
<div class="method_details ">
|
|
1105
|
-
<h3 class="signature " id="on_close-instance_method">
|
|
1106
|
-
|
|
1107
|
-
#<strong>on_close</strong>(&block) ⇒ <tt>Object</tt>
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
</h3><table class="source_code">
|
|
1114
|
-
<tr>
|
|
1115
|
-
<td>
|
|
1116
|
-
<pre class="lines">
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
75
|
|
1120
|
-
76
|
|
1121
|
-
77</pre>
|
|
1122
|
-
</td>
|
|
1123
|
-
<td>
|
|
1124
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 75</span>
|
|
1125
|
-
|
|
1126
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_close'>on_close</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
1127
|
-
<span class='ivar'>@on_close</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
|
1128
|
-
<span class='kw'>end</span></pre>
|
|
1129
|
-
</td>
|
|
1130
|
-
</tr>
|
|
1131
|
-
</table>
|
|
1132
|
-
</div>
|
|
1133
|
-
|
|
1134
|
-
<div class="method_details ">
|
|
1135
|
-
<h3 class="signature " id="on_initialize_succeeded-instance_method">
|
|
1136
|
-
|
|
1137
|
-
#<strong>on_initialize_succeeded</strong>(&block) ⇒ <tt>Object</tt>
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
</h3><table class="source_code">
|
|
1144
|
-
<tr>
|
|
1145
|
-
<td>
|
|
1146
|
-
<pre class="lines">
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
66
|
|
1150
|
-
67
|
|
1151
|
-
68</pre>
|
|
1152
|
-
</td>
|
|
1153
|
-
<td>
|
|
1154
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 66</span>
|
|
1155
|
-
|
|
1156
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_on_initialize_succeeded'>on_initialize_succeeded</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
|
1157
|
-
<span class='ivar'>@on_initialize_succeeded</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
|
1158
|
-
<span class='kw'>end</span></pre>
|
|
1159
|
-
</td>
|
|
1160
|
-
</tr>
|
|
1161
|
-
</table>
|
|
1162
1114
|
</div>
|
|
1163
1115
|
|
|
1164
1116
|
<div class="method_details ">
|
|
@@ -1210,7 +1162,7 @@
|
|
|
1210
1162
|
<span class='kw'>def</span> <span class='id identifier rubyid_opener'>opener</span>
|
|
1211
1163
|
<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>
|
|
1212
1164
|
<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>
|
|
1213
|
-
<span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier
|
|
1165
|
+
<span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier rubyid_send'>send</span><span class='lparen'>(</span><span class='symbol'>:find_target_by_id</span><span class='comma'>,</span> <span class='id identifier rubyid_opener_id'>opener_id</span><span class='rparen'>)</span>
|
|
1214
1166
|
<span class='kw'>end</span></pre>
|
|
1215
1167
|
</td>
|
|
1216
1168
|
</tr>
|
|
@@ -1244,7 +1196,7 @@
|
|
|
1244
1196
|
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 87</span>
|
|
1245
1197
|
|
|
1246
1198
|
<span class='kw'>def</span> <span class='id identifier rubyid_page'>page</span>
|
|
1247
|
-
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>background_page</span><span class='tstring_end'>'</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'>&&</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
1199
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>background_page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>webview</span><span class='tstring_end'>'</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'>&&</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
|
1248
1200
|
<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>
|
|
1249
1201
|
<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>
|
|
1250
1202
|
<span class='kw'>end</span>
|
|
@@ -1374,7 +1326,7 @@
|
|
|
1374
1326
|
</div>
|
|
1375
1327
|
|
|
1376
1328
|
<div id="footer">
|
|
1377
|
-
Generated on
|
|
1329
|
+
Generated on Wed Jun 24 03:07:59 2020 by
|
|
1378
1330
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
|
1379
1331
|
0.9.24 (ruby-2.6.3).
|
|
1380
1332
|
</div>
|