puppeteer-ruby 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
Files changed (161) hide show
  1. checksums.yaml +7 -0
  2. data/.circleci/config.yml +71 -0
  3. data/.github/stale.yml +16 -0
  4. data/.gitignore +19 -0
  5. data/.rspec +3 -0
  6. data/.rubocop.yml +302 -0
  7. data/.travis.yml +7 -0
  8. data/Dockerfile +6 -0
  9. data/Gemfile +6 -0
  10. data/README.md +54 -0
  11. data/Rakefile +1 -0
  12. data/bin/console +11 -0
  13. data/bin/setup +8 -0
  14. data/docker-compose.yml +15 -0
  15. data/docs/Puppeteer.html +2020 -0
  16. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  17. data/docs/Puppeteer/Browser.html +2148 -0
  18. data/docs/Puppeteer/BrowserContext.html +809 -0
  19. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  20. data/docs/Puppeteer/BrowserRunner.html +914 -0
  21. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  22. data/docs/Puppeteer/CDPSession.html +813 -0
  23. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  24. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  25. data/docs/Puppeteer/Connection.html +960 -0
  26. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  27. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  28. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  29. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  30. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  31. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  32. data/docs/Puppeteer/DOMWorld.html +2219 -0
  33. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  34. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  35. data/docs/Puppeteer/DebugPrint.html +233 -0
  36. data/docs/Puppeteer/Device.html +470 -0
  37. data/docs/Puppeteer/Devices.html +139 -0
  38. data/docs/Puppeteer/ElementHandle.html +2542 -0
  39. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  40. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  41. data/docs/Puppeteer/ElementHandle/Point.html +492 -0
  42. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  43. data/docs/Puppeteer/EmulationManager.html +454 -0
  44. data/docs/Puppeteer/EventCallbackable.html +433 -0
  45. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  46. data/docs/Puppeteer/ExecutionContext.html +998 -0
  47. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  48. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  49. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  50. data/docs/Puppeteer/FileChooser.html +455 -0
  51. data/docs/Puppeteer/Frame.html +3677 -0
  52. data/docs/Puppeteer/FrameManager.html +2410 -0
  53. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  54. data/docs/Puppeteer/IfPresent.html +222 -0
  55. data/docs/Puppeteer/JSHandle.html +1352 -0
  56. data/docs/Puppeteer/Keyboard.html +1557 -0
  57. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  58. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  59. data/docs/Puppeteer/Launcher.html +237 -0
  60. data/docs/Puppeteer/Launcher/Base.html +385 -0
  61. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  62. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  63. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  64. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  65. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  66. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  67. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  68. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  69. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  70. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  71. data/docs/Puppeteer/Mouse.html +1105 -0
  72. data/docs/Puppeteer/Mouse/Button.html +136 -0
  73. data/docs/Puppeteer/NetworkManager.html +901 -0
  74. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  75. data/docs/Puppeteer/Page.html +5970 -0
  76. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  77. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  78. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  79. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  80. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  81. data/docs/Puppeteer/RemoteObject.html +1087 -0
  82. data/docs/Puppeteer/Target.html +1336 -0
  83. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  84. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  85. data/docs/Puppeteer/TimeoutError.html +135 -0
  86. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  87. data/docs/Puppeteer/TouchScreen.html +464 -0
  88. data/docs/Puppeteer/Viewport.html +837 -0
  89. data/docs/Puppeteer/WaitTask.html +637 -0
  90. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  91. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  92. data/docs/Puppeteer/WebSocket.html +673 -0
  93. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  94. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  95. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  96. data/docs/_index.html +823 -0
  97. data/docs/class_list.html +51 -0
  98. data/docs/css/common.css +1 -0
  99. data/docs/css/full_list.css +58 -0
  100. data/docs/css/style.css +496 -0
  101. data/docs/file.README.html +123 -0
  102. data/docs/file_list.html +56 -0
  103. data/docs/frames.html +17 -0
  104. data/docs/index.html +123 -0
  105. data/docs/js/app.js +314 -0
  106. data/docs/js/full_list.js +216 -0
  107. data/docs/js/jquery.js +4 -0
  108. data/docs/method_list.html +4075 -0
  109. data/docs/top-level-namespace.html +126 -0
  110. data/lib/puppeteer.rb +200 -0
  111. data/lib/puppeteer/async_await_behavior.rb +38 -0
  112. data/lib/puppeteer/browser.rb +259 -0
  113. data/lib/puppeteer/browser_context.rb +90 -0
  114. data/lib/puppeteer/browser_fetcher.rb +6 -0
  115. data/lib/puppeteer/browser_runner.rb +161 -0
  116. data/lib/puppeteer/cdp_session.rb +100 -0
  117. data/lib/puppeteer/concurrent_ruby_utils.rb +37 -0
  118. data/lib/puppeteer/connection.rb +254 -0
  119. data/lib/puppeteer/console_message.rb +24 -0
  120. data/lib/puppeteer/debug_print.rb +20 -0
  121. data/lib/puppeteer/device.rb +12 -0
  122. data/lib/puppeteer/devices.rb +885 -0
  123. data/lib/puppeteer/dom_world.rb +484 -0
  124. data/lib/puppeteer/element_handle.rb +433 -0
  125. data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
  126. data/lib/puppeteer/element_handle/box_model.rb +19 -0
  127. data/lib/puppeteer/element_handle/point.rb +26 -0
  128. data/lib/puppeteer/emulation_manager.rb +46 -0
  129. data/lib/puppeteer/errors.rb +2 -0
  130. data/lib/puppeteer/event_callbackable.rb +88 -0
  131. data/lib/puppeteer/execution_context.rb +254 -0
  132. data/lib/puppeteer/file_chooser.rb +29 -0
  133. data/lib/puppeteer/frame.rb +286 -0
  134. data/lib/puppeteer/frame_manager.rb +378 -0
  135. data/lib/puppeteer/if_present.rb +18 -0
  136. data/lib/puppeteer/js_handle.rb +142 -0
  137. data/lib/puppeteer/keyboard.rb +183 -0
  138. data/lib/puppeteer/keyboard/key_description.rb +19 -0
  139. data/lib/puppeteer/keyboard/us_keyboard_layout.rb +283 -0
  140. data/lib/puppeteer/launcher.rb +25 -0
  141. data/lib/puppeteer/launcher/base.rb +48 -0
  142. data/lib/puppeteer/launcher/browser_options.rb +41 -0
  143. data/lib/puppeteer/launcher/chrome.rb +211 -0
  144. data/lib/puppeteer/launcher/chrome_arg_options.rb +49 -0
  145. data/lib/puppeteer/launcher/launch_options.rb +68 -0
  146. data/lib/puppeteer/lifecycle_watcher.rb +171 -0
  147. data/lib/puppeteer/mouse.rb +123 -0
  148. data/lib/puppeteer/network_manager.rb +122 -0
  149. data/lib/puppeteer/page.rb +1065 -0
  150. data/lib/puppeteer/page/screenshot_options.rb +78 -0
  151. data/lib/puppeteer/remote_object.rb +143 -0
  152. data/lib/puppeteer/target.rb +150 -0
  153. data/lib/puppeteer/timeout_settings.rb +15 -0
  154. data/lib/puppeteer/touch_screen.rb +43 -0
  155. data/lib/puppeteer/version.rb +3 -0
  156. data/lib/puppeteer/viewport.rb +54 -0
  157. data/lib/puppeteer/wait_task.rb +188 -0
  158. data/lib/puppeteer/web_socket.rb +122 -0
  159. data/lib/puppeteer/web_socket_transport.rb +49 -0
  160. data/puppeteer-ruby.gemspec +32 -0
  161. metadata +355 -0
@@ -0,0 +1,834 @@
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 Fri Jun 12 12:38:35 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>