puppeteer-ruby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.rubocop.yml +4 -5
  4. data/docs/Puppeteer.html +2010 -0
  5. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  6. data/docs/Puppeteer/Browser.html +2150 -0
  7. data/docs/Puppeteer/BrowserContext.html +809 -0
  8. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  9. data/docs/Puppeteer/BrowserRunner.html +914 -0
  10. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  11. data/docs/Puppeteer/CDPSession.html +784 -0
  12. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  13. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  14. data/docs/Puppeteer/Connection.html +960 -0
  15. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  16. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  17. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  18. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  19. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  20. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  21. data/docs/Puppeteer/DOMWorld.html +1580 -0
  22. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  23. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  24. data/docs/Puppeteer/DebugPrint.html +233 -0
  25. data/docs/Puppeteer/Device.html +470 -0
  26. data/docs/Puppeteer/Devices.html +139 -0
  27. data/docs/Puppeteer/ElementHandle.html +1603 -0
  28. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  29. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  30. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  31. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  32. data/docs/Puppeteer/EmulationManager.html +454 -0
  33. data/docs/Puppeteer/EventCallbackable.html +433 -0
  34. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  35. data/docs/Puppeteer/ExecutionContext.html +772 -0
  36. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  37. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  38. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  39. data/docs/Puppeteer/Frame.html +3625 -0
  40. data/docs/Puppeteer/FrameManager.html +2414 -0
  41. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  42. data/docs/Puppeteer/IfPresent.html +222 -0
  43. data/docs/Puppeteer/JSHandle.html +1352 -0
  44. data/docs/Puppeteer/Keyboard.html +1557 -0
  45. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  46. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  47. data/docs/Puppeteer/Launcher.html +237 -0
  48. data/docs/Puppeteer/Launcher/Base.html +385 -0
  49. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  50. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  51. data/docs/Puppeteer/Launcher/Chrome.html +628 -0
  52. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  53. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  54. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  55. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  56. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  57. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  58. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  59. data/docs/Puppeteer/Mouse.html +1105 -0
  60. data/docs/Puppeteer/Mouse/Button.html +136 -0
  61. data/docs/Puppeteer/NetworkManager.html +901 -0
  62. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  63. data/docs/Puppeteer/Page.html +5426 -0
  64. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  65. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  66. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  67. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  68. data/docs/Puppeteer/RemoteObject.html +951 -0
  69. data/docs/Puppeteer/Target.html +1384 -0
  70. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  71. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  72. data/docs/Puppeteer/TimeoutError.html +135 -0
  73. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  74. data/docs/Puppeteer/TouchScreen.html +464 -0
  75. data/docs/Puppeteer/Viewport.html +757 -0
  76. data/docs/Puppeteer/WaitTask.html +211 -0
  77. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  78. data/docs/Puppeteer/WebSocket.html +673 -0
  79. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  80. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  81. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  82. data/docs/_index.html +788 -0
  83. data/docs/class_list.html +51 -0
  84. data/docs/css/common.css +1 -0
  85. data/docs/css/full_list.css +58 -0
  86. data/docs/css/style.css +496 -0
  87. data/docs/file.README.html +121 -0
  88. data/docs/file_list.html +56 -0
  89. data/docs/frames.html +17 -0
  90. data/docs/index.html +121 -0
  91. data/docs/js/app.js +314 -0
  92. data/docs/js/full_list.js +216 -0
  93. data/docs/js/jquery.js +4 -0
  94. data/docs/method_list.html +3747 -0
  95. data/docs/top-level-namespace.html +126 -0
  96. data/lib/puppeteer.rb +9 -7
  97. data/lib/puppeteer/async_await_behavior.rb +6 -0
  98. data/lib/puppeteer/browser.rb +21 -1
  99. data/lib/puppeteer/connection.rb +1 -1
  100. data/lib/puppeteer/dom_world.rb +15 -2
  101. data/lib/puppeteer/element_handle.rb +3 -2
  102. data/lib/puppeteer/frame.rb +4 -0
  103. data/lib/puppeteer/frame_manager.rb +1 -1
  104. data/lib/puppeteer/js_handle.rb +3 -2
  105. data/lib/puppeteer/launcher.rb +0 -1
  106. data/lib/puppeteer/lifecycle_watcher.rb +3 -3
  107. data/lib/puppeteer/page.rb +6 -4
  108. data/lib/puppeteer/version.rb +1 -1
  109. data/puppeteer-ruby.gemspec +4 -1
  110. metadata +138 -4
@@ -0,0 +1,951 @@
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::RemoteObject
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::RemoteObject";
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 (R)</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">RemoteObject</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::RemoteObject
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::RemoteObject</li>
78
+
79
+ </ul>
80
+ <a href="#" class="inheritanceTree">show all</a>
81
+
82
+ </dd>
83
+ </dl>
84
+
85
+
86
+
87
+
88
+
89
+
90
+ <dl>
91
+ <dt>Includes:</dt>
92
+ <dd><span class='object_link'><a href="DebugPrint.html" title="Puppeteer::DebugPrint (module)">DebugPrint</a></span></dd>
93
+ </dl>
94
+
95
+
96
+
97
+
98
+
99
+
100
+ <dl>
101
+ <dt>Defined in:</dt>
102
+ <dd>lib/puppeteer/remote_object.rb</dd>
103
+ </dl>
104
+
105
+ </div>
106
+
107
+ <h2>Overview</h2><div class="docstring">
108
+ <div class="discussion">
109
+
110
+ <p>providing #valueFromRemoteObject, #releaseObject</p>
111
+
112
+
113
+ </div>
114
+ </div>
115
+ <div class="tags">
116
+
117
+
118
+ </div>
119
+
120
+
121
+
122
+ <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
123
+ <ul class="summary">
124
+
125
+ <li class="public ">
126
+ <span class="summary_signature">
127
+
128
+ <a href="#sub_type-instance_method" title="#sub_type (instance method)">#<strong>sub_type</strong> &#x21d2; Object </a>
129
+
130
+
131
+
132
+ </span>
133
+
134
+
135
+
136
+
137
+ <span class="note title readonly">readonly</span>
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+ <span class="summary_desc"><div class='inline'>
148
+ <p>Returns the value of attribute sub_type.</p>
149
+ </div></span>
150
+
151
+ </li>
152
+
153
+
154
+ </ul>
155
+
156
+
157
+
158
+
159
+
160
+ <h2>
161
+ Instance Method Summary
162
+ <small><a href="#" class="summary_toggle">collapse</a></small>
163
+ </h2>
164
+
165
+ <ul class="summary">
166
+
167
+ <li class="public ">
168
+ <span class="summary_signature">
169
+
170
+ <a href="#content_quads-instance_method" title="#content_quads (instance method)">#<strong>content_quads</strong>(client) &#x21d2; 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#clickable_point.</p>
186
+ </div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#converted_arg-instance_method" title="#converted_arg (instance method)">#<strong>converted_arg</strong> &#x21d2; Object </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+
202
+
203
+
204
+
205
+
206
+
207
+
208
+ <span class="summary_desc"><div class='inline'></div></span>
209
+
210
+ </li>
211
+
212
+
213
+ <li class="public ">
214
+ <span class="summary_signature">
215
+
216
+ <a href="#evaluate_self-instance_method" title="#evaluate_self (instance method)">#<strong>evaluate_self</strong>(client) &#x21d2; Future&lt;Puppeteer::RemoteObject|nil&gt; </a>
217
+
218
+
219
+
220
+ </span>
221
+
222
+
223
+
224
+
225
+
226
+
227
+
228
+
229
+
230
+ <span class="summary_desc"><div class='inline'></div></span>
231
+
232
+ </li>
233
+
234
+
235
+ <li class="public ">
236
+ <span class="summary_signature">
237
+
238
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(payload) &#x21d2; RemoteObject </a>
239
+
240
+
241
+
242
+ </span>
243
+
244
+
245
+ <span class="note title constructor">constructor</span>
246
+
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+ <span class="summary_desc"><div class='inline'>
255
+ <p>A new instance of RemoteObject.</p>
256
+ </div></span>
257
+
258
+ </li>
259
+
260
+
261
+ <li class="public ">
262
+ <span class="summary_signature">
263
+
264
+ <a href="#node_info-instance_method" title="#node_info (instance method)">#<strong>node_info</strong>(client) &#x21d2; Object </a>
265
+
266
+
267
+
268
+ </span>
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ <span class="summary_desc"><div class='inline'>
279
+ <p>used in ElementHandle#content_frame.</p>
280
+ </div></span>
281
+
282
+ </li>
283
+
284
+
285
+ <li class="public ">
286
+ <span class="summary_signature">
287
+
288
+ <a href="#properties-instance_method" title="#properties (instance method)">#<strong>properties</strong>(client) &#x21d2; Object </a>
289
+
290
+
291
+
292
+ </span>
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+
301
+
302
+ <span class="summary_desc"><div class='inline'>
303
+ <p>used in JSHandle#properties.</p>
304
+ </div></span>
305
+
306
+ </li>
307
+
308
+
309
+ <li class="public ">
310
+ <span class="summary_signature">
311
+
312
+ <a href="#release-instance_method" title="#release (instance method)">#<strong>release</strong>(client) &#x21d2; Object </a>
313
+
314
+
315
+
316
+ </span>
317
+
318
+
319
+
320
+
321
+
322
+
323
+
324
+
325
+
326
+ <span class="summary_desc"><div class='inline'></div></span>
327
+
328
+ </li>
329
+
330
+
331
+ <li class="public ">
332
+ <span class="summary_signature">
333
+
334
+ <a href="#value-instance_method" title="#value (instance method)">#<strong>value</strong> &#x21d2; Object </a>
335
+
336
+
337
+
338
+ </span>
339
+
340
+
341
+
342
+
343
+
344
+
345
+
346
+
347
+
348
+ <span class="summary_desc"><div class='inline'>
349
+ <p>helper#valueFromRemoteObject.</p>
350
+ </div></span>
351
+
352
+ </li>
353
+
354
+
355
+ </ul>
356
+
357
+
358
+
359
+
360
+
361
+
362
+
363
+
364
+
365
+
366
+
367
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="DebugPrint.html" title="Puppeteer::DebugPrint (module)">DebugPrint</a></span></h3>
368
+ <p class="inherited"><span class='object_link'><a href="DebugPrint.html#debug_print-instance_method" title="Puppeteer::DebugPrint#debug_print (method)">#debug_print</a></span>, <span class='object_link'><a href="DebugPrint.html#debug_puts-instance_method" title="Puppeteer::DebugPrint#debug_puts (method)">#debug_puts</a></span></p>
369
+ <div id="constructor_details" class="method_details_list">
370
+ <h2>Constructor Details</h2>
371
+
372
+ <div class="method_details first">
373
+ <h3 class="signature first" id="initialize-instance_method">
374
+
375
+ #<strong>initialize</strong>(payload) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></tt>
376
+
377
+
378
+
379
+
380
+
381
+ </h3><div class="docstring">
382
+ <div class="discussion">
383
+
384
+ <p>Returns a new instance of RemoteObject.</p>
385
+
386
+
387
+ </div>
388
+ </div>
389
+ <div class="tags">
390
+ <p class="tag_title">Parameters:</p>
391
+ <ul class="param">
392
+
393
+ <li>
394
+
395
+ <span class='name'>payload</span>
396
+
397
+
398
+ <span class='type'>(<tt>Hash</tt>)</span>
399
+
400
+
401
+
402
+ </li>
403
+
404
+ </ul>
405
+
406
+
407
+ </div><table class="source_code">
408
+ <tr>
409
+ <td>
410
+ <pre class="lines">
411
+
412
+
413
+ 7
414
+ 8
415
+ 9
416
+ 10
417
+ 11
418
+ 12</pre>
419
+ </td>
420
+ <td>
421
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 7</span>
422
+
423
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
424
+ <span class='ivar'>@object_id</span> <span class='op'>=</span> <span class='id identifier rubyid_payload'>payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>objectId</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
425
+ <span class='ivar'>@sub_type</span> <span class='op'>=</span> <span class='id identifier rubyid_payload'>payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>subtype</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
426
+ <span class='ivar'>@unserializable_value</span> <span class='op'>=</span> <span class='id identifier rubyid_payload'>payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>unserializableValue</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
427
+ <span class='ivar'>@value</span> <span class='op'>=</span> <span class='id identifier rubyid_payload'>payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>value</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
428
+ <span class='kw'>end</span></pre>
429
+ </td>
430
+ </tr>
431
+ </table>
432
+ </div>
433
+
434
+ </div>
435
+
436
+ <div id="instance_attr_details" class="attr_details">
437
+ <h2>Instance Attribute Details</h2>
438
+
439
+
440
+ <span id=""></span>
441
+ <div class="method_details first">
442
+ <h3 class="signature first" id="sub_type-instance_method">
443
+
444
+ #<strong>sub_type</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
445
+
446
+
447
+
448
+
449
+
450
+ </h3><div class="docstring">
451
+ <div class="discussion">
452
+
453
+ <p>Returns the value of attribute sub_type.</p>
454
+
455
+
456
+ </div>
457
+ </div>
458
+ <div class="tags">
459
+
460
+
461
+ </div><table class="source_code">
462
+ <tr>
463
+ <td>
464
+ <pre class="lines">
465
+
466
+
467
+ 14
468
+ 15
469
+ 16</pre>
470
+ </td>
471
+ <td>
472
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 14</span>
473
+
474
+ <span class='kw'>def</span> <span class='id identifier rubyid_sub_type'>sub_type</span>
475
+ <span class='ivar'>@sub_type</span>
476
+ <span class='kw'>end</span></pre>
477
+ </td>
478
+ </tr>
479
+ </table>
480
+ </div>
481
+
482
+ </div>
483
+
484
+
485
+ <div id="instance_method_details" class="method_details_list">
486
+ <h2>Instance Method Details</h2>
487
+
488
+
489
+ <div class="method_details first">
490
+ <h3 class="signature first" id="content_quads-instance_method">
491
+
492
+ #<strong>content_quads</strong>(client) &#x21d2; <tt>Object</tt>
493
+
494
+
495
+
496
+
497
+
498
+ </h3><div class="docstring">
499
+ <div class="discussion">
500
+
501
+ <p>used in ElementHandle#clickable_point</p>
502
+
503
+
504
+ </div>
505
+ </div>
506
+ <div class="tags">
507
+
508
+
509
+ </div><table class="source_code">
510
+ <tr>
511
+ <td>
512
+ <pre class="lines">
513
+
514
+
515
+ 61
516
+ 62
517
+ 63</pre>
518
+ </td>
519
+ <td>
520
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 61</span>
521
+
522
+ <span class='kw'>def</span> <span class='id identifier rubyid_content_quads'>content_quads</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
523
+ <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'>&#39;</span><span class='tstring_content'>DOM.getContentQuads</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='rparen'>)</span>
524
+ <span class='kw'>end</span></pre>
525
+ </td>
526
+ </tr>
527
+ </table>
528
+ </div>
529
+
530
+ <div class="method_details ">
531
+ <h3 class="signature " id="converted_arg-instance_method">
532
+
533
+ #<strong>converted_arg</strong> &#x21d2; <tt>Object</tt>
534
+
535
+
536
+
537
+
538
+
539
+ </h3><table class="source_code">
540
+ <tr>
541
+ <td>
542
+ <pre class="lines">
543
+
544
+
545
+ 110
546
+ 111
547
+ 112
548
+ 113
549
+ 114
550
+ 115
551
+ 116
552
+ 117
553
+ 118
554
+ 119
555
+ 120
556
+ 121
557
+ 122
558
+ 123
559
+ 124
560
+ 125
561
+ 126
562
+ 127
563
+ 128</pre>
564
+ </td>
565
+ <td>
566
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 110</span>
567
+
568
+ <span class='kw'>def</span> <span class='id identifier rubyid_converted_arg'>converted_arg</span>
569
+ <span class='comment'># ported logic from ExecutionContext#convertArgument
570
+ </span> <span class='comment'># https://github.com/puppeteer/puppeteer/blob/master/lib/ExecutionContext.js
571
+ </span> <span class='comment'>#
572
+ </span> <span class='comment'># Original logic:
573
+ </span> <span class='comment'># if (objectHandle._remoteObject.unserializableValue)
574
+ </span> <span class='comment'># return { unserializableValue: objectHandle._remoteObject.unserializableValue };
575
+ </span> <span class='comment'># if (!objectHandle._remoteObject.objectId)
576
+ </span> <span class='comment'># return { value: objectHandle._remoteObject.value };
577
+ </span> <span class='comment'># return { objectId: objectHandle._remoteObject.objectId };
578
+ </span>
579
+ <span class='kw'>if</span> <span class='ivar'>@unserializable_value</span>
580
+ <span class='lbrace'>{</span> <span class='label'>unserializableValue:</span> <span class='ivar'>@unserializable_value</span> <span class='rbrace'>}</span>
581
+ <span class='kw'>elsif</span> <span class='ivar'>@object_id</span>
582
+ <span class='lbrace'>{</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span> <span class='rbrace'>}</span>
583
+ <span class='kw'>else</span>
584
+ <span class='lbrace'>{</span> <span class='label'>value:</span> <span class='id identifier rubyid_value'>value</span> <span class='rbrace'>}</span>
585
+ <span class='kw'>end</span>
586
+ <span class='kw'>end</span></pre>
587
+ </td>
588
+ </tr>
589
+ </table>
590
+ </div>
591
+
592
+ <div class="method_details ">
593
+ <h3 class="signature " id="evaluate_self-instance_method">
594
+
595
+ #<strong>evaluate_self</strong>(client) &#x21d2; <tt>Future&lt;<span class='object_link'><a href="" title="Puppeteer::RemoteObject (class)">Puppeteer::RemoteObject</a></span>|nil&gt;</tt>
596
+
597
+
598
+
599
+
600
+
601
+ </h3><div class="docstring">
602
+ <div class="discussion">
603
+
604
+
605
+ </div>
606
+ </div>
607
+ <div class="tags">
608
+
609
+ <p class="tag_title">Returns:</p>
610
+ <ul class="return">
611
+
612
+ <li>
613
+
614
+
615
+ <span class='type'>(<tt>Future&lt;<span class='object_link'><a href="" title="Puppeteer::RemoteObject (class)">Puppeteer::RemoteObject</a></span>|nil&gt;</tt>)</span>
616
+
617
+
618
+
619
+ </li>
620
+
621
+ </ul>
622
+
623
+ </div><table class="source_code">
624
+ <tr>
625
+ <td>
626
+ <pre class="lines">
627
+
628
+
629
+ 17
630
+ 18
631
+ 19
632
+ 20
633
+ 21
634
+ 22
635
+ 23
636
+ 24
637
+ 25
638
+ 26
639
+ 27
640
+ 28
641
+ 29
642
+ 30
643
+ 31
644
+ 32
645
+ 33
646
+ 34
647
+ 35
648
+ 36
649
+ 37
650
+ 38
651
+ 39
652
+ 40
653
+ 41
654
+ 42
655
+ 43</pre>
656
+ </td>
657
+ <td>
658
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 17</span>
659
+
660
+ <span class='kw'>def</span> <span class='id identifier rubyid_evaluate_self'>evaluate_self</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
661
+ <span class='comment'># ported logic from JSHandle#json_value.
662
+ </span>
663
+ <span class='comment'># original logic:
664
+ </span> <span class='comment'># if (this._remoteObject.objectId) {
665
+ </span> <span class='comment'># const response = await this._client.send(&#39;Runtime.callFunctionOn&#39;, {
666
+ </span> <span class='comment'># functionDeclaration: &#39;function() { return this; }&#39;,
667
+ </span> <span class='comment'># objectId: this._remoteObject.objectId,
668
+ </span> <span class='comment'># returnByValue: true,
669
+ </span> <span class='comment'># awaitPromise: true,
670
+ </span> <span class='comment'># });
671
+ </span> <span class='comment'># return helper.valueFromRemoteObject(response.result);
672
+ </span> <span class='comment'># }
673
+ </span>
674
+ <span class='kw'>if</span> <span class='ivar'>@object_id</span>
675
+ <span class='id identifier rubyid_params'>params</span> <span class='op'>=</span> <span class='lbrace'>{</span>
676
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>functionDeclaration</span><span class='label_end'>&#39;:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>function() { return this; }</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
677
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>objectId</span><span class='label_end'>&#39;:</span> <span class='ivar'>@object_id</span><span class='comma'>,</span>
678
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>returnByValue</span><span class='label_end'>&#39;:</span> <span class='kw'>true</span><span class='comma'>,</span>
679
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>awaitPromise</span><span class='label_end'>&#39;:</span> <span class='kw'>true</span><span class='comma'>,</span>
680
+ <span class='rbrace'>}</span>
681
+ <span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <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'>&#39;</span><span class='tstring_content'>Runtime.callFunctionOn</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='id identifier rubyid_params'>params</span><span class='rparen'>)</span>
682
+ <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="" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#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'>&#39;</span><span class='tstring_content'>result</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
683
+ <span class='kw'>else</span>
684
+ <span class='kw'>nil</span>
685
+ <span class='kw'>end</span>
686
+ <span class='kw'>end</span></pre>
687
+ </td>
688
+ </tr>
689
+ </table>
690
+ </div>
691
+
692
+ <div class="method_details ">
693
+ <h3 class="signature " id="node_info-instance_method">
694
+
695
+ #<strong>node_info</strong>(client) &#x21d2; <tt>Object</tt>
696
+
697
+
698
+
699
+
700
+
701
+ </h3><div class="docstring">
702
+ <div class="discussion">
703
+
704
+ <p>used in ElementHandle#content_frame</p>
705
+
706
+
707
+ </div>
708
+ </div>
709
+ <div class="tags">
710
+
711
+
712
+ </div><table class="source_code">
713
+ <tr>
714
+ <td>
715
+ <pre class="lines">
716
+
717
+
718
+ 56
719
+ 57
720
+ 58</pre>
721
+ </td>
722
+ <td>
723
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 56</span>
724
+
725
+ <span class='kw'>def</span> <span class='id identifier rubyid_node_info'>node_info</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
726
+ <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'>&#39;</span><span class='tstring_content'>DOM.describeNode</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='rparen'>)</span>
727
+ <span class='kw'>end</span></pre>
728
+ </td>
729
+ </tr>
730
+ </table>
731
+ </div>
732
+
733
+ <div class="method_details ">
734
+ <h3 class="signature " id="properties-instance_method">
735
+
736
+ #<strong>properties</strong>(client) &#x21d2; <tt>Object</tt>
737
+
738
+
739
+
740
+
741
+
742
+ </h3><div class="docstring">
743
+ <div class="discussion">
744
+
745
+ <p>used in JSHandle#properties</p>
746
+
747
+
748
+ </div>
749
+ </div>
750
+ <div class="tags">
751
+
752
+
753
+ </div><table class="source_code">
754
+ <tr>
755
+ <td>
756
+ <pre class="lines">
757
+
758
+
759
+ 46
760
+ 47
761
+ 48
762
+ 49
763
+ 50
764
+ 51
765
+ 52
766
+ 53</pre>
767
+ </td>
768
+ <td>
769
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 46</span>
770
+
771
+ <span class='kw'>def</span> <span class='id identifier rubyid_properties'>properties</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='rparen'>)</span>
772
+ <span class='comment'># original logic:
773
+ </span> <span class='comment'># const response = await this._client.send(&#39;Runtime.getProperties&#39;, {
774
+ </span> <span class='comment'># objectId: this._remoteObject.objectId,
775
+ </span> <span class='comment'># ownProperties: true
776
+ </span> <span class='comment'># });
777
+ </span> <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'>&#39;</span><span class='tstring_content'>Runtime.getProperties</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='comma'>,</span> <span class='label'>ownProperties:</span> <span class='kw'>true</span><span class='rparen'>)</span>
778
+ <span class='kw'>end</span></pre>
779
+ </td>
780
+ </tr>
781
+ </table>
782
+ </div>
783
+
784
+ <div class="method_details ">
785
+ <h3 class="signature " id="release-instance_method">
786
+
787
+ #<strong>release</strong>(client) &#x21d2; <tt>Object</tt>
788
+
789
+
790
+
791
+
792
+
793
+ </h3><div class="docstring">
794
+ <div class="discussion">
795
+
796
+
797
+ </div>
798
+ </div>
799
+ <div class="tags">
800
+ <p class="tag_title">Parameters:</p>
801
+ <ul class="param">
802
+
803
+ <li>
804
+
805
+ <span class='name'>client</span>
806
+
807
+
808
+ <span class='type'>(<tt><span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">Puppeteer::CDPSession</a></span></tt>)</span>
809
+
810
+
811
+
812
+ </li>
813
+
814
+ </ul>
815
+
816
+
817
+ </div><table class="source_code">
818
+ <tr>
819
+ <td>
820
+ <pre class="lines">
821
+
822
+
823
+ 89
824
+ 90
825
+ 91
826
+ 92
827
+ 93
828
+ 94
829
+ 95
830
+ 96
831
+ 97
832
+ 98
833
+ 99
834
+ 100
835
+ 101
836
+ 102
837
+ 103</pre>
838
+ </td>
839
+ <td>
840
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 89</span>
841
+
842
+ <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>
843
+ <span class='kw'>return</span> <span class='kw'>unless</span> <span class='ivar'>@object_id</span>
844
+
845
+ <span class='kw'>begin</span>
846
+ <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'>&#39;</span><span class='tstring_content'>Runtime.releaseObject</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
847
+ <span class='label'>objectId:</span> <span class='ivar'>@object_id</span><span class='comma'>,</span>
848
+ <span class='rparen'>)</span>
849
+ <span class='kw'>rescue</span> <span class='op'>=&gt;</span> <span class='id identifier rubyid_err'>err</span>
850
+ <span class='comment'># Exceptions might happen in case of a page been navigated or closed.
851
+ </span> <span class='comment'># Swallow these since they are harmless and we don&#39;t leak anything in this case.
852
+ </span> <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>
853
+ <span class='kw'>end</span>
854
+
855
+ <span class='kw'>nil</span>
856
+ <span class='kw'>end</span></pre>
857
+ </td>
858
+ </tr>
859
+ </table>
860
+ </div>
861
+
862
+ <div class="method_details ">
863
+ <h3 class="signature " id="value-instance_method">
864
+
865
+ #<strong>value</strong> &#x21d2; <tt>Object</tt>
866
+
867
+
868
+
869
+
870
+
871
+ </h3><div class="docstring">
872
+ <div class="discussion">
873
+
874
+ <p>helper#valueFromRemoteObject</p>
875
+
876
+
877
+ </div>
878
+ </div>
879
+ <div class="tags">
880
+
881
+
882
+ </div><table class="source_code">
883
+ <tr>
884
+ <td>
885
+ <pre class="lines">
886
+
887
+
888
+ 66
889
+ 67
890
+ 68
891
+ 69
892
+ 70
893
+ 71
894
+ 72
895
+ 73
896
+ 74
897
+ 75
898
+ 76
899
+ 77
900
+ 78
901
+ 79
902
+ 80
903
+ 81
904
+ 82
905
+ 83
906
+ 84
907
+ 85
908
+ 86</pre>
909
+ </td>
910
+ <td>
911
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/remote_object.rb', line 66</span>
912
+
913
+ <span class='kw'>def</span> <span class='id identifier rubyid_value'>value</span>
914
+ <span class='kw'>if</span> <span class='ivar'>@unserializable_value</span>
915
+ <span class='comment'># if (remoteObject.type === &#39;bigint&#39; &amp;&amp; typeof BigInt !== &#39;undefined&#39;)
916
+ </span> <span class='comment'># return BigInt(remoteObject.unserializableValue.replace(&#39;n&#39;, &#39;&#39;));
917
+ </span> <span class='comment'># switch (remoteObject.unserializableValue) {
918
+ </span> <span class='comment'># case &#39;-0&#39;:
919
+ </span> <span class='comment'># return -0;
920
+ </span> <span class='comment'># case &#39;NaN&#39;:
921
+ </span> <span class='comment'># return NaN;
922
+ </span> <span class='comment'># case &#39;Infinity&#39;:
923
+ </span> <span class='comment'># return Infinity;
924
+ </span> <span class='comment'># case &#39;-Infinity&#39;:
925
+ </span> <span class='comment'># return -Infinity;
926
+ </span> <span class='comment'># default:
927
+ </span> <span class='comment'># throw new Error(&#39;Unsupported unserializable value: &#39; + remoteObject.unserializableValue);
928
+ </span> <span class='comment'># }
929
+ </span> <span class='id identifier rubyid_raise'>raise</span> <span class='const'>NotImplementedError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>unserializable_value is not implemented yet</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
930
+ <span class='kw'>else</span>
931
+ <span class='ivar'>@value</span>
932
+ <span class='kw'>end</span>
933
+ <span class='kw'>end</span></pre>
934
+ </td>
935
+ </tr>
936
+ </table>
937
+ </div>
938
+
939
+ </div>
940
+
941
+ </div>
942
+
943
+ <div id="footer">
944
+ Generated on Sun Apr 26 15:52:57 2020 by
945
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
946
+ 0.9.24 (ruby-2.6.3).
947
+ </div>
948
+
949
+ </div>
950
+ </body>
951
+ </html>