puppeteer-ruby 0.0.6 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +5 -2
- data/docs/Puppeteer.html +432 -104
- 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 +130 -33
- 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 +960 -218
- 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 +114 -11
- 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 +455 -0
- data/docs/Puppeteer/Frame.html +425 -289
- 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 +64 -23
- 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 +1049 -354
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
- 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 +173 -37
- 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 +40 -19
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +7 -3
- data/docs/index.html +7 -3
- data/docs/method_list.html +785 -513
- data/docs/top-level-namespace.html +1 -1
- data/lib/puppeteer.rb +43 -13
- data/lib/puppeteer/browser.rb +26 -6
- data/lib/puppeteer/browser_runner.rb +1 -1
- data/lib/puppeteer/concurrent_ruby_utils.rb +6 -2
- data/lib/puppeteer/connection.rb +13 -1
- data/lib/puppeteer/dom_world.rb +16 -18
- data/lib/puppeteer/element_handle.rb +147 -168
- 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/execution_context.rb +13 -0
- data/lib/puppeteer/file_chooser.rb +29 -0
- data/lib/puppeteer/frame.rb +19 -1
- data/lib/puppeteer/frame_manager.rb +0 -2
- data/lib/puppeteer/launcher.rb +6 -6
- data/lib/puppeteer/launcher/chrome.rb +49 -3
- data/lib/puppeteer/mouse.rb +3 -8
- data/lib/puppeteer/page.rb +126 -54
- data/lib/puppeteer/remote_object.rb +15 -1
- 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 +12 -4
- data/Dockerfile +0 -6
- data/docker-compose.yml +0 -15
@@ -94,12 +94,23 @@
|
|
94
94
|
|
95
95
|
<dl>
|
96
96
|
<dt>Defined in:</dt>
|
97
|
-
<dd>lib/puppeteer/element_handle.rb</dd>
|
97
|
+
<dd>lib/puppeteer/element_handle/point.rb</dd>
|
98
98
|
</dl>
|
99
99
|
|
100
100
|
</div>
|
101
101
|
|
102
|
+
<h2>Overview</h2><div class="docstring">
|
103
|
+
<div class="discussion">
|
104
|
+
|
105
|
+
<p>A class to represent (x, y)-coordinates supporting + and / operators.</p>
|
106
|
+
|
102
107
|
|
108
|
+
</div>
|
109
|
+
</div>
|
110
|
+
<div class="tags">
|
111
|
+
|
112
|
+
|
113
|
+
</div>
|
103
114
|
|
104
115
|
|
105
116
|
|
@@ -279,13 +290,13 @@
|
|
279
290
|
<pre class="lines">
|
280
291
|
|
281
292
|
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
293
|
+
5
|
294
|
+
6
|
295
|
+
7
|
296
|
+
8</pre>
|
286
297
|
</td>
|
287
298
|
<td>
|
288
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line
|
299
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle/point.rb', line 5</span>
|
289
300
|
|
290
301
|
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>x:</span><span class='comma'>,</span> <span class='label'>y:</span><span class='rparen'>)</span>
|
291
302
|
<span class='ivar'>@x</span> <span class='op'>=</span> <span class='id identifier rubyid_x'>x</span>
|
@@ -329,12 +340,12 @@
|
|
329
340
|
<pre class="lines">
|
330
341
|
|
331
342
|
|
332
|
-
|
333
|
-
|
334
|
-
|
343
|
+
24
|
344
|
+
25
|
345
|
+
26</pre>
|
335
346
|
</td>
|
336
347
|
<td>
|
337
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line
|
348
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle/point.rb', line 24</span>
|
338
349
|
|
339
350
|
<span class='kw'>def</span> <span class='id identifier rubyid_x'>x</span>
|
340
351
|
<span class='ivar'>@x</span>
|
@@ -372,12 +383,12 @@
|
|
372
383
|
<pre class="lines">
|
373
384
|
|
374
385
|
|
375
|
-
|
376
|
-
|
377
|
-
|
386
|
+
24
|
387
|
+
25
|
388
|
+
26</pre>
|
378
389
|
</td>
|
379
390
|
<td>
|
380
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line
|
391
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle/point.rb', line 24</span>
|
381
392
|
|
382
393
|
<span class='kw'>def</span> <span class='id identifier rubyid_y'>y</span>
|
383
394
|
<span class='ivar'>@y</span>
|
@@ -409,15 +420,15 @@
|
|
409
420
|
<pre class="lines">
|
410
421
|
|
411
422
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
416
|
-
|
417
|
-
|
423
|
+
10
|
424
|
+
11
|
425
|
+
12
|
426
|
+
13
|
427
|
+
14
|
428
|
+
15</pre>
|
418
429
|
</td>
|
419
430
|
<td>
|
420
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line
|
431
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle/point.rb', line 10</span>
|
421
432
|
|
422
433
|
<span class='kw'>def</span> <span class='op'>+</span><span class='lparen'>(</span><span class='id identifier rubyid_other'>other</span><span class='rparen'>)</span>
|
423
434
|
<span class='const'><span class='object_link'><a href="" title="Puppeteer::ElementHandle::Point (class)">Point</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::ElementHandle::Point#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
@@ -445,15 +456,15 @@
|
|
445
456
|
<pre class="lines">
|
446
457
|
|
447
458
|
|
448
|
-
|
449
|
-
|
450
|
-
|
451
|
-
|
452
|
-
|
453
|
-
|
459
|
+
17
|
460
|
+
18
|
461
|
+
19
|
462
|
+
20
|
463
|
+
21
|
464
|
+
22</pre>
|
454
465
|
</td>
|
455
466
|
<td>
|
456
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line
|
467
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle/point.rb', line 17</span>
|
457
468
|
|
458
469
|
<span class='kw'>def</span> <span class='op'>/</span><span class='lparen'>(</span><span class='id identifier rubyid_num'>num</span><span class='rparen'>)</span>
|
459
470
|
<span class='const'><span class='object_link'><a href="" title="Puppeteer::ElementHandle::Point (class)">Point</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::ElementHandle::Point#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
@@ -471,7 +482,7 @@
|
|
471
482
|
</div>
|
472
483
|
|
473
484
|
<div id="footer">
|
474
|
-
Generated on
|
485
|
+
Generated on Tue Jun 23 10:25:01 2020 by
|
475
486
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
476
487
|
0.9.24 (ruby-2.6.3).
|
477
488
|
</div>
|
@@ -114,7 +114,7 @@
|
|
114
114
|
</div>
|
115
115
|
|
116
116
|
<div id="footer">
|
117
|
-
Generated on
|
117
|
+
Generated on Tue Jun 23 10:25:00 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>
|
@@ -444,7 +444,7 @@
|
|
444
444
|
</div>
|
445
445
|
|
446
446
|
<div id="footer">
|
447
|
-
Generated on
|
447
|
+
Generated on Tue Jun 23 10:25:00 2020 by
|
448
448
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
449
449
|
0.9.24 (ruby-2.6.3).
|
450
450
|
</div>
|
@@ -152,6 +152,28 @@
|
|
152
152
|
|
153
153
|
|
154
154
|
|
155
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
156
|
+
|
157
|
+
</li>
|
158
|
+
|
159
|
+
|
160
|
+
<li class="public ">
|
161
|
+
<span class="summary_signature">
|
162
|
+
|
163
|
+
<a href="#observe_first-instance_method" title="#observe_first (instance method)">#<strong>observe_first</strong>(event_name, &block) ⇒ Object </a>
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
</span>
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
|
172
|
+
|
173
|
+
|
174
|
+
|
175
|
+
|
176
|
+
|
155
177
|
<span class="summary_desc"><div class='inline'></div></span>
|
156
178
|
|
157
179
|
</li>
|
@@ -257,17 +279,6 @@
|
|
257
279
|
<pre class="lines">
|
258
280
|
|
259
281
|
|
260
|
-
47
|
261
|
-
48
|
262
|
-
49
|
263
|
-
50
|
264
|
-
51
|
265
|
-
52
|
266
|
-
53
|
267
|
-
54
|
268
|
-
55
|
269
|
-
56
|
270
|
-
57
|
271
282
|
58
|
272
283
|
59
|
273
284
|
60
|
@@ -297,10 +308,21 @@
|
|
297
308
|
84
|
298
309
|
85
|
299
310
|
86
|
300
|
-
87
|
311
|
+
87
|
312
|
+
88
|
313
|
+
89
|
314
|
+
90
|
315
|
+
91
|
316
|
+
92
|
317
|
+
93
|
318
|
+
94
|
319
|
+
95
|
320
|
+
96
|
321
|
+
97
|
322
|
+
98</pre>
|
301
323
|
</td>
|
302
324
|
<td>
|
303
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line
|
325
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 58</span>
|
304
326
|
|
305
327
|
<span class='kw'>def</span> <span class='id identifier rubyid_emit_event'>emit_event</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
306
328
|
<span class='ivar'>@event_callbackable_handlers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
@@ -349,9 +371,9 @@
|
|
349
371
|
</div>
|
350
372
|
|
351
373
|
<div class="method_details ">
|
352
|
-
<h3 class="signature " id="
|
374
|
+
<h3 class="signature " id="observe_first-instance_method">
|
353
375
|
|
354
|
-
#<strong>
|
376
|
+
#<strong>observe_first</strong>(event_name, &block) ⇒ <tt>Object</tt>
|
355
377
|
|
356
378
|
|
357
379
|
|
@@ -366,11 +388,55 @@
|
|
366
388
|
42
|
367
389
|
43
|
368
390
|
44
|
369
|
-
45
|
391
|
+
45
|
392
|
+
46
|
393
|
+
47
|
394
|
+
48
|
395
|
+
49
|
396
|
+
50
|
397
|
+
51</pre>
|
370
398
|
</td>
|
371
399
|
<td>
|
372
400
|
<pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 42</span>
|
373
401
|
|
402
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_observe_first'>observe_first</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
403
|
+
<span class='id identifier rubyid_listener_id'>listener_id</span> <span class='op'>=</span> <span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='op'>|</span>
|
404
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_kwargs'>kwargs</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
405
|
+
<span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
406
|
+
<span class='kw'>else</span>
|
407
|
+
<span class='id identifier rubyid_block'>block</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='op'>**</span><span class='id identifier rubyid_kwargs'>kwargs</span><span class='rparen'>)</span>
|
408
|
+
<span class='kw'>end</span>
|
409
|
+
<span class='id identifier rubyid_remove_event_listener'>remove_event_listener</span><span class='lparen'>(</span><span class='id identifier rubyid_listener_id'>listener_id</span><span class='rparen'>)</span>
|
410
|
+
<span class='kw'>end</span>
|
411
|
+
<span class='kw'>end</span></pre>
|
412
|
+
</td>
|
413
|
+
</tr>
|
414
|
+
</table>
|
415
|
+
</div>
|
416
|
+
|
417
|
+
<div class="method_details ">
|
418
|
+
<h3 class="signature " id="on_event-instance_method">
|
419
|
+
|
420
|
+
#<strong>on_event</strong>(event_name, &block) ⇒ <tt>Object</tt>
|
421
|
+
|
422
|
+
|
423
|
+
|
424
|
+
|
425
|
+
|
426
|
+
</h3><table class="source_code">
|
427
|
+
<tr>
|
428
|
+
<td>
|
429
|
+
<pre class="lines">
|
430
|
+
|
431
|
+
|
432
|
+
53
|
433
|
+
54
|
434
|
+
55
|
435
|
+
56</pre>
|
436
|
+
</td>
|
437
|
+
<td>
|
438
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/event_callbackable.rb', line 53</span>
|
439
|
+
|
374
440
|
<span class='kw'>def</span> <span class='id identifier rubyid_on_event'>on_event</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
375
441
|
<span class='ivar'>@event_callbackable_handlers</span> <span class='op'>||=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
376
442
|
<span class='ivar'>@event_callbackable_handlers</span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
@@ -423,7 +489,7 @@
|
|
423
489
|
</div>
|
424
490
|
|
425
491
|
<div id="footer">
|
426
|
-
Generated on
|
492
|
+
Generated on Tue Jun 23 10:24:58 2020 by
|
427
493
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
428
494
|
0.9.24 (ruby-2.6.3).
|
429
495
|
</div>
|
@@ -425,7 +425,7 @@
|
|
425
425
|
</div>
|
426
426
|
|
427
427
|
<div id="footer">
|
428
|
-
Generated on
|
428
|
+
Generated on Tue Jun 23 10:25:01 2020 by
|
429
429
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
430
430
|
0.9.24 (ruby-2.6.3).
|
431
431
|
</div>
|
@@ -234,6 +234,28 @@
|
|
234
234
|
<p>only used in DomWorld#delete_context.</p>
|
235
235
|
</div></span>
|
236
236
|
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#adopt_backend_node_id-instance_method" title="#adopt_backend_node_id (instance method)">#<strong>adopt_backend_node_id</strong>(backend_node_id) ⇒ Puppeteer::ElementHandle </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
258
|
+
|
237
259
|
</li>
|
238
260
|
|
239
261
|
|
@@ -590,9 +612,9 @@
|
|
590
612
|
</div>
|
591
613
|
|
592
614
|
<div class="method_details ">
|
593
|
-
<h3 class="signature " id="
|
615
|
+
<h3 class="signature " id="adopt_backend_node_id-instance_method">
|
594
616
|
|
595
|
-
#<strong>
|
617
|
+
#<strong>adopt_backend_node_id</strong>(backend_node_id) ⇒ <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
|
596
618
|
|
597
619
|
|
598
620
|
|
@@ -610,10 +632,10 @@
|
|
610
632
|
|
611
633
|
<li>
|
612
634
|
|
613
|
-
<span class='name'>
|
635
|
+
<span class='name'>backend_node_id</span>
|
614
636
|
|
615
637
|
|
616
|
-
<span class='type'>(<tt
|
638
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
617
639
|
|
618
640
|
|
619
641
|
|
@@ -650,20 +672,101 @@
|
|
650
672
|
227
|
651
673
|
228
|
652
674
|
229
|
653
|
-
230
|
654
|
-
|
655
|
-
|
656
|
-
|
675
|
+
230</pre>
|
676
|
+
</td>
|
677
|
+
<td>
|
678
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 221</span>
|
679
|
+
|
680
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_adopt_backend_node_id'>adopt_backend_node_id</span><span class='lparen'>(</span><span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='rparen'>)</span>
|
681
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@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.resolveNode</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
682
|
+
<span class='label'>backendNodeId:</span> <span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='comma'>,</span>
|
683
|
+
<span class='label'>executionContextId:</span> <span class='ivar'>@context_id</span><span class='comma'>,</span>
|
684
|
+
<span class='rparen'>)</span>
|
685
|
+
<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="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span></span><span class='lparen'>(</span>
|
686
|
+
<span class='label'>context:</span> <span class='kw'>self</span><span class='comma'>,</span>
|
687
|
+
<span class='label'>remote_object:</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="RemoteObject.html" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RemoteObject.html#initialize-instance_method" title="Puppeteer::RemoteObject#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
|
688
|
+
<span class='rparen'>)</span>
|
689
|
+
<span class='kw'>end</span></pre>
|
690
|
+
</td>
|
691
|
+
</tr>
|
692
|
+
</table>
|
693
|
+
</div>
|
694
|
+
|
695
|
+
<div class="method_details ">
|
696
|
+
<h3 class="signature " id="adopt_element_handle-instance_method">
|
697
|
+
|
698
|
+
#<strong>adopt_element_handle</strong>(element_handle) ⇒ <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
</h3><div class="docstring">
|
705
|
+
<div class="discussion">
|
706
|
+
|
707
|
+
|
708
|
+
</div>
|
709
|
+
</div>
|
710
|
+
<div class="tags">
|
711
|
+
<p class="tag_title">Parameters:</p>
|
712
|
+
<ul class="param">
|
713
|
+
|
714
|
+
<li>
|
715
|
+
|
716
|
+
<span class='name'>element_handle</span>
|
717
|
+
|
718
|
+
|
719
|
+
<span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
</li>
|
724
|
+
|
725
|
+
</ul>
|
726
|
+
|
727
|
+
<p class="tag_title">Returns:</p>
|
728
|
+
<ul class="return">
|
729
|
+
|
730
|
+
<li>
|
731
|
+
|
732
|
+
|
733
|
+
<span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
</li>
|
738
|
+
|
739
|
+
</ul>
|
740
|
+
|
741
|
+
</div><table class="source_code">
|
742
|
+
<tr>
|
743
|
+
<td>
|
744
|
+
<pre class="lines">
|
745
|
+
|
746
|
+
|
657
747
|
234
|
658
748
|
235
|
659
749
|
236
|
660
750
|
237
|
661
751
|
238
|
662
752
|
239
|
663
|
-
240
|
753
|
+
240
|
754
|
+
241
|
755
|
+
242
|
756
|
+
243
|
757
|
+
244
|
758
|
+
245
|
759
|
+
246
|
760
|
+
247
|
761
|
+
248
|
762
|
+
249
|
763
|
+
250
|
764
|
+
251
|
765
|
+
252
|
766
|
+
253</pre>
|
664
767
|
</td>
|
665
768
|
<td>
|
666
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line
|
769
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 234</span>
|
667
770
|
|
668
771
|
<span class='kw'>def</span> <span class='id identifier rubyid_adopt_element_handle'>adopt_element_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_element_handle'>element_handle</span><span class='rparen'>)</span>
|
669
772
|
<span class='kw'>if</span> <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_execution_context'>execution_context</span> <span class='op'>==</span> <span class='kw'>self</span>
|
@@ -885,7 +988,7 @@
|
|
885
988
|
</div>
|
886
989
|
|
887
990
|
<div id="footer">
|
888
|
-
Generated on
|
991
|
+
Generated on Tue Jun 23 10:25:00 2020 by
|
889
992
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
890
993
|
0.9.24 (ruby-2.6.3).
|
891
994
|
</div>
|