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.
- checksums.yaml +4 -4
- data/.circleci/config.yml +2 -14
- data/.github/workflows/docs.yml +45 -0
- data/.github/workflows/reviewdog.yml +15 -0
- data/README.md +52 -1
- data/lib/puppeteer.rb +10 -2
- data/lib/puppeteer/browser.rb +53 -34
- data/lib/puppeteer/browser_context.rb +35 -5
- data/lib/puppeteer/cdp_session.rb +3 -19
- data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
- data/lib/puppeteer/connection.rb +9 -16
- data/lib/puppeteer/debug_print.rb +1 -1
- data/lib/puppeteer/define_async_method.rb +23 -0
- data/lib/puppeteer/dom_world.rb +67 -78
- data/lib/puppeteer/element_handle.rb +19 -47
- data/lib/puppeteer/emulation_manager.rb +2 -6
- data/lib/puppeteer/env.rb +18 -0
- data/lib/puppeteer/execution_context.rb +1 -6
- data/lib/puppeteer/frame.rb +34 -39
- data/lib/puppeteer/frame_manager.rb +7 -25
- data/lib/puppeteer/js_handle.rb +3 -12
- data/lib/puppeteer/keyboard.rb +9 -29
- data/lib/puppeteer/launcher/chrome.rb +9 -7
- data/lib/puppeteer/mouse.rb +20 -24
- data/lib/puppeteer/network_manager.rb +163 -5
- data/lib/puppeteer/page.rb +213 -179
- data/lib/puppeteer/page/pdf_options.rb +166 -0
- data/lib/puppeteer/remote_object.rb +2 -5
- data/lib/puppeteer/request.rb +330 -0
- data/lib/puppeteer/response.rb +113 -0
- data/lib/puppeteer/touch_screen.rb +2 -7
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/wait_task.rb +2 -4
- data/lib/puppeteer/web_socket.rb +7 -0
- data/puppeteer-ruby.gemspec +2 -1
- metadata +25 -103
- data/docs/Puppeteer.html +0 -2338
- data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
- data/docs/Puppeteer/Browser.html +0 -2258
- data/docs/Puppeteer/BrowserContext.html +0 -809
- data/docs/Puppeteer/BrowserFetcher.html +0 -214
- data/docs/Puppeteer/BrowserRunner.html +0 -914
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
- data/docs/Puppeteer/CDPSession.html +0 -813
- data/docs/Puppeteer/CDPSession/Error.html +0 -124
- data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
- data/docs/Puppeteer/Connection.html +0 -964
- data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
- data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
- data/docs/Puppeteer/ConsoleMessage.html +0 -565
- data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
- data/docs/Puppeteer/DOMWorld.html +0 -2219
- data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
- data/docs/Puppeteer/DebugPrint.html +0 -233
- data/docs/Puppeteer/Device.html +0 -470
- data/docs/Puppeteer/Devices.html +0 -139
- data/docs/Puppeteer/ElementHandle.html +0 -2542
- data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
- data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
- data/docs/Puppeteer/ElementHandle/Point.html +0 -492
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
- data/docs/Puppeteer/EmulationManager.html +0 -454
- data/docs/Puppeteer/EventCallbackable.html +0 -499
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
- data/docs/Puppeteer/ExecutionContext.html +0 -998
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
- data/docs/Puppeteer/FileChooser.html +0 -455
- data/docs/Puppeteer/Frame.html +0 -3813
- data/docs/Puppeteer/FrameManager.html +0 -2410
- data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
- data/docs/Puppeteer/IfPresent.html +0 -222
- data/docs/Puppeteer/JSHandle.html +0 -1352
- data/docs/Puppeteer/Keyboard.html +0 -1557
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
- data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
- data/docs/Puppeteer/Launcher.html +0 -237
- data/docs/Puppeteer/Launcher/Base.html +0 -385
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
- data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
- data/docs/Puppeteer/Launcher/Chrome.html +0 -669
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
- data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
- data/docs/Puppeteer/LifecycleWatcher.html +0 -834
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
- data/docs/Puppeteer/Mouse.html +0 -1095
- data/docs/Puppeteer/Mouse/Button.html +0 -136
- data/docs/Puppeteer/NetworkManager.html +0 -901
- data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
- data/docs/Puppeteer/Page.html +0 -6173
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
- data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
- data/docs/Puppeteer/Page/ScriptTag.html +0 -555
- data/docs/Puppeteer/Page/StyleTag.html +0 -448
- data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
- data/docs/Puppeteer/RemoteObject.html +0 -1087
- data/docs/Puppeteer/Target.html +0 -1336
- data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
- data/docs/Puppeteer/Target/TargetInfo.html +0 -729
- data/docs/Puppeteer/TimeoutError.html +0 -135
- data/docs/Puppeteer/TimeoutSettings.html +0 -496
- data/docs/Puppeteer/TouchScreen.html +0 -464
- data/docs/Puppeteer/Viewport.html +0 -837
- data/docs/Puppeteer/WaitTask.html +0 -637
- data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
- data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
- data/docs/Puppeteer/WebSocket.html +0 -673
- data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
- data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
- data/docs/Puppeteer/WebSocketTransport.html +0 -600
- data/docs/Puppeteer/WebSocktTransportError.html +0 -124
- data/docs/_index.html +0 -816
- data/docs/class_list.html +0 -51
- data/docs/css/common.css +0 -1
- data/docs/css/full_list.css +0 -58
- data/docs/css/style.css +0 -496
- data/docs/file.README.html +0 -125
- data/docs/file_list.html +0 -56
- data/docs/frames.html +0 -17
- data/docs/index.html +0 -125
- data/docs/js/app.js +0 -314
- data/docs/js/full_list.js +0 -216
- data/docs/js/jquery.js +0 -4
- data/docs/method_list.html +0 -4115
- data/docs/top-level-namespace.html +0 -126
- data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,237 +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
|
-
Module: Puppeteer::Launcher
|
8
|
-
|
9
|
-
— 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::Launcher";
|
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> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Launcher</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>Module: Puppeteer::Launcher
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
</h1>
|
67
|
-
<div class="box_info">
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
<dl>
|
80
|
-
<dt>Defined in:</dt>
|
81
|
-
<dd>lib/puppeteer/launcher.rb<span class="defines">,<br />
|
82
|
-
lib/puppeteer/launcher/base.rb,<br /> lib/puppeteer/launcher/chrome.rb,<br /> lib/puppeteer/launcher/launch_options.rb,<br /> lib/puppeteer/launcher/browser_options.rb,<br /> lib/puppeteer/launcher/chrome_arg_options.rb</span>
|
83
|
-
</dd>
|
84
|
-
</dl>
|
85
|
-
|
86
|
-
</div>
|
87
|
-
|
88
|
-
<h2>Overview</h2><div class="docstring">
|
89
|
-
<div class="discussion">
|
90
|
-
|
91
|
-
<p>const
|
92
|
-
<pre class="code ruby"><code class="ruby">ignoreDefaultArgs = false,
|
93
|
-
args = [],
|
94
|
-
dumpio = false,
|
95
|
-
executablePath = null,
|
96
|
-
pipe = false,
|
97
|
-
env = process.env,
|
98
|
-
handleSIGINT = true,
|
99
|
-
handleSIGTERM = true,
|
100
|
-
handleSIGHUP = true,
|
101
|
-
ignoreHTTPSErrors = false,
|
102
|
-
defaultViewport = {width: 800, height: 600,
|
103
|
-
slowMo = 0,
|
104
|
-
timeout = 30000
|
105
|
-
</code></pre>
|
106
|
-
|
107
|
-
<p>} = options; const {</p>
|
108
|
-
|
109
|
-
<pre class="code ruby"><code class="ruby"><span class='id identifier rubyid_devtools'>devtools</span> <span class='op'>=</span> <span class='kw'>false</span><span class='comma'>,</span>
|
110
|
-
<span class='id identifier rubyid_headless'>headless</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_devtools'>devtools</span><span class='comma'>,</span>
|
111
|
-
<span class='id identifier rubyid_args'>args</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span><span class='comma'>,</span>
|
112
|
-
<span class='id identifier rubyid_userDataDir'>userDataDir</span> <span class='op'>=</span> <span class='id identifier rubyid_null'>null</span>
|
113
|
-
</code></pre>
|
114
|
-
|
115
|
-
<p>} = options;</p>
|
116
|
-
|
117
|
-
|
118
|
-
</div>
|
119
|
-
</div>
|
120
|
-
<div class="tags">
|
121
|
-
|
122
|
-
|
123
|
-
</div><h2>Defined Under Namespace</h2>
|
124
|
-
<p class="children">
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Launcher/Base.html" title="Puppeteer::Launcher::Base (class)">Base</a></span>, <span class='object_link'><a href="Launcher/BrowserOptions.html" title="Puppeteer::Launcher::BrowserOptions (class)">BrowserOptions</a></span>, <span class='object_link'><a href="Launcher/Chrome.html" title="Puppeteer::Launcher::Chrome (class)">Chrome</a></span>, <span class='object_link'><a href="Launcher/ChromeArgOptions.html" title="Puppeteer::Launcher::ChromeArgOptions (class)">ChromeArgOptions</a></span>, <span class='object_link'><a href="Launcher/LaunchOptions.html" title="Puppeteer::Launcher::LaunchOptions (class)">LaunchOptions</a></span>
|
130
|
-
|
131
|
-
|
132
|
-
</p>
|
133
|
-
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
<h2>
|
142
|
-
Class Method Summary
|
143
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
144
|
-
</h2>
|
145
|
-
|
146
|
-
<ul class="summary">
|
147
|
-
|
148
|
-
<li class="public ">
|
149
|
-
<span class="summary_signature">
|
150
|
-
|
151
|
-
<a href="#firefox-class_method" title="firefox (class method)">.<strong>firefox</strong> ⇒ Object </a>
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
</span>
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
166
|
-
|
167
|
-
</li>
|
168
|
-
|
169
|
-
|
170
|
-
<li class="public ">
|
171
|
-
<span class="summary_signature">
|
172
|
-
|
173
|
-
<a href="#FirefoxLauncher+is+not+implemented+yet%2E-class_method" title="FirefoxLauncher is not implemented yet. (class method)">.<strong>FirefoxLauncher is not implemented yet.</strong> ⇒ Object </a>
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
</span>
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
188
|
-
|
189
|
-
</li>
|
190
|
-
|
191
|
-
|
192
|
-
</ul>
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<div id="class_method_details" class="method_details_list">
|
198
|
-
<h2>Class Method Details</h2>
|
199
|
-
|
200
|
-
|
201
|
-
<div class="method_details first">
|
202
|
-
<h3 class="signature first" id="firefox-class_method">
|
203
|
-
|
204
|
-
.<strong>firefox</strong> ⇒ <tt>Object</tt>
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
</h3>
|
211
|
-
</div>
|
212
|
-
|
213
|
-
<div class="method_details ">
|
214
|
-
<h3 class="signature " id="FirefoxLauncher is not implemented yet.-class_method">
|
215
|
-
|
216
|
-
.<strong>FirefoxLauncher is not implemented yet.</strong> ⇒ <tt>Object</tt>
|
217
|
-
|
218
|
-
|
219
|
-
|
220
|
-
|
221
|
-
|
222
|
-
</h3>
|
223
|
-
</div>
|
224
|
-
|
225
|
-
</div>
|
226
|
-
|
227
|
-
</div>
|
228
|
-
|
229
|
-
<div id="footer">
|
230
|
-
Generated on Tue Jun 23 10:24:58 2020 by
|
231
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
232
|
-
0.9.24 (ruby-2.6.3).
|
233
|
-
</div>
|
234
|
-
|
235
|
-
</div>
|
236
|
-
</body>
|
237
|
-
</html>
|
@@ -1,385 +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::Launcher::Base
|
8
|
-
|
9
|
-
— 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::Launcher::Base";
|
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> »
|
40
|
-
<span class='title'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span> » <span class='title'><span class='object_link'><a href="../Launcher.html" title="Puppeteer::Launcher (module)">Launcher</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Base</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::Launcher::Base
|
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::Launcher::Base</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/launcher/base.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
<div id="subclasses">
|
103
|
-
<h2>Direct Known Subclasses</h2>
|
104
|
-
<p class="children"><span class='object_link'><a href="Chrome.html" title="Puppeteer::Launcher::Chrome (class)">Chrome</a></span></p>
|
105
|
-
</div>
|
106
|
-
<h2>Defined Under Namespace</h2>
|
107
|
-
<p class="children">
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="Base/ExecutablePathNotFound.html" title="Puppeteer::Launcher::Base::ExecutablePathNotFound (class)">ExecutablePathNotFound</a></span>
|
113
|
-
|
114
|
-
|
115
|
-
</p>
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
<h2>
|
125
|
-
Instance Method Summary
|
126
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
127
|
-
</h2>
|
128
|
-
|
129
|
-
<ul class="summary">
|
130
|
-
|
131
|
-
<li class="public ">
|
132
|
-
<span class="summary_signature">
|
133
|
-
|
134
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(project_root:, preferred_revision:, is_puppeteer_core:) ⇒ Base </a>
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
</span>
|
139
|
-
|
140
|
-
|
141
|
-
<span class="note title constructor">constructor</span>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<span class="summary_desc"><div class='inline'>
|
151
|
-
<p>A new instance of Base.</p>
|
152
|
-
</div></span>
|
153
|
-
|
154
|
-
</li>
|
155
|
-
|
156
|
-
|
157
|
-
<li class="public ">
|
158
|
-
<span class="summary_signature">
|
159
|
-
|
160
|
-
<a href="#resolve_executable_path-instance_method" title="#resolve_executable_path (instance method)">#<strong>resolve_executable_path</strong> ⇒ Object </a>
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
</span>
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
175
|
-
|
176
|
-
</li>
|
177
|
-
|
178
|
-
|
179
|
-
</ul>
|
180
|
-
|
181
|
-
|
182
|
-
<div id="constructor_details" class="method_details_list">
|
183
|
-
<h2>Constructor Details</h2>
|
184
|
-
|
185
|
-
<div class="method_details first">
|
186
|
-
<h3 class="signature first" id="initialize-instance_method">
|
187
|
-
|
188
|
-
#<strong>initialize</strong>(project_root:, preferred_revision:, is_puppeteer_core:) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::Launcher::Base (class)">Base</a></span></tt>
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
</h3><div class="docstring">
|
195
|
-
<div class="discussion">
|
196
|
-
|
197
|
-
<p>Returns a new instance of Base.</p>
|
198
|
-
|
199
|
-
|
200
|
-
</div>
|
201
|
-
</div>
|
202
|
-
<div class="tags">
|
203
|
-
<p class="tag_title">Parameters:</p>
|
204
|
-
<ul class="param">
|
205
|
-
|
206
|
-
<li>
|
207
|
-
|
208
|
-
<span class='name'>projectRoot</span>
|
209
|
-
|
210
|
-
|
211
|
-
<span class='type'>(<tt>string</tt>)</span>
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
</li>
|
216
|
-
|
217
|
-
<li>
|
218
|
-
|
219
|
-
<span class='name'>preferredRevision</span>
|
220
|
-
|
221
|
-
|
222
|
-
<span class='type'>(<tt>string</tt>)</span>
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
</li>
|
227
|
-
|
228
|
-
</ul>
|
229
|
-
|
230
|
-
|
231
|
-
</div><table class="source_code">
|
232
|
-
<tr>
|
233
|
-
<td>
|
234
|
-
<pre class="lines">
|
235
|
-
|
236
|
-
|
237
|
-
5
|
238
|
-
6
|
239
|
-
7
|
240
|
-
8
|
241
|
-
9</pre>
|
242
|
-
</td>
|
243
|
-
<td>
|
244
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/launcher/base.rb', line 5</span>
|
245
|
-
|
246
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>project_root:</span><span class='comma'>,</span> <span class='label'>preferred_revision:</span><span class='comma'>,</span> <span class='label'>is_puppeteer_core:</span><span class='rparen'>)</span>
|
247
|
-
<span class='ivar'>@project_root</span> <span class='op'>=</span> <span class='id identifier rubyid_project_root'>project_root</span>
|
248
|
-
<span class='ivar'>@preferred_revision</span> <span class='op'>=</span> <span class='id identifier rubyid_preferred_revision'>preferred_revision</span>
|
249
|
-
<span class='ivar'>@is_puppeteer_core</span> <span class='op'>=</span> <span class='id identifier rubyid_is_puppeteer_core'>is_puppeteer_core</span>
|
250
|
-
<span class='kw'>end</span></pre>
|
251
|
-
</td>
|
252
|
-
</tr>
|
253
|
-
</table>
|
254
|
-
</div>
|
255
|
-
|
256
|
-
</div>
|
257
|
-
|
258
|
-
|
259
|
-
<div id="instance_method_details" class="method_details_list">
|
260
|
-
<h2>Instance Method Details</h2>
|
261
|
-
|
262
|
-
|
263
|
-
<div class="method_details first">
|
264
|
-
<h3 class="signature first" id="resolve_executable_path-instance_method">
|
265
|
-
|
266
|
-
#<strong>resolve_executable_path</strong> ⇒ <tt>Object</tt>
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
|
271
|
-
|
272
|
-
</h3><div class="docstring">
|
273
|
-
<div class="discussion">
|
274
|
-
|
275
|
-
|
276
|
-
</div>
|
277
|
-
</div>
|
278
|
-
<div class="tags">
|
279
|
-
|
280
|
-
<p class="tag_title">Raises:</p>
|
281
|
-
<ul class="raise">
|
282
|
-
|
283
|
-
<li>
|
284
|
-
|
285
|
-
|
286
|
-
<span class='type'>(<tt><span class='object_link'><a href="Base/ExecutablePathNotFound.html" title="Puppeteer::Launcher::Base::ExecutablePathNotFound (class)">ExecutablePathNotFound</a></span></tt>)</span>
|
287
|
-
|
288
|
-
|
289
|
-
|
290
|
-
</li>
|
291
|
-
|
292
|
-
</ul>
|
293
|
-
|
294
|
-
</div><table class="source_code">
|
295
|
-
<tr>
|
296
|
-
<td>
|
297
|
-
<pre class="lines">
|
298
|
-
|
299
|
-
|
300
|
-
15
|
301
|
-
16
|
302
|
-
17
|
303
|
-
18
|
304
|
-
19
|
305
|
-
20
|
306
|
-
21
|
307
|
-
22
|
308
|
-
23
|
309
|
-
24
|
310
|
-
25
|
311
|
-
26
|
312
|
-
27
|
313
|
-
28
|
314
|
-
29
|
315
|
-
30
|
316
|
-
31
|
317
|
-
32
|
318
|
-
33
|
319
|
-
34
|
320
|
-
35
|
321
|
-
36
|
322
|
-
37
|
323
|
-
38
|
324
|
-
39
|
325
|
-
40
|
326
|
-
41
|
327
|
-
42
|
328
|
-
43
|
329
|
-
44
|
330
|
-
45
|
331
|
-
46</pre>
|
332
|
-
</td>
|
333
|
-
<td>
|
334
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/launcher/base.rb', line 15</span>
|
335
|
-
|
336
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_resolve_executable_path'>resolve_executable_path</span>
|
337
|
-
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@is_puppeteer_core</span>
|
338
|
-
<span class='comment'># puppeteer-core doesn't take into account PUPPETEER_* env variables.
|
339
|
-
</span> <span class='id identifier rubyid_executable_path'>executable_path</span> <span class='op'>=</span> <span class='const'>ENV</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>PUPPETEER_EXECUTABLE_PATH</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
340
|
-
<span class='kw'>if</span> <span class='const'>FileTest</span><span class='period'>.</span><span class='id identifier rubyid_exist?'>exist?</span><span class='lparen'>(</span><span class='id identifier rubyid_executable_path'>executable_path</span><span class='rparen'>)</span>
|
341
|
-
<span class='kw'>return</span> <span class='id identifier rubyid_executable_path'>executable_path</span>
|
342
|
-
<span class='kw'>end</span>
|
343
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="Base/ExecutablePathNotFound.html" title="Puppeteer::Launcher::Base::ExecutablePathNotFound (class)">ExecutablePathNotFound</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::Launcher::Base#initialize (method)">new</a></span></span><span class='lparen'>(</span>
|
344
|
-
<span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Tried to use PUPPETEER_EXECUTABLE_PATH env variable to launch browser but did not find any executable at: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_executablePath'>executablePath</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span>
|
345
|
-
<span class='rparen'>)</span>
|
346
|
-
<span class='kw'>end</span>
|
347
|
-
|
348
|
-
<span class='comment'># temporal logic.
|
349
|
-
</span> <span class='kw'>if</span> <span class='const'>RUBY_PLATFORM</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>darwin</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span> <span class='comment'># MacOS
|
350
|
-
</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/Applications/Google Chrome.app/Contents/MacOS/Google Chrome</span><span class='tstring_end'>'</span></span>
|
351
|
-
<span class='kw'>else</span>
|
352
|
-
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>/usr/bin/google-chrome</span><span class='tstring_end'>'</span></span>
|
353
|
-
<span class='kw'>end</span>
|
354
|
-
|
355
|
-
<span class='comment'># const browserFetcher = new BrowserFetcher(launcher._projectRoot);
|
356
|
-
</span> <span class='comment'># if (!launcher._isPuppeteerCore) {
|
357
|
-
</span> <span class='comment'># const revision = process.env['PUPPETEER_CHROMIUM_REVISION'];
|
358
|
-
</span> <span class='comment'># if (revision) {
|
359
|
-
</span> <span class='comment'># const revisionInfo = browserFetcher.revisionInfo(revision);
|
360
|
-
</span> <span class='comment'># const missingText = !revisionInfo.local ? 'Tried to use PUPPETEER_CHROMIUM_REVISION env variable to launch browser but did not find executable at: ' + revisionInfo.executablePath : null;
|
361
|
-
</span> <span class='comment'># return {executablePath: revisionInfo.executablePath, missingText};
|
362
|
-
</span> <span class='comment'># }
|
363
|
-
</span> <span class='comment'># }
|
364
|
-
</span> <span class='comment'># const revisionInfo = browserFetcher.revisionInfo(launcher._preferredRevision);
|
365
|
-
</span> <span class='comment'># const missingText = !revisionInfo.local ? `Browser is not downloaded. Run "npm install" or "yarn install"` : null;
|
366
|
-
</span> <span class='comment'># return {executablePath: revisionInfo.executablePath, missingText};
|
367
|
-
</span><span class='kw'>end</span></pre>
|
368
|
-
</td>
|
369
|
-
</tr>
|
370
|
-
</table>
|
371
|
-
</div>
|
372
|
-
|
373
|
-
</div>
|
374
|
-
|
375
|
-
</div>
|
376
|
-
|
377
|
-
<div id="footer">
|
378
|
-
Generated on Tue Jun 23 10:25:00 2020 by
|
379
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
380
|
-
0.9.24 (ruby-2.6.3).
|
381
|
-
</div>
|
382
|
-
|
383
|
-
</div>
|
384
|
-
</body>
|
385
|
-
</html>
|