puppeteer-ruby 0.0.3 → 0.0.8
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 +30 -0
- data/.github/stale.yml +16 -0
- data/.rubocop.yml +4 -5
- data/README.md +4 -1
- data/docs/Puppeteer.html +2020 -0
- data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
- data/docs/Puppeteer/Browser.html +2150 -0
- data/docs/Puppeteer/BrowserContext.html +809 -0
- data/docs/Puppeteer/BrowserFetcher.html +214 -0
- data/docs/Puppeteer/BrowserRunner.html +914 -0
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
- data/docs/Puppeteer/CDPSession.html +813 -0
- data/docs/Puppeteer/CDPSession/Error.html +124 -0
- data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
- data/docs/Puppeteer/Connection.html +960 -0
- data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
- data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
- data/docs/Puppeteer/ConsoleMessage.html +565 -0
- data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
- data/docs/Puppeteer/DOMWorld.html +2219 -0
- data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
- data/docs/Puppeteer/DebugPrint.html +233 -0
- data/docs/Puppeteer/Device.html +470 -0
- data/docs/Puppeteer/Devices.html +139 -0
- data/docs/Puppeteer/ElementHandle.html +2224 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
- data/docs/Puppeteer/ElementHandle/Point.html +481 -0
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
- data/docs/Puppeteer/EmulationManager.html +454 -0
- data/docs/Puppeteer/EventCallbackable.html +433 -0
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
- data/docs/Puppeteer/ExecutionContext.html +998 -0
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
- data/docs/Puppeteer/FileChooser.html +455 -0
- data/docs/Puppeteer/Frame.html +3677 -0
- data/docs/Puppeteer/FrameManager.html +2414 -0
- data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
- data/docs/Puppeteer/IfPresent.html +222 -0
- data/docs/Puppeteer/JSHandle.html +1352 -0
- data/docs/Puppeteer/Keyboard.html +1557 -0
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
- data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
- data/docs/Puppeteer/Launcher.html +237 -0
- data/docs/Puppeteer/Launcher/Base.html +385 -0
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
- data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
- data/docs/Puppeteer/Launcher/Chrome.html +669 -0
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
- data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
- data/docs/Puppeteer/LifecycleWatcher.html +834 -0
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
- data/docs/Puppeteer/Mouse.html +1105 -0
- data/docs/Puppeteer/Mouse/Button.html +136 -0
- data/docs/Puppeteer/NetworkManager.html +901 -0
- data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
- data/docs/Puppeteer/Page.html +5970 -0
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
- data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
- data/docs/Puppeteer/Page/ScriptTag.html +555 -0
- data/docs/Puppeteer/Page/StyleTag.html +448 -0
- data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
- data/docs/Puppeteer/RemoteObject.html +1016 -0
- data/docs/Puppeteer/Target.html +1384 -0
- data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
- data/docs/Puppeteer/Target/TargetInfo.html +729 -0
- data/docs/Puppeteer/TimeoutError.html +135 -0
- data/docs/Puppeteer/TimeoutSettings.html +496 -0
- data/docs/Puppeteer/TouchScreen.html +464 -0
- data/docs/Puppeteer/Viewport.html +757 -0
- data/docs/Puppeteer/WaitTask.html +637 -0
- data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
- data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
- data/docs/Puppeteer/WebSocket.html +673 -0
- data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
- data/docs/Puppeteer/WebSocketTransport.html +600 -0
- data/docs/Puppeteer/WebSocktTransportError.html +124 -0
- data/docs/_index.html +809 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +123 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +123 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +3979 -0
- data/docs/top-level-namespace.html +126 -0
- data/lib/puppeteer.rb +16 -8
- data/lib/puppeteer/async_await_behavior.rb +6 -0
- data/lib/puppeteer/browser.rb +21 -1
- data/lib/puppeteer/browser_runner.rb +1 -1
- data/lib/puppeteer/cdp_session.rb +33 -11
- data/lib/puppeteer/connection.rb +1 -1
- data/lib/puppeteer/dom_world.rb +142 -121
- data/lib/puppeteer/element_handle.rb +223 -181
- data/lib/puppeteer/execution_context.rb +41 -17
- data/lib/puppeteer/file_chooser.rb +29 -0
- data/lib/puppeteer/frame.rb +23 -15
- data/lib/puppeteer/frame_manager.rb +7 -9
- data/lib/puppeteer/js_handle.rb +3 -3
- data/lib/puppeteer/keyboard.rb +1 -1
- data/lib/puppeteer/keyboard/us_keyboard_layout.rb +4 -4
- data/lib/puppeteer/launcher.rb +0 -1
- data/lib/puppeteer/launcher/chrome.rb +48 -2
- data/lib/puppeteer/lifecycle_watcher.rb +9 -4
- data/lib/puppeteer/mouse.rb +10 -7
- data/lib/puppeteer/page.rb +134 -70
- data/lib/puppeteer/remote_object.rb +11 -1
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/wait_task.rb +183 -1
- data/puppeteer-ruby.gemspec +4 -1
- metadata +143 -4
@@ -0,0 +1,1384 @@
|
|
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::Target
|
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::Target";
|
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 (T)</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">Target</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::Target
|
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::Target</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/target.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/Target.js">github.com/puppeteer/puppeteer/blob/master/lib/Target.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="Target/InitializeFailure.html" title="Puppeteer::Target::InitializeFailure (class)">InitializeFailure</a></span>, <span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</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="#initialized_promise-instance_method" title="#initialized_promise (instance method)">#<strong>initialized_promise</strong> ⇒ 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 initialized_promise.</p>
|
154
|
+
</div></span>
|
155
|
+
|
156
|
+
</li>
|
157
|
+
|
158
|
+
|
159
|
+
<li class="public ">
|
160
|
+
<span class="summary_signature">
|
161
|
+
|
162
|
+
<a href="#target_id-instance_method" title="#target_id (instance method)">#<strong>target_id</strong> ⇒ 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 target_id.</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="#browser-instance_method" title="#browser (instance method)">#<strong>browser</strong> ⇒ !Puppeteer.Browser </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="#browser_context-instance_method" title="#browser_context (instance method)">#<strong>browser_context</strong> ⇒ !Puppeteer.BrowserContext </a>
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
</span>
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
|
240
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
241
|
+
|
242
|
+
</li>
|
243
|
+
|
244
|
+
|
245
|
+
<li class="public ">
|
246
|
+
<span class="summary_signature">
|
247
|
+
|
248
|
+
<a href="#create_cdp_session-instance_method" title="#create_cdp_session (instance method)">#<strong>create_cdp_session</strong> ⇒ Object </a>
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
</span>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
|
262
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
263
|
+
|
264
|
+
</li>
|
265
|
+
|
266
|
+
|
267
|
+
<li class="public ">
|
268
|
+
<span class="summary_signature">
|
269
|
+
|
270
|
+
<a href="#handle_closed-instance_method" title="#handle_closed (instance method)">#<strong>handle_closed</strong> ⇒ Object </a>
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
</span>
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
285
|
+
|
286
|
+
</li>
|
287
|
+
|
288
|
+
|
289
|
+
<li class="public ">
|
290
|
+
<span class="summary_signature">
|
291
|
+
|
292
|
+
<a href="#handle_initialized-instance_method" title="#handle_initialized (instance method)">#<strong>handle_initialized</strong>(success) ⇒ Object </a>
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
</span>
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
307
|
+
|
308
|
+
</li>
|
309
|
+
|
310
|
+
|
311
|
+
<li class="public ">
|
312
|
+
<span class="summary_signature">
|
313
|
+
|
314
|
+
<a href="#handle_target_info_changed-instance_method" title="#handle_target_info_changed (instance method)">#<strong>handle_target_info_changed</strong>(target_info) ⇒ Object </a>
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
</span>
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
329
|
+
|
330
|
+
</li>
|
331
|
+
|
332
|
+
|
333
|
+
<li class="public ">
|
334
|
+
<span class="summary_signature">
|
335
|
+
|
336
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(target_info:, browser_context:, session_factory:, ignore_https_errors:, default_viewport:, screenshot_task_queue:) ⇒ Target </a>
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
</span>
|
341
|
+
|
342
|
+
|
343
|
+
<span class="note title constructor">constructor</span>
|
344
|
+
|
345
|
+
|
346
|
+
|
347
|
+
|
348
|
+
|
349
|
+
|
350
|
+
|
351
|
+
|
352
|
+
<span class="summary_desc"><div class='inline'>
|
353
|
+
<p>A new instance of Target.</p>
|
354
|
+
</div></span>
|
355
|
+
|
356
|
+
</li>
|
357
|
+
|
358
|
+
|
359
|
+
<li class="public ">
|
360
|
+
<span class="summary_signature">
|
361
|
+
|
362
|
+
<a href="#initialized%3F-instance_method" title="#initialized? (instance method)">#<strong>initialized?</strong> ⇒ Boolean </a>
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
</span>
|
367
|
+
|
368
|
+
|
369
|
+
|
370
|
+
|
371
|
+
|
372
|
+
|
373
|
+
|
374
|
+
|
375
|
+
|
376
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
377
|
+
|
378
|
+
</li>
|
379
|
+
|
380
|
+
|
381
|
+
<li class="public ">
|
382
|
+
<span class="summary_signature">
|
383
|
+
|
384
|
+
<a href="#on_close-instance_method" title="#on_close (instance method)">#<strong>on_close</strong>(&block) ⇒ Object </a>
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
</span>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
|
393
|
+
|
394
|
+
|
395
|
+
|
396
|
+
|
397
|
+
|
398
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
399
|
+
|
400
|
+
</li>
|
401
|
+
|
402
|
+
|
403
|
+
<li class="public ">
|
404
|
+
<span class="summary_signature">
|
405
|
+
|
406
|
+
<a href="#on_initialize_succeeded-instance_method" title="#on_initialize_succeeded (instance method)">#<strong>on_initialize_succeeded</strong>(&block) ⇒ Object </a>
|
407
|
+
|
408
|
+
|
409
|
+
|
410
|
+
</span>
|
411
|
+
|
412
|
+
|
413
|
+
|
414
|
+
|
415
|
+
|
416
|
+
|
417
|
+
|
418
|
+
|
419
|
+
|
420
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
421
|
+
|
422
|
+
</li>
|
423
|
+
|
424
|
+
|
425
|
+
<li class="public ">
|
426
|
+
<span class="summary_signature">
|
427
|
+
|
428
|
+
<a href="#opener-instance_method" title="#opener (instance method)">#<strong>opener</strong> ⇒ ?Puppeteer.Target </a>
|
429
|
+
|
430
|
+
|
431
|
+
|
432
|
+
</span>
|
433
|
+
|
434
|
+
|
435
|
+
|
436
|
+
|
437
|
+
|
438
|
+
|
439
|
+
|
440
|
+
|
441
|
+
|
442
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
443
|
+
|
444
|
+
</li>
|
445
|
+
|
446
|
+
|
447
|
+
<li class="public ">
|
448
|
+
<span class="summary_signature">
|
449
|
+
|
450
|
+
<a href="#page-instance_method" title="#page (instance method)">#<strong>page</strong> ⇒ Object </a>
|
451
|
+
|
452
|
+
|
453
|
+
|
454
|
+
</span>
|
455
|
+
|
456
|
+
|
457
|
+
|
458
|
+
|
459
|
+
|
460
|
+
|
461
|
+
|
462
|
+
|
463
|
+
|
464
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
465
|
+
|
466
|
+
</li>
|
467
|
+
|
468
|
+
|
469
|
+
<li class="public ">
|
470
|
+
<span class="summary_signature">
|
471
|
+
|
472
|
+
<a href="#type-instance_method" title="#type (instance method)">#<strong>type</strong> ⇒ "page"|"background_page"|"service_worker"|"shared_worker"|"other"|"browser" </a>
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
</span>
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
|
486
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
487
|
+
|
488
|
+
</li>
|
489
|
+
|
490
|
+
|
491
|
+
<li class="public ">
|
492
|
+
<span class="summary_signature">
|
493
|
+
|
494
|
+
<a href="#url-instance_method" title="#url (instance method)">#<strong>url</strong> ⇒ string </a>
|
495
|
+
|
496
|
+
|
497
|
+
|
498
|
+
</span>
|
499
|
+
|
500
|
+
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
|
505
|
+
|
506
|
+
|
507
|
+
|
508
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
509
|
+
|
510
|
+
</li>
|
511
|
+
|
512
|
+
|
513
|
+
</ul>
|
514
|
+
|
515
|
+
|
516
|
+
<div id="constructor_details" class="method_details_list">
|
517
|
+
<h2>Constructor Details</h2>
|
518
|
+
|
519
|
+
<div class="method_details first">
|
520
|
+
<h3 class="signature first" id="initialize-instance_method">
|
521
|
+
|
522
|
+
#<strong>initialize</strong>(target_info:, browser_context:, session_factory:, ignore_https_errors:, default_viewport:, screenshot_task_queue:) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>
|
523
|
+
|
524
|
+
|
525
|
+
|
526
|
+
|
527
|
+
|
528
|
+
</h3><div class="docstring">
|
529
|
+
<div class="discussion">
|
530
|
+
|
531
|
+
<p>Returns a new instance of Target.</p>
|
532
|
+
|
533
|
+
|
534
|
+
</div>
|
535
|
+
</div>
|
536
|
+
<div class="tags">
|
537
|
+
<p class="tag_title">Parameters:</p>
|
538
|
+
<ul class="param">
|
539
|
+
|
540
|
+
<li>
|
541
|
+
|
542
|
+
<span class='name'>targetInfo</span>
|
543
|
+
|
544
|
+
|
545
|
+
<span class='type'>(<tt>!Protocol.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span>.<span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></tt>)</span>
|
546
|
+
|
547
|
+
|
548
|
+
|
549
|
+
</li>
|
550
|
+
|
551
|
+
<li>
|
552
|
+
|
553
|
+
<span class='name'>browserContext</span>
|
554
|
+
|
555
|
+
|
556
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>)</span>
|
557
|
+
|
558
|
+
|
559
|
+
|
560
|
+
</li>
|
561
|
+
|
562
|
+
<li>
|
563
|
+
|
564
|
+
<span class='name'>sessionFactory</span>
|
565
|
+
|
566
|
+
|
567
|
+
<span class='type'>(<tt>!function():!Promise<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span>></tt>)</span>
|
568
|
+
|
569
|
+
|
570
|
+
|
571
|
+
</li>
|
572
|
+
|
573
|
+
<li>
|
574
|
+
|
575
|
+
<span class='name'>ignoreHTTPSErrors</span>
|
576
|
+
|
577
|
+
|
578
|
+
<span class='type'>(<tt>boolean</tt>)</span>
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
</li>
|
583
|
+
|
584
|
+
<li>
|
585
|
+
|
586
|
+
<span class='name'>defaultViewport</span>
|
587
|
+
|
588
|
+
|
589
|
+
<span class='type'>(<tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Viewport.html" title="Puppeteer::Viewport (class)">Viewport</a></span></tt>)</span>
|
590
|
+
|
591
|
+
|
592
|
+
|
593
|
+
</li>
|
594
|
+
|
595
|
+
<li>
|
596
|
+
|
597
|
+
<span class='name'>screenshotTaskQueue</span>
|
598
|
+
|
599
|
+
|
600
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.TaskQueue</tt>)</span>
|
601
|
+
|
602
|
+
|
603
|
+
|
604
|
+
</li>
|
605
|
+
|
606
|
+
</ul>
|
607
|
+
|
608
|
+
|
609
|
+
</div><table class="source_code">
|
610
|
+
<tr>
|
611
|
+
<td>
|
612
|
+
<pre class="lines">
|
613
|
+
|
614
|
+
|
615
|
+
22
|
616
|
+
23
|
617
|
+
24
|
618
|
+
25
|
619
|
+
26
|
620
|
+
27
|
621
|
+
28
|
622
|
+
29
|
623
|
+
30
|
624
|
+
31
|
625
|
+
32
|
626
|
+
33
|
627
|
+
34
|
628
|
+
35
|
629
|
+
36
|
630
|
+
37
|
631
|
+
38
|
632
|
+
39
|
633
|
+
40
|
634
|
+
41
|
635
|
+
42
|
636
|
+
43
|
637
|
+
44</pre>
|
638
|
+
</td>
|
639
|
+
<td>
|
640
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 22</span>
|
641
|
+
|
642
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>target_info:</span><span class='comma'>,</span> <span class='label'>browser_context:</span><span class='comma'>,</span> <span class='label'>session_factory:</span><span class='comma'>,</span> <span class='label'>ignore_https_errors:</span><span class='comma'>,</span> <span class='label'>default_viewport:</span><span class='comma'>,</span> <span class='label'>screenshot_task_queue:</span><span class='rparen'>)</span>
|
643
|
+
<span class='ivar'>@target_info</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span>
|
644
|
+
<span class='ivar'>@browser_context</span> <span class='op'>=</span> <span class='id identifier rubyid_browser_context'>browser_context</span>
|
645
|
+
<span class='ivar'>@target_id</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span><span class='period'>.</span><span class='id identifier rubyid_target_id'>target_id</span>
|
646
|
+
<span class='ivar'>@session_factory</span> <span class='op'>=</span> <span class='id identifier rubyid_session_factory'>session_factory</span>
|
647
|
+
<span class='ivar'>@ignore_https_errors</span> <span class='op'>=</span> <span class='id identifier rubyid_ignore_https_errors'>ignore_https_errors</span>
|
648
|
+
<span class='ivar'>@default_viewport</span> <span class='op'>=</span> <span class='id identifier rubyid_default_viewport'>default_viewport</span>
|
649
|
+
<span class='ivar'>@screenshot_task_queue</span> <span class='op'>=</span> <span class='id identifier rubyid_screenshot_task_queue'>screenshot_task_queue</span>
|
650
|
+
|
651
|
+
|
652
|
+
<span class='comment'># /** @type {?Promise<!Puppeteer.Page>} */
|
653
|
+
</span> <span class='comment'># this._pagePromise = null;
|
654
|
+
</span> <span class='comment'># /** @type {?Promise<!Worker>} */
|
655
|
+
</span> <span class='comment'># this._workerPromise = null;
|
656
|
+
</span> <span class='ivar'>@initialized_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>
|
657
|
+
<span class='comment'># this._isClosedPromise = new Promise(fulfill => this._closedCallback = fulfill);
|
658
|
+
</span>
|
659
|
+
<span class='ivar'>@is_initialized</span> <span class='op'>=</span> <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='op'>!</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
|
660
|
+
|
661
|
+
<span class='kw'>if</span> <span class='ivar'>@is_initialized</span>
|
662
|
+
<span class='id identifier rubyid_handle_initialized'>handle_initialized</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
663
|
+
<span class='kw'>end</span>
|
664
|
+
<span class='kw'>end</span></pre>
|
665
|
+
</td>
|
666
|
+
</tr>
|
667
|
+
</table>
|
668
|
+
</div>
|
669
|
+
|
670
|
+
</div>
|
671
|
+
|
672
|
+
<div id="instance_attr_details" class="attr_details">
|
673
|
+
<h2>Instance Attribute Details</h2>
|
674
|
+
|
675
|
+
|
676
|
+
<span id=""></span>
|
677
|
+
<div class="method_details first">
|
678
|
+
<h3 class="signature first" id="initialized_promise-instance_method">
|
679
|
+
|
680
|
+
#<strong>initialized_promise</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
681
|
+
|
682
|
+
|
683
|
+
|
684
|
+
|
685
|
+
|
686
|
+
</h3><div class="docstring">
|
687
|
+
<div class="discussion">
|
688
|
+
|
689
|
+
<p>Returns the value of attribute initialized_promise.</p>
|
690
|
+
|
691
|
+
|
692
|
+
</div>
|
693
|
+
</div>
|
694
|
+
<div class="tags">
|
695
|
+
|
696
|
+
|
697
|
+
</div><table class="source_code">
|
698
|
+
<tr>
|
699
|
+
<td>
|
700
|
+
<pre class="lines">
|
701
|
+
|
702
|
+
|
703
|
+
46
|
704
|
+
47
|
705
|
+
48</pre>
|
706
|
+
</td>
|
707
|
+
<td>
|
708
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 46</span>
|
709
|
+
|
710
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialized_promise'>initialized_promise</span>
|
711
|
+
<span class='ivar'>@initialized_promise</span>
|
712
|
+
<span class='kw'>end</span></pre>
|
713
|
+
</td>
|
714
|
+
</tr>
|
715
|
+
</table>
|
716
|
+
</div>
|
717
|
+
|
718
|
+
|
719
|
+
<span id=""></span>
|
720
|
+
<div class="method_details ">
|
721
|
+
<h3 class="signature " id="target_id-instance_method">
|
722
|
+
|
723
|
+
#<strong>target_id</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
724
|
+
|
725
|
+
|
726
|
+
|
727
|
+
|
728
|
+
|
729
|
+
</h3><div class="docstring">
|
730
|
+
<div class="discussion">
|
731
|
+
|
732
|
+
<p>Returns the value of attribute target_id.</p>
|
733
|
+
|
734
|
+
|
735
|
+
</div>
|
736
|
+
</div>
|
737
|
+
<div class="tags">
|
738
|
+
|
739
|
+
|
740
|
+
</div><table class="source_code">
|
741
|
+
<tr>
|
742
|
+
<td>
|
743
|
+
<pre class="lines">
|
744
|
+
|
745
|
+
|
746
|
+
46
|
747
|
+
47
|
748
|
+
48</pre>
|
749
|
+
</td>
|
750
|
+
<td>
|
751
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 46</span>
|
752
|
+
|
753
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_target_id'>target_id</span>
|
754
|
+
<span class='ivar'>@target_id</span>
|
755
|
+
<span class='kw'>end</span></pre>
|
756
|
+
</td>
|
757
|
+
</tr>
|
758
|
+
</table>
|
759
|
+
</div>
|
760
|
+
|
761
|
+
</div>
|
762
|
+
|
763
|
+
|
764
|
+
<div id="instance_method_details" class="method_details_list">
|
765
|
+
<h2>Instance Method Details</h2>
|
766
|
+
|
767
|
+
|
768
|
+
<div class="method_details first">
|
769
|
+
<h3 class="signature first" id="browser-instance_method">
|
770
|
+
|
771
|
+
#<strong>browser</strong> ⇒ <tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>
|
772
|
+
|
773
|
+
|
774
|
+
|
775
|
+
|
776
|
+
|
777
|
+
</h3><div class="docstring">
|
778
|
+
<div class="discussion">
|
779
|
+
|
780
|
+
|
781
|
+
</div>
|
782
|
+
</div>
|
783
|
+
<div class="tags">
|
784
|
+
|
785
|
+
<p class="tag_title">Returns:</p>
|
786
|
+
<ul class="return">
|
787
|
+
|
788
|
+
<li>
|
789
|
+
|
790
|
+
|
791
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Browser.html" title="Puppeteer::Browser (class)">Browser</a></span></tt>)</span>
|
792
|
+
|
793
|
+
|
794
|
+
|
795
|
+
</li>
|
796
|
+
|
797
|
+
</ul>
|
798
|
+
|
799
|
+
</div><table class="source_code">
|
800
|
+
<tr>
|
801
|
+
<td>
|
802
|
+
<pre class="lines">
|
803
|
+
|
804
|
+
|
805
|
+
125
|
806
|
+
126
|
807
|
+
127</pre>
|
808
|
+
</td>
|
809
|
+
<td>
|
810
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 125</span>
|
811
|
+
|
812
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_browser'>browser</span>
|
813
|
+
<span class='ivar'>@browser_context</span><span class='period'>.</span><span class='id identifier rubyid_browser'>browser</span>
|
814
|
+
<span class='kw'>end</span></pre>
|
815
|
+
</td>
|
816
|
+
</tr>
|
817
|
+
</table>
|
818
|
+
</div>
|
819
|
+
|
820
|
+
<div class="method_details ">
|
821
|
+
<h3 class="signature " id="browser_context-instance_method">
|
822
|
+
|
823
|
+
#<strong>browser_context</strong> ⇒ <tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>
|
824
|
+
|
825
|
+
|
826
|
+
|
827
|
+
|
828
|
+
|
829
|
+
</h3><div class="docstring">
|
830
|
+
<div class="discussion">
|
831
|
+
|
832
|
+
|
833
|
+
</div>
|
834
|
+
</div>
|
835
|
+
<div class="tags">
|
836
|
+
|
837
|
+
<p class="tag_title">Returns:</p>
|
838
|
+
<ul class="return">
|
839
|
+
|
840
|
+
<li>
|
841
|
+
|
842
|
+
|
843
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></tt>)</span>
|
844
|
+
|
845
|
+
|
846
|
+
|
847
|
+
</li>
|
848
|
+
|
849
|
+
</ul>
|
850
|
+
|
851
|
+
</div><table class="source_code">
|
852
|
+
<tr>
|
853
|
+
<td>
|
854
|
+
<pre class="lines">
|
855
|
+
|
856
|
+
|
857
|
+
130
|
858
|
+
131
|
859
|
+
132</pre>
|
860
|
+
</td>
|
861
|
+
<td>
|
862
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 130</span>
|
863
|
+
|
864
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_browser_context'>browser_context</span>
|
865
|
+
<span class='ivar'>@browser_context</span>
|
866
|
+
<span class='kw'>end</span></pre>
|
867
|
+
</td>
|
868
|
+
</tr>
|
869
|
+
</table>
|
870
|
+
</div>
|
871
|
+
|
872
|
+
<div class="method_details ">
|
873
|
+
<h3 class="signature " id="create_cdp_session-instance_method">
|
874
|
+
|
875
|
+
#<strong>create_cdp_session</strong> ⇒ <tt>Object</tt>
|
876
|
+
|
877
|
+
|
878
|
+
|
879
|
+
|
880
|
+
|
881
|
+
</h3><table class="source_code">
|
882
|
+
<tr>
|
883
|
+
<td>
|
884
|
+
<pre class="lines">
|
885
|
+
|
886
|
+
|
887
|
+
83
|
888
|
+
84
|
889
|
+
85</pre>
|
890
|
+
</td>
|
891
|
+
<td>
|
892
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 83</span>
|
893
|
+
|
894
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_cdp_session'>create_cdp_session</span>
|
895
|
+
<span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
896
|
+
<span class='kw'>end</span></pre>
|
897
|
+
</td>
|
898
|
+
</tr>
|
899
|
+
</table>
|
900
|
+
</div>
|
901
|
+
|
902
|
+
<div class="method_details ">
|
903
|
+
<h3 class="signature " id="handle_closed-instance_method">
|
904
|
+
|
905
|
+
#<strong>handle_closed</strong> ⇒ <tt>Object</tt>
|
906
|
+
|
907
|
+
|
908
|
+
|
909
|
+
|
910
|
+
|
911
|
+
</h3><table class="source_code">
|
912
|
+
<tr>
|
913
|
+
<td>
|
914
|
+
<pre class="lines">
|
915
|
+
|
916
|
+
|
917
|
+
70
|
918
|
+
71
|
919
|
+
72
|
920
|
+
73</pre>
|
921
|
+
</td>
|
922
|
+
<td>
|
923
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 70</span>
|
924
|
+
|
925
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_handle_closed'>handle_closed</span>
|
926
|
+
<span class='ivar'>@closed</span> <span class='op'>=</span> <span class='kw'>true</span>
|
927
|
+
<span class='ivar'>@on_close</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span>
|
928
|
+
<span class='kw'>end</span></pre>
|
929
|
+
</td>
|
930
|
+
</tr>
|
931
|
+
</table>
|
932
|
+
</div>
|
933
|
+
|
934
|
+
<div class="method_details ">
|
935
|
+
<h3 class="signature " id="handle_initialized-instance_method">
|
936
|
+
|
937
|
+
#<strong>handle_initialized</strong>(success) ⇒ <tt>Object</tt>
|
938
|
+
|
939
|
+
|
940
|
+
|
941
|
+
|
942
|
+
|
943
|
+
</h3><table class="source_code">
|
944
|
+
<tr>
|
945
|
+
<td>
|
946
|
+
<pre class="lines">
|
947
|
+
|
948
|
+
|
949
|
+
50
|
950
|
+
51
|
951
|
+
52
|
952
|
+
53
|
953
|
+
54
|
954
|
+
55
|
955
|
+
56
|
956
|
+
57
|
957
|
+
58
|
958
|
+
59
|
959
|
+
60
|
960
|
+
61
|
961
|
+
62
|
962
|
+
63
|
963
|
+
64</pre>
|
964
|
+
</td>
|
965
|
+
<td>
|
966
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 50</span>
|
967
|
+
|
968
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_handle_initialized'>handle_initialized</span><span class='lparen'>(</span><span class='id identifier rubyid_success'>success</span><span class='rparen'>)</span>
|
969
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_success'>success</span>
|
970
|
+
<span class='ivar'>@initialized_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="Target/InitializeFailure.html" title="Puppeteer::Target::InitializeFailure (class)">InitializeFailure</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::Target#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Failed to create target for page</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
971
|
+
<span class='kw'>end</span>
|
972
|
+
<span class='ivar'>@on_initialize_succeeded</span><span class='op'>&.</span><span class='id identifier rubyid_call'>call</span>
|
973
|
+
<span class='ivar'>@initialized_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
974
|
+
<span class='id identifier rubyid_opener_page'>opener_page</span> <span class='op'>=</span> <span class='id identifier rubyid_opener'>opener</span><span class='op'>&.</span><span class='id identifier rubyid_page'>page</span>
|
975
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_opener_page'>opener_page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span> <span class='op'>||</span> <span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span>
|
976
|
+
<span class='kw'>return</span>
|
977
|
+
<span class='kw'>end</span>
|
978
|
+
<span class='comment'># if (!openerPage.listenerCount(Events.Page.Popup))
|
979
|
+
</span> <span class='comment'># return true;
|
980
|
+
</span> <span class='id identifier rubyid_popup_page'>popup_page</span> <span class='op'>=</span> <span class='id identifier rubyid_page'>page</span>
|
981
|
+
<span class='id identifier rubyid_opener_page'>opener_page</span><span class='period'>.</span><span class='id identifier rubyid_emit_event'>emit_event</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Page.Popup</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='id identifier rubyid_popup_page'>popup_page</span><span class='rparen'>)</span>
|
982
|
+
<span class='kw'>end</span></pre>
|
983
|
+
</td>
|
984
|
+
</tr>
|
985
|
+
</table>
|
986
|
+
</div>
|
987
|
+
|
988
|
+
<div class="method_details ">
|
989
|
+
<h3 class="signature " id="handle_target_info_changed-instance_method">
|
990
|
+
|
991
|
+
#<strong>handle_target_info_changed</strong>(target_info) ⇒ <tt>Object</tt>
|
992
|
+
|
993
|
+
|
994
|
+
|
995
|
+
|
996
|
+
|
997
|
+
</h3><div class="docstring">
|
998
|
+
<div class="discussion">
|
999
|
+
|
1000
|
+
|
1001
|
+
</div>
|
1002
|
+
</div>
|
1003
|
+
<div class="tags">
|
1004
|
+
<p class="tag_title">Parameters:</p>
|
1005
|
+
<ul class="param">
|
1006
|
+
|
1007
|
+
<li>
|
1008
|
+
|
1009
|
+
<span class='name'>targetInfo</span>
|
1010
|
+
|
1011
|
+
|
1012
|
+
<span class='type'>(<tt>!Protocol.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span>.<span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></tt>)</span>
|
1013
|
+
|
1014
|
+
|
1015
|
+
|
1016
|
+
</li>
|
1017
|
+
|
1018
|
+
</ul>
|
1019
|
+
|
1020
|
+
|
1021
|
+
</div><table class="source_code">
|
1022
|
+
<tr>
|
1023
|
+
<td>
|
1024
|
+
<pre class="lines">
|
1025
|
+
|
1026
|
+
|
1027
|
+
142
|
1028
|
+
143
|
1029
|
+
144
|
1030
|
+
145
|
1031
|
+
146
|
1032
|
+
147
|
1033
|
+
148
|
1034
|
+
149</pre>
|
1035
|
+
</td>
|
1036
|
+
<td>
|
1037
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 142</span>
|
1038
|
+
|
1039
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_handle_target_info_changed'>handle_target_info_changed</span><span class='lparen'>(</span><span class='id identifier rubyid_target_info'>target_info</span><span class='rparen'>)</span>
|
1040
|
+
<span class='ivar'>@target_info</span> <span class='op'>=</span> <span class='id identifier rubyid_target_info'>target_info</span>
|
1041
|
+
|
1042
|
+
<span class='kw'>if</span> <span class='op'>!</span><span class='ivar'>@is_initialized</span> <span class='op'>&&</span> <span class='lparen'>(</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span> <span class='op'>||</span> <span class='op'>!</span><span class='id identifier rubyid_target_info'>target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span><span class='rparen'>)</span>
|
1043
|
+
<span class='ivar'>@is_initialized</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1044
|
+
<span class='id identifier rubyid_handle_initialized'>handle_initialized</span><span class='lparen'>(</span><span class='kw'>true</span><span class='rparen'>)</span>
|
1045
|
+
<span class='kw'>end</span>
|
1046
|
+
<span class='kw'>end</span></pre>
|
1047
|
+
</td>
|
1048
|
+
</tr>
|
1049
|
+
</table>
|
1050
|
+
</div>
|
1051
|
+
|
1052
|
+
<div class="method_details ">
|
1053
|
+
<h3 class="signature " id="initialized?-instance_method">
|
1054
|
+
|
1055
|
+
#<strong>initialized?</strong> ⇒ <tt>Boolean</tt>
|
1056
|
+
|
1057
|
+
|
1058
|
+
|
1059
|
+
|
1060
|
+
|
1061
|
+
</h3><div class="docstring">
|
1062
|
+
<div class="discussion">
|
1063
|
+
|
1064
|
+
|
1065
|
+
</div>
|
1066
|
+
</div>
|
1067
|
+
<div class="tags">
|
1068
|
+
|
1069
|
+
<p class="tag_title">Returns:</p>
|
1070
|
+
<ul class="return">
|
1071
|
+
|
1072
|
+
<li>
|
1073
|
+
|
1074
|
+
|
1075
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
1076
|
+
|
1077
|
+
|
1078
|
+
|
1079
|
+
</li>
|
1080
|
+
|
1081
|
+
</ul>
|
1082
|
+
|
1083
|
+
</div><table class="source_code">
|
1084
|
+
<tr>
|
1085
|
+
<td>
|
1086
|
+
<pre class="lines">
|
1087
|
+
|
1088
|
+
|
1089
|
+
79
|
1090
|
+
80
|
1091
|
+
81</pre>
|
1092
|
+
</td>
|
1093
|
+
<td>
|
1094
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 79</span>
|
1095
|
+
|
1096
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialized?'>initialized?</span>
|
1097
|
+
<span class='ivar'>@is_initialized</span>
|
1098
|
+
<span class='kw'>end</span></pre>
|
1099
|
+
</td>
|
1100
|
+
</tr>
|
1101
|
+
</table>
|
1102
|
+
</div>
|
1103
|
+
|
1104
|
+
<div class="method_details ">
|
1105
|
+
<h3 class="signature " id="on_close-instance_method">
|
1106
|
+
|
1107
|
+
#<strong>on_close</strong>(&block) ⇒ <tt>Object</tt>
|
1108
|
+
|
1109
|
+
|
1110
|
+
|
1111
|
+
|
1112
|
+
|
1113
|
+
</h3><table class="source_code">
|
1114
|
+
<tr>
|
1115
|
+
<td>
|
1116
|
+
<pre class="lines">
|
1117
|
+
|
1118
|
+
|
1119
|
+
75
|
1120
|
+
76
|
1121
|
+
77</pre>
|
1122
|
+
</td>
|
1123
|
+
<td>
|
1124
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 75</span>
|
1125
|
+
|
1126
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_close'>on_close</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1127
|
+
<span class='ivar'>@on_close</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
1128
|
+
<span class='kw'>end</span></pre>
|
1129
|
+
</td>
|
1130
|
+
</tr>
|
1131
|
+
</table>
|
1132
|
+
</div>
|
1133
|
+
|
1134
|
+
<div class="method_details ">
|
1135
|
+
<h3 class="signature " id="on_initialize_succeeded-instance_method">
|
1136
|
+
|
1137
|
+
#<strong>on_initialize_succeeded</strong>(&block) ⇒ <tt>Object</tt>
|
1138
|
+
|
1139
|
+
|
1140
|
+
|
1141
|
+
|
1142
|
+
|
1143
|
+
</h3><table class="source_code">
|
1144
|
+
<tr>
|
1145
|
+
<td>
|
1146
|
+
<pre class="lines">
|
1147
|
+
|
1148
|
+
|
1149
|
+
66
|
1150
|
+
67
|
1151
|
+
68</pre>
|
1152
|
+
</td>
|
1153
|
+
<td>
|
1154
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 66</span>
|
1155
|
+
|
1156
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on_initialize_succeeded'>on_initialize_succeeded</span><span class='lparen'>(</span><span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1157
|
+
<span class='ivar'>@on_initialize_succeeded</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
|
1158
|
+
<span class='kw'>end</span></pre>
|
1159
|
+
</td>
|
1160
|
+
</tr>
|
1161
|
+
</table>
|
1162
|
+
</div>
|
1163
|
+
|
1164
|
+
<div class="method_details ">
|
1165
|
+
<h3 class="signature " id="opener-instance_method">
|
1166
|
+
|
1167
|
+
#<strong>opener</strong> ⇒ <tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>
|
1168
|
+
|
1169
|
+
|
1170
|
+
|
1171
|
+
|
1172
|
+
|
1173
|
+
</h3><div class="docstring">
|
1174
|
+
<div class="discussion">
|
1175
|
+
|
1176
|
+
|
1177
|
+
</div>
|
1178
|
+
</div>
|
1179
|
+
<div class="tags">
|
1180
|
+
|
1181
|
+
<p class="tag_title">Returns:</p>
|
1182
|
+
<ul class="return">
|
1183
|
+
|
1184
|
+
<li>
|
1185
|
+
|
1186
|
+
|
1187
|
+
<span class='type'>(<tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="" title="Puppeteer::Target (class)">Target</a></span></tt>)</span>
|
1188
|
+
|
1189
|
+
|
1190
|
+
|
1191
|
+
</li>
|
1192
|
+
|
1193
|
+
</ul>
|
1194
|
+
|
1195
|
+
</div><table class="source_code">
|
1196
|
+
<tr>
|
1197
|
+
<td>
|
1198
|
+
<pre class="lines">
|
1199
|
+
|
1200
|
+
|
1201
|
+
135
|
1202
|
+
136
|
1203
|
+
137
|
1204
|
+
138
|
1205
|
+
139</pre>
|
1206
|
+
</td>
|
1207
|
+
<td>
|
1208
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 135</span>
|
1209
|
+
|
1210
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_opener'>opener</span>
|
1211
|
+
<span class='id identifier rubyid_opener_id'>opener_id</span> <span class='op'>=</span> <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_opener_id'>opener_id</span>
|
1212
|
+
<span class='kw'>return</span> <span class='kw'>nil</span> <span class='kw'>if</span> <span class='id identifier rubyid_opener_id'>opener_id</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1213
|
+
<span class='id identifier rubyid_browser'>browser</span><span class='period'>.</span><span class='id identifier rubyid_targets'>targets</span><span class='lbracket'>[</span><span class='id identifier rubyid_opener_id'>opener_id</span><span class='rbracket'>]</span>
|
1214
|
+
<span class='kw'>end</span></pre>
|
1215
|
+
</td>
|
1216
|
+
</tr>
|
1217
|
+
</table>
|
1218
|
+
</div>
|
1219
|
+
|
1220
|
+
<div class="method_details ">
|
1221
|
+
<h3 class="signature " id="page-instance_method">
|
1222
|
+
|
1223
|
+
#<strong>page</strong> ⇒ <tt>Object</tt>
|
1224
|
+
|
1225
|
+
|
1226
|
+
|
1227
|
+
|
1228
|
+
|
1229
|
+
</h3><table class="source_code">
|
1230
|
+
<tr>
|
1231
|
+
<td>
|
1232
|
+
<pre class="lines">
|
1233
|
+
|
1234
|
+
|
1235
|
+
87
|
1236
|
+
88
|
1237
|
+
89
|
1238
|
+
90
|
1239
|
+
91
|
1240
|
+
92
|
1241
|
+
93</pre>
|
1242
|
+
</td>
|
1243
|
+
<td>
|
1244
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 87</span>
|
1245
|
+
|
1246
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_page'>page</span>
|
1247
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>background_page</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span> <span class='op'>&&</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_nil?'>nil?</span>
|
1248
|
+
<span class='id identifier rubyid_client'>client</span> <span class='op'>=</span> <span class='ivar'>@session_factory</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
1249
|
+
<span class='ivar'>@page</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="Page.html" title="Puppeteer::Page (class)">Page</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="Page.html#create-class_method" title="Puppeteer::Page.create (method)">create</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='kw'>self</span><span class='comma'>,</span> <span class='ivar'>@ignore_https_errors</span><span class='comma'>,</span> <span class='ivar'>@default_viewport</span><span class='comma'>,</span> <span class='ivar'>@screenshot_task_queue</span><span class='rparen'>)</span>
|
1250
|
+
<span class='kw'>end</span>
|
1251
|
+
<span class='ivar'>@page</span>
|
1252
|
+
<span class='kw'>end</span></pre>
|
1253
|
+
</td>
|
1254
|
+
</tr>
|
1255
|
+
</table>
|
1256
|
+
</div>
|
1257
|
+
|
1258
|
+
<div class="method_details ">
|
1259
|
+
<h3 class="signature " id="type-instance_method">
|
1260
|
+
|
1261
|
+
#<strong>type</strong> ⇒ <tt>"<span class='object_link'><a href="#page-instance_method" title="Puppeteer::Target#page (method)">page</a></span>"|"background_page"|"service_worker"|"shared_worker"|"other"|"<span class='object_link'><a href="#browser-instance_method" title="Puppeteer::Target#browser (method)">browser</a></span>"</tt>
|
1262
|
+
|
1263
|
+
|
1264
|
+
|
1265
|
+
|
1266
|
+
|
1267
|
+
</h3><div class="docstring">
|
1268
|
+
<div class="discussion">
|
1269
|
+
|
1270
|
+
|
1271
|
+
</div>
|
1272
|
+
</div>
|
1273
|
+
<div class="tags">
|
1274
|
+
|
1275
|
+
<p class="tag_title">Returns:</p>
|
1276
|
+
<ul class="return">
|
1277
|
+
|
1278
|
+
<li>
|
1279
|
+
|
1280
|
+
|
1281
|
+
<span class='type'>(<tt>"<span class='object_link'><a href="#page-instance_method" title="Puppeteer::Target#page (method)">page</a></span>"|"background_page"|"service_worker"|"shared_worker"|"other"|"<span class='object_link'><a href="#browser-instance_method" title="Puppeteer::Target#browser (method)">browser</a></span>"</tt>)</span>
|
1282
|
+
|
1283
|
+
|
1284
|
+
|
1285
|
+
</li>
|
1286
|
+
|
1287
|
+
</ul>
|
1288
|
+
|
1289
|
+
</div><table class="source_code">
|
1290
|
+
<tr>
|
1291
|
+
<td>
|
1292
|
+
<pre class="lines">
|
1293
|
+
|
1294
|
+
|
1295
|
+
115
|
1296
|
+
116
|
1297
|
+
117
|
1298
|
+
118
|
1299
|
+
119
|
1300
|
+
120
|
1301
|
+
121
|
1302
|
+
122</pre>
|
1303
|
+
</td>
|
1304
|
+
<td>
|
1305
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 115</span>
|
1306
|
+
|
1307
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_type'>type</span>
|
1308
|
+
<span class='id identifier rubyid_type'>type</span> <span class='op'>=</span> <span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span>
|
1309
|
+
<span class='kw'>if</span> <span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>background_page</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>service_worker</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>shared_worker</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>browser</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_type'>type</span><span class='rparen'>)</span>
|
1310
|
+
<span class='id identifier rubyid_type'>type</span>
|
1311
|
+
<span class='kw'>else</span>
|
1312
|
+
<span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>other</span><span class='tstring_end'>'</span></span>
|
1313
|
+
<span class='kw'>end</span>
|
1314
|
+
<span class='kw'>end</span></pre>
|
1315
|
+
</td>
|
1316
|
+
</tr>
|
1317
|
+
</table>
|
1318
|
+
</div>
|
1319
|
+
|
1320
|
+
<div class="method_details ">
|
1321
|
+
<h3 class="signature " id="url-instance_method">
|
1322
|
+
|
1323
|
+
#<strong>url</strong> ⇒ <tt>string</tt>
|
1324
|
+
|
1325
|
+
|
1326
|
+
|
1327
|
+
|
1328
|
+
|
1329
|
+
</h3><div class="docstring">
|
1330
|
+
<div class="discussion">
|
1331
|
+
|
1332
|
+
|
1333
|
+
</div>
|
1334
|
+
</div>
|
1335
|
+
<div class="tags">
|
1336
|
+
|
1337
|
+
<p class="tag_title">Returns:</p>
|
1338
|
+
<ul class="return">
|
1339
|
+
|
1340
|
+
<li>
|
1341
|
+
|
1342
|
+
|
1343
|
+
<span class='type'>(<tt>string</tt>)</span>
|
1344
|
+
|
1345
|
+
|
1346
|
+
|
1347
|
+
</li>
|
1348
|
+
|
1349
|
+
</ul>
|
1350
|
+
|
1351
|
+
</div><table class="source_code">
|
1352
|
+
<tr>
|
1353
|
+
<td>
|
1354
|
+
<pre class="lines">
|
1355
|
+
|
1356
|
+
|
1357
|
+
110
|
1358
|
+
111
|
1359
|
+
112</pre>
|
1360
|
+
</td>
|
1361
|
+
<td>
|
1362
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/target.rb', line 110</span>
|
1363
|
+
|
1364
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
1365
|
+
<span class='ivar'>@target_info</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span>
|
1366
|
+
<span class='kw'>end</span></pre>
|
1367
|
+
</td>
|
1368
|
+
</tr>
|
1369
|
+
</table>
|
1370
|
+
</div>
|
1371
|
+
|
1372
|
+
</div>
|
1373
|
+
|
1374
|
+
</div>
|
1375
|
+
|
1376
|
+
<div id="footer">
|
1377
|
+
Generated on Thu Jun 4 23:54:41 2020 by
|
1378
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1379
|
+
0.9.24 (ruby-2.6.3).
|
1380
|
+
</div>
|
1381
|
+
|
1382
|
+
</div>
|
1383
|
+
</body>
|
1384
|
+
</html>
|