puppeteer-ruby 0.0.10 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
Files changed (132) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +0 -12
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +54 -1
  6. data/lib/puppeteer.rb +37 -13
  7. data/lib/puppeteer/browser.rb +39 -26
  8. data/lib/puppeteer/cdp_session.rb +3 -19
  9. data/lib/puppeteer/concurrent_ruby_utils.rb +12 -2
  10. data/lib/puppeteer/connection.rb +16 -16
  11. data/lib/puppeteer/define_async_method.rb +23 -0
  12. data/lib/puppeteer/dom_world.rb +58 -71
  13. data/lib/puppeteer/element_handle.rb +15 -44
  14. data/lib/puppeteer/emulation_manager.rb +2 -6
  15. data/lib/puppeteer/event_callbackable.rb +11 -0
  16. data/lib/puppeteer/execution_context.rb +1 -6
  17. data/lib/puppeteer/frame.rb +38 -3
  18. data/lib/puppeteer/frame_manager.rb +7 -25
  19. data/lib/puppeteer/js_handle.rb +3 -12
  20. data/lib/puppeteer/keyboard.rb +6 -27
  21. data/lib/puppeteer/launcher.rb +6 -6
  22. data/lib/puppeteer/launcher/chrome.rb +10 -8
  23. data/lib/puppeteer/mouse.rb +8 -33
  24. data/lib/puppeteer/page.rb +132 -121
  25. data/lib/puppeteer/page/pdf_options.rb +166 -0
  26. data/lib/puppeteer/remote_object.rb +2 -5
  27. data/lib/puppeteer/target.rb +1 -1
  28. data/lib/puppeteer/touch_screen.rb +2 -7
  29. data/lib/puppeteer/version.rb +1 -1
  30. data/lib/puppeteer/wait_task.rb +2 -4
  31. data/lib/puppeteer/web_socket_transport.rb +8 -8
  32. data/puppeteer-ruby.gemspec +1 -1
  33. data/puppeteer-ruby.png +0 -0
  34. metadata +9 -102
  35. data/Dockerfile +0 -6
  36. data/docker-compose.yml +0 -15
  37. data/docs/Puppeteer.html +0 -2020
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2148
  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 -430
  47. data/docs/Puppeteer/Connection.html +0 -960
  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/ElementNotFoundError.html +0 -206
  62. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  63. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  64. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  65. data/docs/Puppeteer/EmulationManager.html +0 -454
  66. data/docs/Puppeteer/EventCallbackable.html +0 -433
  67. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  68. data/docs/Puppeteer/ExecutionContext.html +0 -998
  69. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  70. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  71. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  72. data/docs/Puppeteer/FileChooser.html +0 -455
  73. data/docs/Puppeteer/Frame.html +0 -3677
  74. data/docs/Puppeteer/FrameManager.html +0 -2410
  75. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  76. data/docs/Puppeteer/IfPresent.html +0 -222
  77. data/docs/Puppeteer/JSHandle.html +0 -1352
  78. data/docs/Puppeteer/Keyboard.html +0 -1557
  79. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  80. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  81. data/docs/Puppeteer/Launcher.html +0 -237
  82. data/docs/Puppeteer/Launcher/Base.html +0 -385
  83. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  84. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  85. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  86. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  87. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  88. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  89. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  90. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  91. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  92. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  93. data/docs/Puppeteer/Mouse.html +0 -1105
  94. data/docs/Puppeteer/Mouse/Button.html +0 -136
  95. data/docs/Puppeteer/NetworkManager.html +0 -901
  96. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  97. data/docs/Puppeteer/Page.html +0 -5970
  98. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  99. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  100. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  101. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  102. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  103. data/docs/Puppeteer/RemoteObject.html +0 -1087
  104. data/docs/Puppeteer/Target.html +0 -1336
  105. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  106. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  107. data/docs/Puppeteer/TimeoutError.html +0 -135
  108. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  109. data/docs/Puppeteer/TouchScreen.html +0 -464
  110. data/docs/Puppeteer/Viewport.html +0 -837
  111. data/docs/Puppeteer/WaitTask.html +0 -637
  112. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  113. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  114. data/docs/Puppeteer/WebSocket.html +0 -673
  115. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  116. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  117. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  118. data/docs/_index.html +0 -823
  119. data/docs/class_list.html +0 -51
  120. data/docs/css/common.css +0 -1
  121. data/docs/css/full_list.css +0 -58
  122. data/docs/css/style.css +0 -496
  123. data/docs/file.README.html +0 -123
  124. data/docs/file_list.html +0 -56
  125. data/docs/frames.html +0 -17
  126. data/docs/index.html +0 -123
  127. data/docs/js/app.js +0 -314
  128. data/docs/js/full_list.js +0 -216
  129. data/docs/js/jquery.js +0 -4
  130. data/docs/method_list.html +0 -4075
  131. data/docs/top-level-namespace.html +0 -126
  132. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,214 +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::BrowserFetcher
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::BrowserFetcher";
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 (B)</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">BrowserFetcher</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::BrowserFetcher
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::BrowserFetcher</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/puppeteer/browser_fetcher.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p>Download latest chromium.</p>
106
-
107
-
108
- </div>
109
- </div>
110
- <div class="tags">
111
-
112
-
113
- </div>
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
- <h2>
122
- Instance Method Summary
123
- <small><a href="#" class="summary_toggle">collapse</a></small>
124
- </h2>
125
-
126
- <ul class="summary">
127
-
128
- <li class="public ">
129
- <span class="summary_signature">
130
-
131
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(project_root, options = {}) &#x21d2; BrowserFetcher </a>
132
-
133
-
134
-
135
- </span>
136
-
137
-
138
- <span class="note title constructor">constructor</span>
139
-
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
- <span class="summary_desc"><div class='inline'>
148
- <p>A new instance of BrowserFetcher.</p>
149
- </div></span>
150
-
151
- </li>
152
-
153
-
154
- </ul>
155
-
156
-
157
- <div id="constructor_details" class="method_details_list">
158
- <h2>Constructor Details</h2>
159
-
160
- <div class="method_details first">
161
- <h3 class="signature first" id="initialize-instance_method">
162
-
163
- #<strong>initialize</strong>(project_root, options = {}) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::BrowserFetcher (class)">BrowserFetcher</a></span></tt>
164
-
165
-
166
-
167
-
168
-
169
- </h3><div class="docstring">
170
- <div class="discussion">
171
-
172
- <p>Returns a new instance of BrowserFetcher.</p>
173
-
174
-
175
- </div>
176
- </div>
177
- <div class="tags">
178
-
179
-
180
- </div><table class="source_code">
181
- <tr>
182
- <td>
183
- <pre class="lines">
184
-
185
-
186
- 3
187
- 4
188
- 5</pre>
189
- </td>
190
- <td>
191
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_fetcher.rb', line 3</span>
192
-
193
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_project_root'>project_root</span><span class='comma'>,</span> <span class='id identifier rubyid_options'>options</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
194
- <span class='comment'># 未実装
195
- </span><span class='kw'>end</span></pre>
196
- </td>
197
- </tr>
198
- </table>
199
- </div>
200
-
201
- </div>
202
-
203
-
204
- </div>
205
-
206
- <div id="footer">
207
- Generated on Fri Jun 12 12:38:35 2020 by
208
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
209
- 0.9.24 (ruby-2.6.3).
210
- </div>
211
-
212
- </div>
213
- </body>
214
- </html>
@@ -1,914 +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::BrowserRunner
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::BrowserRunner";
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 (B)</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">BrowserRunner</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::BrowserRunner
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::BrowserRunner</li>
78
-
79
- </ul>
80
- <a href="#" class="inheritanceTree">show all</a>
81
-
82
- </dd>
83
- </dl>
84
-
85
-
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
- <dl>
96
- <dt>Defined in:</dt>
97
- <dd>lib/puppeteer/browser_runner.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Overview</h2><div class="docstring">
103
- <div class="discussion">
104
-
105
- <p><a href="https://github.com/puppeteer/puppeteer/blob/master/lib/Launcher.js">github.com/puppeteer/puppeteer/blob/master/lib/Launcher.js</a></p>
106
-
107
-
108
- </div>
109
- </div>
110
- <div class="tags">
111
-
112
-
113
- </div><h2>Defined Under Namespace</h2>
114
- <p class="children">
115
-
116
-
117
-
118
-
119
- <strong class="classes">Classes:</strong> <span class='object_link'><a href="BrowserRunner/BrowserProcess.html" title="Puppeteer::BrowserRunner::BrowserProcess (class)">BrowserProcess</a></span>
120
-
121
-
122
- </p>
123
-
124
-
125
-
126
-
127
- <h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
128
- <ul class="summary">
129
-
130
- <li class="public ">
131
- <span class="summary_signature">
132
-
133
- <a href="#connection-instance_method" title="#connection (instance method)">#<strong>connection</strong> &#x21d2; Object </a>
134
-
135
-
136
-
137
- </span>
138
-
139
-
140
-
141
-
142
- <span class="note title readonly">readonly</span>
143
-
144
-
145
-
146
-
147
-
148
-
149
-
150
-
151
-
152
- <span class="summary_desc"><div class='inline'>
153
- <p>Returns the value of attribute connection.</p>
154
- </div></span>
155
-
156
- </li>
157
-
158
-
159
- <li class="public ">
160
- <span class="summary_signature">
161
-
162
- <a href="#proc-instance_method" title="#proc (instance method)">#<strong>proc</strong> &#x21d2; Object </a>
163
-
164
-
165
-
166
- </span>
167
-
168
-
169
-
170
-
171
- <span class="note title readonly">readonly</span>
172
-
173
-
174
-
175
-
176
-
177
-
178
-
179
-
180
-
181
- <span class="summary_desc"><div class='inline'>
182
- <p>Returns the value of attribute proc.</p>
183
- </div></span>
184
-
185
- </li>
186
-
187
-
188
- </ul>
189
-
190
-
191
-
192
-
193
-
194
- <h2>
195
- Instance Method Summary
196
- <small><a href="#" class="summary_toggle">collapse</a></small>
197
- </h2>
198
-
199
- <ul class="summary">
200
-
201
- <li class="public ">
202
- <span class="summary_signature">
203
-
204
- <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong> &#x21d2; Promise </a>
205
-
206
-
207
-
208
- </span>
209
-
210
-
211
-
212
-
213
-
214
-
215
-
216
-
217
-
218
- <span class="summary_desc"><div class='inline'></div></span>
219
-
220
- </li>
221
-
222
-
223
- <li class="public ">
224
- <span class="summary_signature">
225
-
226
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(executable_path, process_arguments, temp_directory) &#x21d2; BrowserRunner </a>
227
-
228
-
229
-
230
- </span>
231
-
232
-
233
- <span class="note title constructor">constructor</span>
234
-
235
-
236
-
237
-
238
-
239
-
240
-
241
-
242
- <span class="summary_desc"><div class='inline'>
243
- <p>A new instance of BrowserRunner.</p>
244
- </div></span>
245
-
246
- </li>
247
-
248
-
249
- <li class="public ">
250
- <span class="summary_signature">
251
-
252
- <a href="#kill-instance_method" title="#kill (instance method)">#<strong>kill</strong> &#x21d2; Promise </a>
253
-
254
-
255
-
256
- </span>
257
-
258
-
259
-
260
-
261
-
262
-
263
-
264
-
265
-
266
- <span class="summary_desc"><div class='inline'></div></span>
267
-
268
- </li>
269
-
270
-
271
- <li class="public ">
272
- <span class="summary_signature">
273
-
274
- <a href="#setup_connection-instance_method" title="#setup_connection (instance method)">#<strong>setup_connection</strong>(use_pipe:, timeout:, slow_mo:, preferred_revision:) &#x21d2; !Promise&lt;!Connection&gt; </a>
275
-
276
-
277
-
278
- </span>
279
-
280
-
281
-
282
-
283
-
284
-
285
-
286
-
287
-
288
- <span class="summary_desc"><div class='inline'></div></span>
289
-
290
- </li>
291
-
292
-
293
- <li class="public ">
294
- <span class="summary_signature">
295
-
296
- <a href="#start-instance_method" title="#start (instance method)">#<strong>start</strong>(executable_path: nil, ignore_default_args: nil, handle_SIGINT: nil, handle_SIGTERM: nil, handle_SIGHUP: nil, timeout: nil, dumpio: nil, env: nil, pipe: nil) &#x21d2; Object </a>
297
-
298
-
299
-
300
- </span>
301
-
302
-
303
-
304
-
305
-
306
-
307
-
308
-
309
-
310
- <span class="summary_desc"><div class='inline'></div></span>
311
-
312
- </li>
313
-
314
-
315
- </ul>
316
-
317
-
318
- <div id="constructor_details" class="method_details_list">
319
- <h2>Constructor Details</h2>
320
-
321
- <div class="method_details first">
322
- <h3 class="signature first" id="initialize-instance_method">
323
-
324
- #<strong>initialize</strong>(executable_path, process_arguments, temp_directory) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::BrowserRunner (class)">BrowserRunner</a></span></tt>
325
-
326
-
327
-
328
-
329
-
330
- </h3><div class="docstring">
331
- <div class="discussion">
332
-
333
- <p>Returns a new instance of BrowserRunner.</p>
334
-
335
-
336
- </div>
337
- </div>
338
- <div class="tags">
339
- <p class="tag_title">Parameters:</p>
340
- <ul class="param">
341
-
342
- <li>
343
-
344
- <span class='name'>executablePath</span>
345
-
346
-
347
- <span class='type'>(<tt>string</tt>)</span>
348
-
349
-
350
-
351
- </li>
352
-
353
- <li>
354
-
355
- <span class='name'>processArguments</span>
356
-
357
-
358
- <span class='type'>(<tt>!Array&lt;string&gt;</tt>)</span>
359
-
360
-
361
-
362
- </li>
363
-
364
- <li>
365
-
366
- <span class='name'>tempDirectory</span>
367
-
368
-
369
- <span class='type'>(<tt>string=</tt>)</span>
370
-
371
-
372
-
373
- </li>
374
-
375
- </ul>
376
-
377
-
378
- </div><table class="source_code">
379
- <tr>
380
- <td>
381
- <pre class="lines">
382
-
383
-
384
- 10
385
- 11
386
- 12
387
- 13
388
- 14
389
- 15
390
- 16
391
- 17
392
- 18</pre>
393
- </td>
394
- <td>
395
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 10</span>
396
-
397
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_executable_path'>executable_path</span><span class='comma'>,</span> <span class='id identifier rubyid_process_arguments'>process_arguments</span><span class='comma'>,</span> <span class='id identifier rubyid_temp_directory'>temp_directory</span><span class='rparen'>)</span>
398
- <span class='ivar'>@executable_path</span> <span class='op'>=</span> <span class='id identifier rubyid_executable_path'>executable_path</span>
399
- <span class='ivar'>@process_arguments</span> <span class='op'>=</span> <span class='id identifier rubyid_process_arguments'>process_arguments</span>
400
- <span class='ivar'>@temp_directory</span> <span class='op'>=</span> <span class='id identifier rubyid_temp_directory'>temp_directory</span>
401
- <span class='ivar'>@proc</span> <span class='op'>=</span> <span class='kw'>nil</span>
402
- <span class='ivar'>@connection</span> <span class='op'>=</span> <span class='kw'>nil</span>
403
- <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>true</span>
404
- <span class='ivar'>@listeners</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
405
- <span class='kw'>end</span></pre>
406
- </td>
407
- </tr>
408
- </table>
409
- </div>
410
-
411
- </div>
412
-
413
- <div id="instance_attr_details" class="attr_details">
414
- <h2>Instance Attribute Details</h2>
415
-
416
-
417
- <span id=""></span>
418
- <div class="method_details first">
419
- <h3 class="signature first" id="connection-instance_method">
420
-
421
- #<strong>connection</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
422
-
423
-
424
-
425
-
426
-
427
- </h3><div class="docstring">
428
- <div class="discussion">
429
-
430
- <p>Returns the value of attribute connection.</p>
431
-
432
-
433
- </div>
434
- </div>
435
- <div class="tags">
436
-
437
-
438
- </div><table class="source_code">
439
- <tr>
440
- <td>
441
- <pre class="lines">
442
-
443
-
444
- 20
445
- 21
446
- 22</pre>
447
- </td>
448
- <td>
449
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 20</span>
450
-
451
- <span class='kw'>def</span> <span class='id identifier rubyid_connection'>connection</span>
452
- <span class='ivar'>@connection</span>
453
- <span class='kw'>end</span></pre>
454
- </td>
455
- </tr>
456
- </table>
457
- </div>
458
-
459
-
460
- <span id=""></span>
461
- <div class="method_details ">
462
- <h3 class="signature " id="proc-instance_method">
463
-
464
- #<strong>proc</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 proc.</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
- 20
488
- 21
489
- 22</pre>
490
- </td>
491
- <td>
492
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 20</span>
493
-
494
- <span class='kw'>def</span> <span class='id identifier rubyid_proc'>proc</span>
495
- <span class='ivar'>@proc</span>
496
- <span class='kw'>end</span></pre>
497
- </td>
498
- </tr>
499
- </table>
500
- </div>
501
-
502
- </div>
503
-
504
-
505
- <div id="instance_method_details" class="method_details_list">
506
- <h2>Instance Method Details</h2>
507
-
508
-
509
- <div class="method_details first">
510
- <h3 class="signature first" id="close-instance_method">
511
-
512
- #<strong>close</strong> &#x21d2; <tt>Promise</tt>
513
-
514
-
515
-
516
-
517
-
518
- </h3><div class="docstring">
519
- <div class="discussion">
520
-
521
-
522
- </div>
523
- </div>
524
- <div class="tags">
525
-
526
- <p class="tag_title">Returns:</p>
527
- <ul class="return">
528
-
529
- <li>
530
-
531
-
532
- <span class='type'>(<tt>Promise</tt>)</span>
533
-
534
-
535
-
536
- </li>
537
-
538
- </ul>
539
-
540
- </div><table class="source_code">
541
- <tr>
542
- <td>
543
- <pre class="lines">
544
-
545
-
546
- 108
547
- 109
548
- 110
549
- 111
550
- 112
551
- 113
552
- 114
553
- 115
554
- 116
555
- 117
556
- 118
557
- 119
558
- 120
559
- 121
560
- 122</pre>
561
- </td>
562
- <td>
563
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 108</span>
564
-
565
- <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
566
- <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@closed</span>
567
-
568
- <span class='kw'>if</span> <span class='ivar'>@temp_directory</span>
569
- <span class='id identifier rubyid_kill'>kill</span>
570
- <span class='kw'>elsif</span> <span class='ivar'>@connection</span>
571
- <span class='kw'>begin</span>
572
- <span class='ivar'>@connection</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'>Browser.close</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
573
- <span class='kw'>rescue</span>
574
- <span class='id identifier rubyid_kill'>kill</span>
575
- <span class='kw'>end</span>
576
- <span class='kw'>end</span>
577
-
578
- <span class='ivar'>@process_closing</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
579
- <span class='kw'>end</span></pre>
580
- </td>
581
- </tr>
582
- </table>
583
- </div>
584
-
585
- <div class="method_details ">
586
- <h3 class="signature " id="kill-instance_method">
587
-
588
- #<strong>kill</strong> &#x21d2; <tt>Promise</tt>
589
-
590
-
591
-
592
-
593
-
594
- </h3><div class="docstring">
595
- <div class="discussion">
596
-
597
-
598
- </div>
599
- </div>
600
- <div class="tags">
601
-
602
- <p class="tag_title">Returns:</p>
603
- <ul class="return">
604
-
605
- <li>
606
-
607
-
608
- <span class='type'>(<tt>Promise</tt>)</span>
609
-
610
-
611
-
612
- </li>
613
-
614
- </ul>
615
-
616
- </div><table class="source_code">
617
- <tr>
618
- <td>
619
- <pre class="lines">
620
-
621
-
622
- 125
623
- 126
624
- 127
625
- 128
626
- 129
627
- 130
628
- 131
629
- 132</pre>
630
- </td>
631
- <td>
632
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 125</span>
633
-
634
- <span class='kw'>def</span> <span class='id identifier rubyid_kill'>kill</span>
635
- <span class='kw'>unless</span> <span class='ivar'>@closed</span>
636
- <span class='ivar'>@proc</span><span class='period'>.</span><span class='id identifier rubyid_kill'>kill</span>
637
- <span class='kw'>end</span>
638
- <span class='kw'>if</span> <span class='ivar'>@temp_directory</span>
639
- <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm_rf'>rm_rf</span><span class='lparen'>(</span><span class='ivar'>@temp_directory</span><span class='rparen'>)</span>
640
- <span class='kw'>end</span>
641
- <span class='kw'>end</span></pre>
642
- </td>
643
- </tr>
644
- </table>
645
- </div>
646
-
647
- <div class="method_details ">
648
- <h3 class="signature " id="setup_connection-instance_method">
649
-
650
- #<strong>setup_connection</strong>(use_pipe:, timeout:, slow_mo:, preferred_revision:) &#x21d2; <tt>!Promise&lt;!<span class='object_link'><a href="Connection.html" title="Puppeteer::Connection (class)">Connection</a></span>&gt;</tt>
651
-
652
-
653
-
654
-
655
-
656
- </h3><div class="docstring">
657
- <div class="discussion">
658
-
659
-
660
- </div>
661
- </div>
662
- <div class="tags">
663
- <p class="tag_title">Parameters:</p>
664
- <ul class="param">
665
-
666
- <li>
667
-
668
- <span class='name'>options</span>
669
-
670
-
671
- <span class='type'>(<tt>!({usePipe?: boolean, timeout: number, slowMo: number, preferredRevision: string})</tt>)</span>
672
-
673
-
674
-
675
- </li>
676
-
677
- </ul>
678
-
679
- <p class="tag_title">Returns:</p>
680
- <ul class="return">
681
-
682
- <li>
683
-
684
-
685
- <span class='type'>(<tt>!Promise&lt;!<span class='object_link'><a href="Connection.html" title="Puppeteer::Connection (class)">Connection</a></span>&gt;</tt>)</span>
686
-
687
-
688
-
689
- </li>
690
-
691
- </ul>
692
-
693
- </div><table class="source_code">
694
- <tr>
695
- <td>
696
- <pre class="lines">
697
-
698
-
699
- 137
700
- 138
701
- 139
702
- 140
703
- 141
704
- 142
705
- 143
706
- 144
707
- 145
708
- 146
709
- 147</pre>
710
- </td>
711
- <td>
712
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 137</span>
713
-
714
- <span class='kw'>def</span> <span class='id identifier rubyid_setup_connection'>setup_connection</span><span class='lparen'>(</span><span class='label'>use_pipe:</span><span class='comma'>,</span> <span class='label'>timeout:</span><span class='comma'>,</span> <span class='label'>slow_mo:</span><span class='comma'>,</span> <span class='label'>preferred_revision:</span><span class='rparen'>)</span>
715
- <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_use_pipe'>use_pipe</span>
716
- <span class='id identifier rubyid_browser_ws_endpoint'>browser_ws_endpoint</span> <span class='op'>=</span> <span class='id identifier rubyid_wait_for_ws_endpoint'>wait_for_ws_endpoint</span><span class='lparen'>(</span><span class='ivar'>@proc</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span> <span class='id identifier rubyid_preferred_revision'>preferred_revision</span><span class='rparen'>)</span>
717
- <span class='id identifier rubyid_transport'>transport</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WebSocketTransport.html" title="Puppeteer::WebSocketTransport (class)">WebSocketTransport</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="WebSocketTransport.html#create-class_method" title="Puppeteer::WebSocketTransport.create (method)">create</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_browser_ws_endpoint'>browser_ws_endpoint</span><span class='rparen'>)</span>
718
- <span class='ivar'>@connection</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Connection.html" title="Puppeteer::Connection (class)">Connection</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Connection.html#initialize-instance_method" title="Puppeteer::Connection#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_browser_ws_endpoint'>browser_ws_endpoint</span><span class='comma'>,</span> <span class='id identifier rubyid_transport'>transport</span><span class='comma'>,</span> <span class='id identifier rubyid_slow_mo'>slow_mo</span><span class='rparen'>)</span>
719
- <span class='kw'>else</span>
720
- <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'>PipeTransport is not yet implemented</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
721
- <span class='kw'>end</span>
722
-
723
- <span class='ivar'>@connection</span>
724
- <span class='kw'>end</span></pre>
725
- </td>
726
- </tr>
727
- </table>
728
- </div>
729
-
730
- <div class="method_details ">
731
- <h3 class="signature " id="start-instance_method">
732
-
733
- #<strong>start</strong>(executable_path: nil, ignore_default_args: nil, handle_SIGINT: nil, handle_SIGTERM: nil, handle_SIGHUP: nil, timeout: nil, dumpio: nil, env: nil, pipe: nil) &#x21d2; <tt>Object</tt>
734
-
735
-
736
-
737
-
738
-
739
- </h3><div class="docstring">
740
- <div class="discussion">
741
-
742
-
743
- </div>
744
- </div>
745
- <div class="tags">
746
- <p class="tag_title">Parameters:</p>
747
- <ul class="param">
748
-
749
- <li>
750
-
751
- <span class='name'>options</span>
752
-
753
-
754
- <span class='type'>(<tt>!(<span class='object_link'><a href="Launcher.html" title="Puppeteer::Launcher (module)">Launcher</a></span>.LaunchOptions)=</tt>)</span>
755
-
756
-
757
-
758
- </li>
759
-
760
- </ul>
761
-
762
-
763
- </div><table class="source_code">
764
- <tr>
765
- <td>
766
- <pre class="lines">
767
-
768
-
769
- 44
770
- 45
771
- 46
772
- 47
773
- 48
774
- 49
775
- 50
776
- 51
777
- 52
778
- 53
779
- 54
780
- 55
781
- 56
782
- 57
783
- 58
784
- 59
785
- 60
786
- 61
787
- 62
788
- 63
789
- 64
790
- 65
791
- 66
792
- 67
793
- 68
794
- 69
795
- 70
796
- 71
797
- 72
798
- 73
799
- 74
800
- 75
801
- 76
802
- 77
803
- 78
804
- 79
805
- 80
806
- 81
807
- 82
808
- 83
809
- 84
810
- 85
811
- 86
812
- 87
813
- 88
814
- 89
815
- 90
816
- 91
817
- 92
818
- 93
819
- 94
820
- 95
821
- 96
822
- 97
823
- 98
824
- 99
825
- 100
826
- 101
827
- 102
828
- 103
829
- 104
830
- 105</pre>
831
- </td>
832
- <td>
833
- <pre class="code"><span class="info file"># File 'lib/puppeteer/browser_runner.rb', line 44</span>
834
-
835
- <span class='kw'>def</span> <span class='id identifier rubyid_start'>start</span><span class='lparen'>(</span>
836
- <span class='label'>executable_path:</span> <span class='kw'>nil</span><span class='comma'>,</span>
837
- <span class='label'>ignore_default_args:</span> <span class='kw'>nil</span><span class='comma'>,</span>
838
- <span class='label'>handle_SIGINT:</span> <span class='kw'>nil</span><span class='comma'>,</span>
839
- <span class='label'>handle_SIGTERM:</span> <span class='kw'>nil</span><span class='comma'>,</span>
840
- <span class='label'>handle_SIGHUP:</span> <span class='kw'>nil</span><span class='comma'>,</span>
841
- <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='comma'>,</span>
842
- <span class='label'>dumpio:</span> <span class='kw'>nil</span><span class='comma'>,</span>
843
- <span class='label'>env:</span> <span class='kw'>nil</span><span class='comma'>,</span>
844
- <span class='label'>pipe:</span> <span class='kw'>nil</span>
845
- <span class='rparen'>)</span>
846
- <span class='ivar'>@launch_options</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Launcher.html" title="Puppeteer::Launcher (module)">Launcher</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Launcher/LaunchOptions.html" title="Puppeteer::Launcher::LaunchOptions (class)">LaunchOptions</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Launcher/LaunchOptions.html#initialize-instance_method" title="Puppeteer::Launcher::LaunchOptions#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='lbrace'>{</span>
847
- <span class='label'>executable_path:</span> <span class='id identifier rubyid_executable_path'>executable_path</span><span class='comma'>,</span>
848
- <span class='label'>ignore_default_args:</span> <span class='id identifier rubyid_ignore_default_args'>ignore_default_args</span><span class='comma'>,</span>
849
- <span class='label'>handle_SIGINT:</span> <span class='id identifier rubyid_handle_SIGINT'>handle_SIGINT</span><span class='comma'>,</span>
850
- <span class='label'>handle_SIGTERM:</span> <span class='id identifier rubyid_handle_SIGTERM'>handle_SIGTERM</span><span class='comma'>,</span>
851
- <span class='label'>handle_SIGHUP:</span> <span class='id identifier rubyid_handle_SIGHUP'>handle_SIGHUP</span><span class='comma'>,</span>
852
- <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='comma'>,</span>
853
- <span class='label'>dumpio:</span> <span class='id identifier rubyid_dumpio'>dumpio</span><span class='comma'>,</span>
854
- <span class='label'>env:</span> <span class='id identifier rubyid_env'>env</span><span class='comma'>,</span>
855
- <span class='label'>pipe:</span> <span class='id identifier rubyid_pipe'>pipe</span><span class='comma'>,</span>
856
- <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span><span class='rparen'>)</span>
857
- <span class='ivar'>@proc</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="BrowserRunner/BrowserProcess.html" title="Puppeteer::BrowserRunner::BrowserProcess (class)">BrowserProcess</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BrowserRunner/BrowserProcess.html#initialize-instance_method" title="Puppeteer::BrowserRunner::BrowserProcess#initialize (method)">new</a></span></span><span class='lparen'>(</span>
858
- <span class='ivar'>@launch_options</span><span class='period'>.</span><span class='id identifier rubyid_env'>env</span><span class='comma'>,</span>
859
- <span class='ivar'>@executable_path</span><span class='comma'>,</span>
860
- <span class='ivar'>@process_arguments</span><span class='comma'>,</span>
861
- <span class='rparen'>)</span>
862
- <span class='comment'># if (dumpio) {
863
- </span> <span class='comment'># this.proc.stderr.pipe(process.stderr);
864
- </span> <span class='comment'># this.proc.stdout.pipe(process.stdout);
865
- </span> <span class='comment'># }
866
- </span> <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>false</span>
867
- <span class='ivar'>@process_closing</span> <span class='op'>=</span> <span class='tlambda'>-&gt;</span> <span class='tlambeg'>{</span>
868
- <span class='ivar'>@proc</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
869
- <span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>true</span>
870
- <span class='kw'>if</span> <span class='ivar'>@temp_directory</span>
871
- <span class='const'>FileUtils</span><span class='period'>.</span><span class='id identifier rubyid_rm_rf'>rm_rf</span><span class='lparen'>(</span><span class='ivar'>@temp_directory</span><span class='rparen'>)</span>
872
- <span class='kw'>end</span>
873
- <span class='rbrace'>}</span>
874
- <span class='id identifier rubyid_trap'>trap</span><span class='lparen'>(</span><span class='symbol'>:EXIT</span><span class='rparen'>)</span> <span class='kw'>do</span>
875
- <span class='id identifier rubyid_kill'>kill</span>
876
- <span class='kw'>end</span>
877
-
878
- <span class='kw'>if</span> <span class='ivar'>@launch_options</span><span class='period'>.</span><span class='id identifier rubyid_handle_SIGINT?'>handle_SIGINT?</span>
879
- <span class='id identifier rubyid_trap'>trap</span><span class='lparen'>(</span><span class='symbol'>:INT</span><span class='rparen'>)</span> <span class='kw'>do</span>
880
- <span class='id identifier rubyid_kill'>kill</span>
881
- <span class='id identifier rubyid_exit'>exit</span> <span class='int'>130</span>
882
- <span class='kw'>end</span>
883
- <span class='kw'>end</span>
884
-
885
- <span class='kw'>if</span> <span class='ivar'>@launch_options</span><span class='period'>.</span><span class='id identifier rubyid_handle_SIGTERM?'>handle_SIGTERM?</span>
886
- <span class='id identifier rubyid_trap'>trap</span><span class='lparen'>(</span><span class='symbol'>:TERM</span><span class='rparen'>)</span> <span class='kw'>do</span>
887
- <span class='id identifier rubyid_close'>close</span>
888
- <span class='kw'>end</span>
889
- <span class='kw'>end</span>
890
-
891
- <span class='kw'>if</span> <span class='ivar'>@launch_options</span><span class='period'>.</span><span class='id identifier rubyid_handle_SIGHUP?'>handle_SIGHUP?</span>
892
- <span class='id identifier rubyid_trap'>trap</span><span class='lparen'>(</span><span class='symbol'>:HUP</span><span class='rparen'>)</span> <span class='kw'>do</span>
893
- <span class='id identifier rubyid_close'>close</span>
894
- <span class='kw'>end</span>
895
- <span class='kw'>end</span>
896
- <span class='kw'>end</span></pre>
897
- </td>
898
- </tr>
899
- </table>
900
- </div>
901
-
902
- </div>
903
-
904
- </div>
905
-
906
- <div id="footer">
907
- Generated on Fri Jun 12 12:38:34 2020 by
908
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
909
- 0.9.24 (ruby-2.6.3).
910
- </div>
911
-
912
- </div>
913
- </body>
914
- </html>