puppeteer-ruby 0.0.12 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -14
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +52 -1
  6. data/lib/puppeteer.rb +10 -2
  7. data/lib/puppeteer/browser.rb +53 -34
  8. data/lib/puppeteer/browser_context.rb +35 -5
  9. data/lib/puppeteer/cdp_session.rb +3 -19
  10. data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
  11. data/lib/puppeteer/connection.rb +9 -16
  12. data/lib/puppeteer/debug_print.rb +1 -1
  13. data/lib/puppeteer/define_async_method.rb +23 -0
  14. data/lib/puppeteer/dom_world.rb +67 -78
  15. data/lib/puppeteer/element_handle.rb +19 -47
  16. data/lib/puppeteer/emulation_manager.rb +2 -6
  17. data/lib/puppeteer/env.rb +18 -0
  18. data/lib/puppeteer/execution_context.rb +1 -6
  19. data/lib/puppeteer/frame.rb +34 -39
  20. data/lib/puppeteer/frame_manager.rb +7 -25
  21. data/lib/puppeteer/js_handle.rb +3 -12
  22. data/lib/puppeteer/keyboard.rb +9 -29
  23. data/lib/puppeteer/launcher/chrome.rb +9 -7
  24. data/lib/puppeteer/mouse.rb +20 -24
  25. data/lib/puppeteer/network_manager.rb +163 -5
  26. data/lib/puppeteer/page.rb +213 -179
  27. data/lib/puppeteer/page/pdf_options.rb +166 -0
  28. data/lib/puppeteer/remote_object.rb +2 -5
  29. data/lib/puppeteer/request.rb +330 -0
  30. data/lib/puppeteer/response.rb +113 -0
  31. data/lib/puppeteer/touch_screen.rb +2 -7
  32. data/lib/puppeteer/version.rb +1 -1
  33. data/lib/puppeteer/wait_task.rb +2 -4
  34. data/lib/puppeteer/web_socket.rb +7 -0
  35. data/puppeteer-ruby.gemspec +2 -1
  36. metadata +25 -103
  37. data/docs/Puppeteer.html +0 -2338
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2258
  40. data/docs/Puppeteer/BrowserContext.html +0 -809
  41. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  42. data/docs/Puppeteer/BrowserRunner.html +0 -914
  43. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  44. data/docs/Puppeteer/CDPSession.html +0 -813
  45. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  46. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
  47. data/docs/Puppeteer/Connection.html +0 -964
  48. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  49. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  50. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  51. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  52. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  53. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  54. data/docs/Puppeteer/DOMWorld.html +0 -2219
  55. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  56. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  57. data/docs/Puppeteer/DebugPrint.html +0 -233
  58. data/docs/Puppeteer/Device.html +0 -470
  59. data/docs/Puppeteer/Devices.html +0 -139
  60. data/docs/Puppeteer/ElementHandle.html +0 -2542
  61. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  62. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  63. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  64. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  65. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  66. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  67. data/docs/Puppeteer/EmulationManager.html +0 -454
  68. data/docs/Puppeteer/EventCallbackable.html +0 -499
  69. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  70. data/docs/Puppeteer/ExecutionContext.html +0 -998
  71. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  72. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  73. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  74. data/docs/Puppeteer/FileChooser.html +0 -455
  75. data/docs/Puppeteer/Frame.html +0 -3813
  76. data/docs/Puppeteer/FrameManager.html +0 -2410
  77. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  78. data/docs/Puppeteer/IfPresent.html +0 -222
  79. data/docs/Puppeteer/JSHandle.html +0 -1352
  80. data/docs/Puppeteer/Keyboard.html +0 -1557
  81. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  82. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  83. data/docs/Puppeteer/Launcher.html +0 -237
  84. data/docs/Puppeteer/Launcher/Base.html +0 -385
  85. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  86. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  87. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  88. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  89. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  90. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  91. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  92. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  93. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  94. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  95. data/docs/Puppeteer/Mouse.html +0 -1095
  96. data/docs/Puppeteer/Mouse/Button.html +0 -136
  97. data/docs/Puppeteer/NetworkManager.html +0 -901
  98. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  99. data/docs/Puppeteer/Page.html +0 -6173
  100. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  101. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  102. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  103. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  104. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  105. data/docs/Puppeteer/RemoteObject.html +0 -1087
  106. data/docs/Puppeteer/Target.html +0 -1336
  107. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  108. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  109. data/docs/Puppeteer/TimeoutError.html +0 -135
  110. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  111. data/docs/Puppeteer/TouchScreen.html +0 -464
  112. data/docs/Puppeteer/Viewport.html +0 -837
  113. data/docs/Puppeteer/WaitTask.html +0 -637
  114. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  115. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  116. data/docs/Puppeteer/WebSocket.html +0 -673
  117. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  118. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  119. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  120. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  121. data/docs/_index.html +0 -816
  122. data/docs/class_list.html +0 -51
  123. data/docs/css/common.css +0 -1
  124. data/docs/css/full_list.css +0 -58
  125. data/docs/css/style.css +0 -496
  126. data/docs/file.README.html +0 -125
  127. data/docs/file_list.html +0 -56
  128. data/docs/frames.html +0 -17
  129. data/docs/index.html +0 -125
  130. data/docs/js/app.js +0 -314
  131. data/docs/js/full_list.js +0 -216
  132. data/docs/js/jquery.js +0 -4
  133. data/docs/method_list.html +0 -4115
  134. data/docs/top-level-namespace.html +0 -126
  135. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,834 +0,0 @@
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::LifecycleWatcher
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::LifecycleWatcher";
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 (L)</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">LifecycleWatcher</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::LifecycleWatcher
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::LifecycleWatcher</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="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></dd>
93
- </dl>
94
-
95
-
96
-
97
-
98
-
99
-
100
- <dl>
101
- <dt>Defined in:</dt>
102
- <dd>lib/puppeteer/lifecycle_watcher.rb</dd>
103
- </dl>
104
-
105
- </div>
106
-
107
- <h2>Overview</h2><div class="docstring">
108
- <div class="discussion">
109
-
110
- <p><a href="https://github.com/puppeteer/puppeteer/blob/master/lib/LifecycleWatcher.js">github.com/puppeteer/puppeteer/blob/master/lib/LifecycleWatcher.js</a></p>
111
-
112
-
113
- </div>
114
- </div>
115
- <div class="tags">
116
-
117
-
118
- </div><h2>Defined Under Namespace</h2>
119
- <p class="children">
120
-
121
-
122
-
123
-
124
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="LifecycleWatcher/ExpectedLifecycle.html" title="Puppeteer::LifecycleWatcher::ExpectedLifecycle (class)">ExpectedLifecycle</a></span>, <span class='object_link'><a href="LifecycleWatcher/FrameDetachedError.html" title="Puppeteer::LifecycleWatcher::FrameDetachedError (class)">FrameDetachedError</a></span>, <span class='object_link'><a href="LifecycleWatcher/TerminatedError.html" title="Puppeteer::LifecycleWatcher::TerminatedError (class)">TerminatedError</a></span>
125
-
126
-
127
- </p>
128
-
129
-
130
-
131
-
132
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
133
- <ul class="summary">
134
-
135
- <li class="public ">
136
- <span class="summary_signature">
137
-
138
- <a href="#new_document_navigation_promise-instance_method" title="#new_document_navigation_promise (instance method)">#<strong>new_document_navigation_promise</strong> &#x21d2; Object </a>
139
-
140
-
141
-
142
- </span>
143
-
144
-
145
-
146
-
147
- <span class="note title readonly">readonly</span>
148
-
149
-
150
-
151
-
152
-
153
-
154
-
155
-
156
-
157
- <span class="summary_desc"><div class='inline'>
158
- <p>Returns the value of attribute new_document_navigation_promise.</p>
159
- </div></span>
160
-
161
- </li>
162
-
163
-
164
- <li class="public ">
165
- <span class="summary_signature">
166
-
167
- <a href="#same_document_navigation_promise-instance_method" title="#same_document_navigation_promise (instance method)">#<strong>same_document_navigation_promise</strong> &#x21d2; Object </a>
168
-
169
-
170
-
171
- </span>
172
-
173
-
174
-
175
-
176
- <span class="note title readonly">readonly</span>
177
-
178
-
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
- <span class="summary_desc"><div class='inline'>
187
- <p>Returns the value of attribute same_document_navigation_promise.</p>
188
- </div></span>
189
-
190
- </li>
191
-
192
-
193
- </ul>
194
-
195
-
196
-
197
-
198
-
199
- <h2>
200
- Instance Method Summary
201
- <small><a href="#" class="summary_toggle">collapse</a></small>
202
- </h2>
203
-
204
- <ul class="summary">
205
-
206
- <li class="public ">
207
- <span class="summary_signature">
208
-
209
- <a href="#dispose-instance_method" title="#dispose (instance method)">#<strong>dispose</strong> &#x21d2; Object </a>
210
-
211
-
212
-
213
- </span>
214
-
215
-
216
-
217
-
218
-
219
-
220
-
221
-
222
-
223
- <span class="summary_desc"><div class='inline'></div></span>
224
-
225
- </li>
226
-
227
-
228
- <li class="public ">
229
- <span class="summary_signature">
230
-
231
- <a href="#handle_frame_detached-instance_method" title="#handle_frame_detached (instance method)">#<strong>handle_frame_detached</strong>(frame) &#x21d2; Object </a>
232
-
233
-
234
-
235
- </span>
236
-
237
-
238
-
239
-
240
-
241
-
242
-
243
-
244
-
245
- <span class="summary_desc"><div class='inline'></div></span>
246
-
247
- </li>
248
-
249
-
250
- <li class="public ">
251
- <span class="summary_signature">
252
-
253
- <a href="#handle_request-instance_method" title="#handle_request (instance method)">#<strong>handle_request</strong>(request) &#x21d2; Object </a>
254
-
255
-
256
-
257
- </span>
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
-
267
- <span class="summary_desc"><div class='inline'></div></span>
268
-
269
- </li>
270
-
271
-
272
- <li class="public ">
273
- <span class="summary_signature">
274
-
275
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(frame_manager, frame, wait_until, timeout) &#x21d2; LifecycleWatcher </a>
276
-
277
-
278
-
279
- </span>
280
-
281
-
282
- <span class="note title constructor">constructor</span>
283
-
284
-
285
-
286
-
287
-
288
-
289
-
290
-
291
- <span class="summary_desc"><div class='inline'><ul><li>
292
- <p>@param !Puppeteer!Puppeteer.FrameManager frameManager * @param !Puppeteer!Puppeteer.Frame frame * @param string|!Array&lt;string&gt; waitUntil * @param number timeout.</p>
293
- </li></ul>
294
- </div></span>
295
-
296
- </li>
297
-
298
-
299
- <li class="public ">
300
- <span class="summary_signature">
301
-
302
- <a href="#navigation_response-instance_method" title="#navigation_response (instance method)">#<strong>navigation_response</strong> &#x21d2; Puppeteer::Response </a>
303
-
304
-
305
-
306
- </span>
307
-
308
-
309
-
310
-
311
-
312
-
313
-
314
-
315
-
316
- <span class="summary_desc"><div class='inline'></div></span>
317
-
318
- </li>
319
-
320
-
321
- <li class="public ">
322
- <span class="summary_signature">
323
-
324
- <a href="#timeout_or_termination_promise-instance_method" title="#timeout_or_termination_promise (instance method)">#<strong>timeout_or_termination_promise</strong> &#x21d2; Object </a>
325
-
326
-
327
-
328
- </span>
329
-
330
-
331
-
332
-
333
-
334
-
335
-
336
-
337
-
338
- <span class="summary_desc"><div class='inline'></div></span>
339
-
340
- </li>
341
-
342
-
343
- </ul>
344
-
345
-
346
-
347
-
348
-
349
-
350
-
351
-
352
-
353
-
354
-
355
- <h3 class="inherited">Methods included from <span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></h3>
356
- <p class="inherited"><span class='object_link'><a href="IfPresent.html#if_present-instance_method" title="Puppeteer::IfPresent#if_present (method)">#if_present</a></span></p>
357
- <div id="constructor_details" class="method_details_list">
358
- <h2>Constructor Details</h2>
359
-
360
- <div class="method_details first">
361
- <h3 class="signature first" id="initialize-instance_method">
362
-
363
- #<strong>initialize</strong>(frame_manager, frame, wait_until, timeout) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::LifecycleWatcher (class)">LifecycleWatcher</a></span></tt>
364
-
365
-
366
-
367
-
368
-
369
- </h3><div class="docstring">
370
- <div class="discussion">
371
- <ul><li>
372
- <p>@param Puppeteer::LifecycleWatcher.!Puppeteer!Puppeteer.FrameManager frameManager</p>
373
- </li><li>
374
- <p>@param Puppeteer::LifecycleWatcher.!Puppeteer!Puppeteer.Frame frame</p>
375
- </li><li>
376
- <p>@param string|!Array&lt;string&gt; waitUntil</p>
377
- </li><li>
378
- <p>@param number timeout</p>
379
- </li></ul>
380
-
381
-
382
- </div>
383
- </div>
384
- <div class="tags">
385
-
386
-
387
- </div><table class="source_code">
388
- <tr>
389
- <td>
390
- <pre class="lines">
391
-
392
-
393
- 64
394
- 65
395
- 66
396
- 67
397
- 68
398
- 69
399
- 70
400
- 71
401
- 72
402
- 73
403
- 74
404
- 75
405
- 76
406
- 77
407
- 78
408
- 79
409
- 80
410
- 81
411
- 82
412
- 83
413
- 84
414
- 85
415
- 86
416
- 87
417
- 88
418
- 89</pre>
419
- </td>
420
- <td>
421
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 64</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_frame_manager'>frame_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_frame'>frame</span><span class='comma'>,</span> <span class='id identifier rubyid_wait_until'>wait_until</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
424
- <span class='ivar'>@expected_lifecycle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="LifecycleWatcher/ExpectedLifecycle.html" title="Puppeteer::LifecycleWatcher::ExpectedLifecycle (class)">ExpectedLifecycle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="LifecycleWatcher/ExpectedLifecycle.html#initialize-instance_method" title="Puppeteer::LifecycleWatcher::ExpectedLifecycle#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_wait_until'>wait_until</span><span class='rparen'>)</span>
425
- <span class='ivar'>@frame_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span>
426
- <span class='ivar'>@frame</span> <span class='op'>=</span> <span class='id identifier rubyid_frame'>frame</span>
427
- <span class='ivar'>@initial_loader_id</span> <span class='op'>=</span> <span class='id identifier rubyid_frame'>frame</span><span class='period'>.</span><span class='id identifier rubyid_loader_id'>loader_id</span>
428
- <span class='ivar'>@timeout</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout'>timeout</span>
429
-
430
- <span class='ivar'>@listener_ids</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
431
- <span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>client</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Events.CDPSession.Disconnected</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span>
432
- <span class='id identifier rubyid_terminate'>terminate</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="LifecycleWatcher/TerminatedError.html" title="Puppeteer::LifecycleWatcher::TerminatedError (class)">TerminatedError</a></span></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'>Navigation failed because browser has disconnected!</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
433
- <span class='kw'>end</span>
434
- <span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>frame_manager</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='lbracket'>[</span>
435
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Events.FrameManager.LifecycleEvent</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid__'>_</span><span class='op'>|</span>
436
- <span class='id identifier rubyid_check_lifecycle_complete'>check_lifecycle_complete</span>
437
- <span class='kw'>end</span><span class='comma'>,</span>
438
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Events.FrameManager.FrameNavigatedWithinDocument</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:navigated_within_document</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span>
439
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Events.FrameManager.FrameDetached</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:handle_frame_detached</span><span class='rparen'>)</span><span class='rparen'>)</span><span class='comma'>,</span>
440
- <span class='rbracket'>]</span>
441
- <span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>network_manager</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_network_manager'>network_manager</span><span class='period'>.</span><span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Events.NetworkManager.Request</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span> <span class='op'>&amp;</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:handle_request</span><span class='rparen'>)</span><span class='rparen'>)</span>
442
-
443
- <span class='ivar'>@same_document_navigation_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>
444
- <span class='ivar'>@lifecycle_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>
445
- <span class='ivar'>@new_document_navigation_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>
446
- <span class='ivar'>@termination_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>
447
- <span class='id identifier rubyid_check_lifecycle_complete'>check_lifecycle_complete</span>
448
- <span class='kw'>end</span></pre>
449
- </td>
450
- </tr>
451
- </table>
452
- </div>
453
-
454
- </div>
455
-
456
- <div id="instance_attr_details" class="attr_details">
457
- <h2>Instance Attribute Details</h2>
458
-
459
-
460
- <span id=""></span>
461
- <div class="method_details first">
462
- <h3 class="signature first" id="new_document_navigation_promise-instance_method">
463
-
464
- #<strong>new_document_navigation_promise</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
465
-
466
-
467
-
468
-
469
-
470
- </h3><div class="docstring">
471
- <div class="discussion">
472
-
473
- <p>Returns the value of attribute new_document_navigation_promise.</p>
474
-
475
-
476
- </div>
477
- </div>
478
- <div class="tags">
479
-
480
-
481
- </div><table class="source_code">
482
- <tr>
483
- <td>
484
- <pre class="lines">
485
-
486
-
487
- 118
488
- 119
489
- 120</pre>
490
- </td>
491
- <td>
492
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 118</span>
493
-
494
- <span class='kw'>def</span> <span class='id identifier rubyid_new_document_navigation_promise'>new_document_navigation_promise</span>
495
- <span class='ivar'>@new_document_navigation_promise</span>
496
- <span class='kw'>end</span></pre>
497
- </td>
498
- </tr>
499
- </table>
500
- </div>
501
-
502
-
503
- <span id=""></span>
504
- <div class="method_details ">
505
- <h3 class="signature " id="same_document_navigation_promise-instance_method">
506
-
507
- #<strong>same_document_navigation_promise</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
508
-
509
-
510
-
511
-
512
-
513
- </h3><div class="docstring">
514
- <div class="discussion">
515
-
516
- <p>Returns the value of attribute same_document_navigation_promise.</p>
517
-
518
-
519
- </div>
520
- </div>
521
- <div class="tags">
522
-
523
-
524
- </div><table class="source_code">
525
- <tr>
526
- <td>
527
- <pre class="lines">
528
-
529
-
530
- 118
531
- 119
532
- 120</pre>
533
- </td>
534
- <td>
535
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 118</span>
536
-
537
- <span class='kw'>def</span> <span class='id identifier rubyid_same_document_navigation_promise'>same_document_navigation_promise</span>
538
- <span class='ivar'>@same_document_navigation_promise</span>
539
- <span class='kw'>end</span></pre>
540
- </td>
541
- </tr>
542
- </table>
543
- </div>
544
-
545
- </div>
546
-
547
-
548
- <div id="instance_method_details" class="method_details_list">
549
- <h2>Instance Method Details</h2>
550
-
551
-
552
- <div class="method_details first">
553
- <h3 class="signature first" id="dispose-instance_method">
554
-
555
- #<strong>dispose</strong> &#x21d2; <tt>Object</tt>
556
-
557
-
558
-
559
-
560
-
561
- </h3><table class="source_code">
562
- <tr>
563
- <td>
564
- <pre class="lines">
565
-
566
-
567
- 160
568
- 161
569
- 162
570
- 163
571
- 164
572
- 165
573
- 166
574
- 167
575
- 168
576
- 169
577
- 170</pre>
578
- </td>
579
- <td>
580
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 160</span>
581
-
582
- <span class='kw'>def</span> <span class='id identifier rubyid_dispose'>dispose</span>
583
- <span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>client</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span>
584
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='period'>.</span><span class='id identifier rubyid_remove_event_listener'>remove_event_listener</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
585
- <span class='kw'>end</span>
586
- <span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>frame_manager</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_ids'>ids</span><span class='op'>|</span>
587
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_remove_event_listener'>remove_event_listener</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_ids'>ids</span><span class='rparen'>)</span>
588
- <span class='kw'>end</span>
589
- <span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@listener_ids</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>network_manager</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_id'>id</span><span class='op'>|</span>
590
- <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_network_manager'>network_manager</span><span class='period'>.</span><span class='id identifier rubyid_remove_event_listener'>remove_event_listener</span><span class='lparen'>(</span><span class='id identifier rubyid_id'>id</span><span class='rparen'>)</span>
591
- <span class='kw'>end</span>
592
- <span class='kw'>end</span></pre>
593
- </td>
594
- </tr>
595
- </table>
596
- </div>
597
-
598
- <div class="method_details ">
599
- <h3 class="signature " id="handle_frame_detached-instance_method">
600
-
601
- #<strong>handle_frame_detached</strong>(frame) &#x21d2; <tt>Object</tt>
602
-
603
-
604
-
605
-
606
-
607
- </h3><div class="docstring">
608
- <div class="discussion">
609
-
610
-
611
- </div>
612
- </div>
613
- <div class="tags">
614
- <p class="tag_title">Parameters:</p>
615
- <ul class="param">
616
-
617
- <li>
618
-
619
- <span class='name'>frame</span>
620
-
621
-
622
- <span class='type'>(<tt><span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Puppeteer::Frame</a></span></tt>)</span>
623
-
624
-
625
-
626
- </li>
627
-
628
- </ul>
629
-
630
-
631
- </div><table class="source_code">
632
- <tr>
633
- <td>
634
- <pre class="lines">
635
-
636
-
637
- 98
638
- 99
639
- 100
640
- 101
641
- 102
642
- 103
643
- 104</pre>
644
- </td>
645
- <td>
646
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 98</span>
647
-
648
- <span class='kw'>def</span> <span class='id identifier rubyid_handle_frame_detached'>handle_frame_detached</span><span class='lparen'>(</span><span class='id identifier rubyid_frame'>frame</span><span class='rparen'>)</span>
649
- <span class='kw'>if</span> <span class='ivar'>@frame</span> <span class='op'>==</span> <span class='id identifier rubyid_frame'>frame</span>
650
- <span class='ivar'>@termination_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="LifecycleWatcher/FrameDetachedError.html" title="Puppeteer::LifecycleWatcher::FrameDetachedError (class)">FrameDetachedError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="LifecycleWatcher/FrameDetachedError.html#initialize-instance_method" title="Puppeteer::LifecycleWatcher::FrameDetachedError#initialize (method)">new</a></span></span><span class='rparen'>)</span>
651
- <span class='kw'>return</span>
652
- <span class='kw'>end</span>
653
- <span class='id identifier rubyid_check_lifecycle_complete'>check_lifecycle_complete</span>
654
- <span class='kw'>end</span></pre>
655
- </td>
656
- </tr>
657
- </table>
658
- </div>
659
-
660
- <div class="method_details ">
661
- <h3 class="signature " id="handle_request-instance_method">
662
-
663
- #<strong>handle_request</strong>(request) &#x21d2; <tt>Object</tt>
664
-
665
-
666
-
667
-
668
-
669
- </h3><div class="docstring">
670
- <div class="discussion">
671
-
672
-
673
- </div>
674
- </div>
675
- <div class="tags">
676
- <p class="tag_title">Parameters:</p>
677
- <ul class="param">
678
-
679
- <li>
680
-
681
- <span class='name'>request</span>
682
-
683
-
684
- <span class='type'>(<tt>Puppeteer::Request</tt>)</span>
685
-
686
-
687
-
688
- </li>
689
-
690
- </ul>
691
-
692
-
693
- </div><table class="source_code">
694
- <tr>
695
- <td>
696
- <pre class="lines">
697
-
698
-
699
- 92
700
- 93
701
- 94
702
- 95</pre>
703
- </td>
704
- <td>
705
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 92</span>
706
-
707
- <span class='kw'>def</span> <span class='id identifier rubyid_handle_request'>handle_request</span><span class='lparen'>(</span><span class='id identifier rubyid_request'>request</span><span class='rparen'>)</span>
708
- <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_frame'>frame</span> <span class='op'>!=</span> <span class='ivar'>@frame</span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_navigation_request?'>navigation_request?</span>
709
- <span class='ivar'>@navigation_request</span> <span class='op'>=</span> <span class='id identifier rubyid_request'>request</span>
710
- <span class='kw'>end</span></pre>
711
- </td>
712
- </tr>
713
- </table>
714
- </div>
715
-
716
- <div class="method_details ">
717
- <h3 class="signature " id="navigation_response-instance_method">
718
-
719
- #<strong>navigation_response</strong> &#x21d2; <tt>Puppeteer::Response</tt>
720
-
721
-
722
-
723
-
724
-
725
- </h3><div class="docstring">
726
- <div class="discussion">
727
-
728
-
729
- </div>
730
- </div>
731
- <div class="tags">
732
-
733
- <p class="tag_title">Returns:</p>
734
- <ul class="return">
735
-
736
- <li>
737
-
738
-
739
- <span class='type'>(<tt>Puppeteer::Response</tt>)</span>
740
-
741
-
742
-
743
- </li>
744
-
745
- </ul>
746
-
747
- </div><table class="source_code">
748
- <tr>
749
- <td>
750
- <pre class="lines">
751
-
752
-
753
- 107
754
- 108
755
- 109
756
- 110
757
- 111</pre>
758
- </td>
759
- <td>
760
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 107</span>
761
-
762
- <span class='kw'>def</span> <span class='id identifier rubyid_navigation_response'>navigation_response</span>
763
- <span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@navigation_request</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_request'>request</span><span class='op'>|</span>
764
- <span class='id identifier rubyid_request'>request</span><span class='period'>.</span><span class='id identifier rubyid_response'>response</span>
765
- <span class='kw'>end</span>
766
- <span class='kw'>end</span></pre>
767
- </td>
768
- </tr>
769
- </table>
770
- </div>
771
-
772
- <div class="method_details ">
773
- <h3 class="signature " id="timeout_or_termination_promise-instance_method">
774
-
775
- #<strong>timeout_or_termination_promise</strong> &#x21d2; <tt>Object</tt>
776
-
777
-
778
-
779
-
780
-
781
- </h3><table class="source_code">
782
- <tr>
783
- <td>
784
- <pre class="lines">
785
-
786
-
787
- 124
788
- 125
789
- 126
790
- 127
791
- 128
792
- 129
793
- 130
794
- 131
795
- 132
796
- 133
797
- 134
798
- 135
799
- 136</pre>
800
- </td>
801
- <td>
802
- <pre class="code"><span class="info file"># File 'lib/puppeteer/lifecycle_watcher.rb', line 124</span>
803
-
804
- <span class='kw'>def</span> <span class='id identifier rubyid_timeout_or_termination_promise'>timeout_or_termination_promise</span>
805
- <span class='kw'>if</span> <span class='ivar'>@timeout</span> <span class='op'>&gt;</span> <span class='int'>0</span>
806
- <span class='id identifier rubyid_future'><span class='object_link'><a href="ConcurrentRubyUtils.html#future-instance_method" title="Puppeteer::ConcurrentRubyUtils#future (method)">future</a></span></span> <span class='kw'>do</span>
807
- <span class='const'>Timeout</span><span class='period'>.</span><span class='id identifier rubyid_timeout'>timeout</span><span class='lparen'>(</span><span class='ivar'>@timeout</span> <span class='op'>/</span> <span class='float'>1000.0</span><span class='rparen'>)</span> <span class='kw'>do</span>
808
- <span class='ivar'>@termination_promise</span><span class='period'>.</span><span class='id identifier rubyid_value!'>value!</span>
809
- <span class='kw'>end</span>
810
- <span class='kw'>rescue</span> <span class='const'>Timeout</span><span class='op'>::</span><span class='const'>Error</span>
811
- <span class='id identifier rubyid_raise'>raise</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="FrameManager.html" title="Puppeteer::FrameManager (class)">FrameManager</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="FrameManager/NavigationError.html" title="Puppeteer::FrameManager::NavigationError (class)">NavigationError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="FrameManager.html#initialize-instance_method" title="Puppeteer::FrameManager#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Navigation timeout of </span><span class='embexpr_beg'>#{</span><span class='ivar'>@timeout</span><span class='embexpr_end'>}</span><span class='tstring_content'>ms exceeded</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
812
- <span class='kw'>end</span>
813
- <span class='kw'>else</span>
814
- <span class='ivar'>@termination_promise</span>
815
- <span class='kw'>end</span>
816
- <span class='kw'>end</span></pre>
817
- </td>
818
- </tr>
819
- </table>
820
- </div>
821
-
822
- </div>
823
-
824
- </div>
825
-
826
- <div id="footer">
827
- Generated on Tue Jun 23 10:25:01 2020 by
828
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
829
- 0.9.24 (ruby-2.6.3).
830
- </div>
831
-
832
- </div>
833
- </body>
834
- </html>