puppeteer-ruby 0.0.13 → 0.0.18
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/.rubocop.yml +39 -3
- data/README.md +54 -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 +84 -73
- data/lib/puppeteer/element_handle.rb +46 -63
- 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 +46 -46
- data/lib/puppeteer/frame_manager.rb +7 -25
- data/lib/puppeteer/js_handle.rb +39 -38
- data/lib/puppeteer/keyboard.rb +9 -29
- data/lib/puppeteer/mouse.rb +20 -24
- data/lib/puppeteer/network_manager.rb +163 -5
- data/lib/puppeteer/page.rb +221 -181
- data/lib/puppeteer/page/pdf_options.rb +166 -0
- data/lib/puppeteer/remote_object.rb +18 -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 +3 -5
- 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 -2293
- 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 -3835
- 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 -674
- 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 -4123
- data/docs/top-level-namespace.html +0 -126
- data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,433 +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::ConsoleMessage::Location
|
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::ConsoleMessage::Location";
|
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> » <span class='title'><span class='object_link'><a href="../ConsoleMessage.html" title="Puppeteer::ConsoleMessage (class)">ConsoleMessage</a></span></span>
|
41
|
-
»
|
42
|
-
<span class="title">Location</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::ConsoleMessage::Location
|
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::ConsoleMessage::Location</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/console_message.rb</dd>
|
98
|
-
</dl>
|
99
|
-
|
100
|
-
</div>
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
107
|
-
<ul class="summary">
|
108
|
-
|
109
|
-
<li class="public ">
|
110
|
-
<span class="summary_signature">
|
111
|
-
|
112
|
-
<a href="#column_number-instance_method" title="#column_number (instance method)">#<strong>column_number</strong> ⇒ Object </a>
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
</span>
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
<span class="note title readonly">readonly</span>
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
<span class="summary_desc"><div class='inline'>
|
132
|
-
<p>Returns the value of attribute column_number.</p>
|
133
|
-
</div></span>
|
134
|
-
|
135
|
-
</li>
|
136
|
-
|
137
|
-
|
138
|
-
<li class="public ">
|
139
|
-
<span class="summary_signature">
|
140
|
-
|
141
|
-
<a href="#line_number-instance_method" title="#line_number (instance method)">#<strong>line_number</strong> ⇒ Object </a>
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
</span>
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
<span class="note title readonly">readonly</span>
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
<span class="summary_desc"><div class='inline'>
|
161
|
-
<p>Returns the value of attribute line_number.</p>
|
162
|
-
</div></span>
|
163
|
-
|
164
|
-
</li>
|
165
|
-
|
166
|
-
|
167
|
-
<li class="public ">
|
168
|
-
<span class="summary_signature">
|
169
|
-
|
170
|
-
<a href="#url-instance_method" title="#url (instance method)">#<strong>url</strong> ⇒ Object </a>
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
</span>
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
<span class="note title readonly">readonly</span>
|
180
|
-
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
<span class="summary_desc"><div class='inline'>
|
190
|
-
<p>Returns the value of attribute url.</p>
|
191
|
-
</div></span>
|
192
|
-
|
193
|
-
</li>
|
194
|
-
|
195
|
-
|
196
|
-
</ul>
|
197
|
-
|
198
|
-
|
199
|
-
|
200
|
-
|
201
|
-
|
202
|
-
<h2>
|
203
|
-
Instance Method Summary
|
204
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
205
|
-
</h2>
|
206
|
-
|
207
|
-
<ul class="summary">
|
208
|
-
|
209
|
-
<li class="public ">
|
210
|
-
<span class="summary_signature">
|
211
|
-
|
212
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(url:, line_number:, column_number: nil) ⇒ Location </a>
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
</span>
|
217
|
-
|
218
|
-
|
219
|
-
<span class="note title constructor">constructor</span>
|
220
|
-
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
<span class="summary_desc"><div class='inline'>
|
229
|
-
<p>A new instance of Location.</p>
|
230
|
-
</div></span>
|
231
|
-
|
232
|
-
</li>
|
233
|
-
|
234
|
-
|
235
|
-
</ul>
|
236
|
-
|
237
|
-
|
238
|
-
<div id="constructor_details" class="method_details_list">
|
239
|
-
<h2>Constructor Details</h2>
|
240
|
-
|
241
|
-
<div class="method_details first">
|
242
|
-
<h3 class="signature first" id="initialize-instance_method">
|
243
|
-
|
244
|
-
#<strong>initialize</strong>(url:, line_number:, column_number: nil) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::ConsoleMessage::Location (class)">Location</a></span></tt>
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
</h3><div class="docstring">
|
251
|
-
<div class="discussion">
|
252
|
-
|
253
|
-
<p>Returns a new instance of Location.</p>
|
254
|
-
|
255
|
-
|
256
|
-
</div>
|
257
|
-
</div>
|
258
|
-
<div class="tags">
|
259
|
-
|
260
|
-
|
261
|
-
</div><table class="source_code">
|
262
|
-
<tr>
|
263
|
-
<td>
|
264
|
-
<pre class="lines">
|
265
|
-
|
266
|
-
|
267
|
-
3
|
268
|
-
4
|
269
|
-
5
|
270
|
-
6
|
271
|
-
7</pre>
|
272
|
-
</td>
|
273
|
-
<td>
|
274
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/console_message.rb', line 3</span>
|
275
|
-
|
276
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>url:</span><span class='comma'>,</span> <span class='label'>line_number:</span><span class='comma'>,</span> <span class='label'>column_number:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
277
|
-
<span class='ivar'>@url</span> <span class='op'>=</span> <span class='id identifier rubyid_url'>url</span>
|
278
|
-
<span class='ivar'>@line_number</span> <span class='op'>=</span> <span class='id identifier rubyid_line_number'>line_number</span>
|
279
|
-
<span class='ivar'>@column_number</span> <span class='op'>=</span> <span class='id identifier rubyid_column_number'>column_number</span>
|
280
|
-
<span class='kw'>end</span></pre>
|
281
|
-
</td>
|
282
|
-
</tr>
|
283
|
-
</table>
|
284
|
-
</div>
|
285
|
-
|
286
|
-
</div>
|
287
|
-
|
288
|
-
<div id="instance_attr_details" class="attr_details">
|
289
|
-
<h2>Instance Attribute Details</h2>
|
290
|
-
|
291
|
-
|
292
|
-
<span id=""></span>
|
293
|
-
<div class="method_details first">
|
294
|
-
<h3 class="signature first" id="column_number-instance_method">
|
295
|
-
|
296
|
-
#<strong>column_number</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
</h3><div class="docstring">
|
303
|
-
<div class="discussion">
|
304
|
-
|
305
|
-
<p>Returns the value of attribute column_number.</p>
|
306
|
-
|
307
|
-
|
308
|
-
</div>
|
309
|
-
</div>
|
310
|
-
<div class="tags">
|
311
|
-
|
312
|
-
|
313
|
-
</div><table class="source_code">
|
314
|
-
<tr>
|
315
|
-
<td>
|
316
|
-
<pre class="lines">
|
317
|
-
|
318
|
-
|
319
|
-
9
|
320
|
-
10
|
321
|
-
11</pre>
|
322
|
-
</td>
|
323
|
-
<td>
|
324
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/console_message.rb', line 9</span>
|
325
|
-
|
326
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_column_number'>column_number</span>
|
327
|
-
<span class='ivar'>@column_number</span>
|
328
|
-
<span class='kw'>end</span></pre>
|
329
|
-
</td>
|
330
|
-
</tr>
|
331
|
-
</table>
|
332
|
-
</div>
|
333
|
-
|
334
|
-
|
335
|
-
<span id=""></span>
|
336
|
-
<div class="method_details ">
|
337
|
-
<h3 class="signature " id="line_number-instance_method">
|
338
|
-
|
339
|
-
#<strong>line_number</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
</h3><div class="docstring">
|
346
|
-
<div class="discussion">
|
347
|
-
|
348
|
-
<p>Returns the value of attribute line_number.</p>
|
349
|
-
|
350
|
-
|
351
|
-
</div>
|
352
|
-
</div>
|
353
|
-
<div class="tags">
|
354
|
-
|
355
|
-
|
356
|
-
</div><table class="source_code">
|
357
|
-
<tr>
|
358
|
-
<td>
|
359
|
-
<pre class="lines">
|
360
|
-
|
361
|
-
|
362
|
-
9
|
363
|
-
10
|
364
|
-
11</pre>
|
365
|
-
</td>
|
366
|
-
<td>
|
367
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/console_message.rb', line 9</span>
|
368
|
-
|
369
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_line_number'>line_number</span>
|
370
|
-
<span class='ivar'>@line_number</span>
|
371
|
-
<span class='kw'>end</span></pre>
|
372
|
-
</td>
|
373
|
-
</tr>
|
374
|
-
</table>
|
375
|
-
</div>
|
376
|
-
|
377
|
-
|
378
|
-
<span id=""></span>
|
379
|
-
<div class="method_details ">
|
380
|
-
<h3 class="signature " id="url-instance_method">
|
381
|
-
|
382
|
-
#<strong>url</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
</h3><div class="docstring">
|
389
|
-
<div class="discussion">
|
390
|
-
|
391
|
-
<p>Returns the value of attribute url.</p>
|
392
|
-
|
393
|
-
|
394
|
-
</div>
|
395
|
-
</div>
|
396
|
-
<div class="tags">
|
397
|
-
|
398
|
-
|
399
|
-
</div><table class="source_code">
|
400
|
-
<tr>
|
401
|
-
<td>
|
402
|
-
<pre class="lines">
|
403
|
-
|
404
|
-
|
405
|
-
9
|
406
|
-
10
|
407
|
-
11</pre>
|
408
|
-
</td>
|
409
|
-
<td>
|
410
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/console_message.rb', line 9</span>
|
411
|
-
|
412
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_url'>url</span>
|
413
|
-
<span class='ivar'>@url</span>
|
414
|
-
<span class='kw'>end</span></pre>
|
415
|
-
</td>
|
416
|
-
</tr>
|
417
|
-
</table>
|
418
|
-
</div>
|
419
|
-
|
420
|
-
</div>
|
421
|
-
|
422
|
-
|
423
|
-
</div>
|
424
|
-
|
425
|
-
<div id="footer">
|
426
|
-
Generated on Wed Jun 24 03:08:01 2020 by
|
427
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
428
|
-
0.9.24 (ruby-2.6.3).
|
429
|
-
</div>
|
430
|
-
|
431
|
-
</div>
|
432
|
-
</body>
|
433
|
-
</html>
|
@@ -1,2293 +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::DOMWorld
|
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::DOMWorld";
|
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 (D)</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">DOMWorld</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::DOMWorld
|
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::DOMWorld</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/dom_world.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/src/DOMWorld.js">github.com/puppeteer/puppeteer/blob/master/src/DOMWorld.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="DOMWorld/DetachedError.html" title="Puppeteer::DOMWorld::DetachedError (class)">DetachedError</a></span>
|
120
|
-
|
121
|
-
|
122
|
-
</p>
|
123
|
-
|
124
|
-
|
125
|
-
<h2>
|
126
|
-
Constant Summary
|
127
|
-
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
128
|
-
</h2>
|
129
|
-
|
130
|
-
<dl class="constants">
|
131
|
-
|
132
|
-
<dt id="PREDICATE-constant" class="">PREDICATE =
|
133
|
-
|
134
|
-
</dt>
|
135
|
-
<dd><pre class="code"><span class='heredoc_beg'><<~JAVASCRIPT</span>
|
136
|
-
<span class='tstring_content'>/**
|
137
|
-
* @param {string} selectorOrXPath
|
138
|
-
* @param {boolean} isXPath
|
139
|
-
* @param {boolean} waitForVisible
|
140
|
-
* @param {boolean} waitForHidden
|
141
|
-
* @return {?Node|boolean}
|
142
|
-
*/
|
143
|
-
function _(selectorOrXPath, isXPath, waitForVisible, waitForHidden) {
|
144
|
-
const node = isXPath
|
145
|
-
? document.evaluate(selectorOrXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue
|
146
|
-
: document.querySelector(selectorOrXPath);
|
147
|
-
if (!node)
|
148
|
-
return waitForHidden;
|
149
|
-
if (!waitForVisible && !waitForHidden)
|
150
|
-
return node;
|
151
|
-
const element = /** @type {Element} */ (node.nodeType === Node.TEXT_NODE ? node.parentElement : node);
|
152
|
-
const style = window.getComputedStyle(element);
|
153
|
-
const isVisible = style && style.visibility !== 'hidden' && hasVisibleBoundingBox();
|
154
|
-
const success = (waitForVisible === isVisible || waitForHidden === !isVisible);
|
155
|
-
return success ? node : null;
|
156
|
-
/**
|
157
|
-
* @return {boolean}
|
158
|
-
*/
|
159
|
-
function hasVisibleBoundingBox() {
|
160
|
-
const rect = element.getBoundingClientRect();
|
161
|
-
return !!(rect.top || rect.bottom || rect.width || rect.height);
|
162
|
-
}
|
163
|
-
}
|
164
|
-
</span><span class='heredoc_end'>JAVASCRIPT</span></pre></dd>
|
165
|
-
|
166
|
-
</dl>
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
173
|
-
<ul class="summary">
|
174
|
-
|
175
|
-
<li class="public ">
|
176
|
-
<span class="summary_signature">
|
177
|
-
|
178
|
-
<a href="#frame-instance_method" title="#frame (instance method)">#<strong>frame</strong> ⇒ Object </a>
|
179
|
-
|
180
|
-
|
181
|
-
|
182
|
-
</span>
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
<span class="note title readonly">readonly</span>
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
196
|
-
|
197
|
-
<span class="summary_desc"><div class='inline'>
|
198
|
-
<p>Returns the value of attribute frame.</p>
|
199
|
-
</div></span>
|
200
|
-
|
201
|
-
</li>
|
202
|
-
|
203
|
-
|
204
|
-
</ul>
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
<h2>
|
211
|
-
Instance Method Summary
|
212
|
-
<small><a href="#" class="summary_toggle">collapse</a></small>
|
213
|
-
</h2>
|
214
|
-
|
215
|
-
<ul class="summary">
|
216
|
-
|
217
|
-
<li class="public ">
|
218
|
-
<span class="summary_signature">
|
219
|
-
|
220
|
-
<a href="#_wait_tasks-instance_method" title="#_wait_tasks (instance method)">#<strong>_wait_tasks</strong> ⇒ Object </a>
|
221
|
-
|
222
|
-
|
223
|
-
|
224
|
-
</span>
|
225
|
-
|
226
|
-
|
227
|
-
|
228
|
-
|
229
|
-
|
230
|
-
|
231
|
-
|
232
|
-
|
233
|
-
|
234
|
-
<span class="summary_desc"><div class='inline'>
|
235
|
-
<p>only used in Puppeteer::WaitTask#initialize.</p>
|
236
|
-
</div></span>
|
237
|
-
|
238
|
-
</li>
|
239
|
-
|
240
|
-
|
241
|
-
<li class="public ">
|
242
|
-
<span class="summary_signature">
|
243
|
-
|
244
|
-
<a href="#click-instance_method" title="#click (instance method)">#<strong>click</strong>(selector, delay: nil, button: nil, click_count: nil) ⇒ Object </a>
|
245
|
-
|
246
|
-
|
247
|
-
|
248
|
-
</span>
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
|
258
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
259
|
-
|
260
|
-
</li>
|
261
|
-
|
262
|
-
|
263
|
-
<li class="public ">
|
264
|
-
<span class="summary_signature">
|
265
|
-
|
266
|
-
<a href="#context=-instance_method" title="#context= (instance method)">#<strong>context=</strong>(context) ⇒ Object </a>
|
267
|
-
|
268
|
-
|
269
|
-
|
270
|
-
</span>
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
281
|
-
|
282
|
-
</li>
|
283
|
-
|
284
|
-
|
285
|
-
<li class="public ">
|
286
|
-
<span class="summary_signature">
|
287
|
-
|
288
|
-
<a href="#delete_context-instance_method" title="#delete_context (instance method)">#<strong>delete_context</strong>(execution_context_id) ⇒ Object </a>
|
289
|
-
|
290
|
-
|
291
|
-
|
292
|
-
</span>
|
293
|
-
|
294
|
-
|
295
|
-
|
296
|
-
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
303
|
-
|
304
|
-
</li>
|
305
|
-
|
306
|
-
|
307
|
-
<li class="public ">
|
308
|
-
<span class="summary_signature">
|
309
|
-
|
310
|
-
<a href="#detach-instance_method" title="#detach (instance method)">#<strong>detach</strong> ⇒ Object </a>
|
311
|
-
|
312
|
-
|
313
|
-
|
314
|
-
</span>
|
315
|
-
|
316
|
-
|
317
|
-
|
318
|
-
|
319
|
-
|
320
|
-
|
321
|
-
|
322
|
-
|
323
|
-
|
324
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
325
|
-
|
326
|
-
</li>
|
327
|
-
|
328
|
-
|
329
|
-
<li class="public ">
|
330
|
-
<span class="summary_signature">
|
331
|
-
|
332
|
-
<a href="#evaluate-instance_method" title="#evaluate (instance method)">#<strong>evaluate</strong>(page_function, *args) ⇒ !Promise<*> </a>
|
333
|
-
|
334
|
-
|
335
|
-
|
336
|
-
</span>
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
344
|
-
|
345
|
-
|
346
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
347
|
-
|
348
|
-
</li>
|
349
|
-
|
350
|
-
|
351
|
-
<li class="public ">
|
352
|
-
<span class="summary_signature">
|
353
|
-
|
354
|
-
<a href="#evaluate_handle-instance_method" title="#evaluate_handle (instance method)">#<strong>evaluate_handle</strong>(page_function, *args) ⇒ !Promise<!Puppeteer.JSHandle> </a>
|
355
|
-
|
356
|
-
|
357
|
-
|
358
|
-
</span>
|
359
|
-
|
360
|
-
|
361
|
-
|
362
|
-
|
363
|
-
|
364
|
-
|
365
|
-
|
366
|
-
|
367
|
-
|
368
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
369
|
-
|
370
|
-
</li>
|
371
|
-
|
372
|
-
|
373
|
-
<li class="public ">
|
374
|
-
<span class="summary_signature">
|
375
|
-
|
376
|
-
<a href="#execution_context-instance_method" title="#execution_context (instance method)">#<strong>execution_context</strong> ⇒ !Promise<!Puppeteer.ExecutionContext> </a>
|
377
|
-
|
378
|
-
|
379
|
-
|
380
|
-
</span>
|
381
|
-
|
382
|
-
|
383
|
-
|
384
|
-
|
385
|
-
|
386
|
-
|
387
|
-
|
388
|
-
|
389
|
-
|
390
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
391
|
-
|
392
|
-
</li>
|
393
|
-
|
394
|
-
|
395
|
-
<li class="public ">
|
396
|
-
<span class="summary_signature">
|
397
|
-
|
398
|
-
<a href="#has_context%3F-instance_method" title="#has_context? (instance method)">#<strong>has_context?</strong> ⇒ Boolean </a>
|
399
|
-
|
400
|
-
|
401
|
-
|
402
|
-
</span>
|
403
|
-
|
404
|
-
|
405
|
-
|
406
|
-
|
407
|
-
|
408
|
-
|
409
|
-
|
410
|
-
|
411
|
-
|
412
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
413
|
-
|
414
|
-
</li>
|
415
|
-
|
416
|
-
|
417
|
-
<li class="public ">
|
418
|
-
<span class="summary_signature">
|
419
|
-
|
420
|
-
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(frame_manager, frame, timeout_settings) ⇒ DOMWorld </a>
|
421
|
-
|
422
|
-
|
423
|
-
|
424
|
-
</span>
|
425
|
-
|
426
|
-
|
427
|
-
<span class="note title constructor">constructor</span>
|
428
|
-
|
429
|
-
|
430
|
-
|
431
|
-
|
432
|
-
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
<span class="summary_desc"><div class='inline'>
|
437
|
-
<p>A new instance of DOMWorld.</p>
|
438
|
-
</div></span>
|
439
|
-
|
440
|
-
</li>
|
441
|
-
|
442
|
-
|
443
|
-
<li class="public ">
|
444
|
-
<span class="summary_signature">
|
445
|
-
|
446
|
-
<a href="#S-instance_method" title="#S (instance method)">#<strong>S</strong>(selector) ⇒ !Promise<?Puppeteer.ElementHandle> </a>
|
447
|
-
|
448
|
-
|
449
|
-
|
450
|
-
</span>
|
451
|
-
|
452
|
-
|
453
|
-
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
<span class="summary_desc"><div class='inline'>
|
461
|
-
<p>`$()` in JavaScript.</p>
|
462
|
-
</div></span>
|
463
|
-
|
464
|
-
</li>
|
465
|
-
|
466
|
-
|
467
|
-
<li class="public ">
|
468
|
-
<span class="summary_signature">
|
469
|
-
|
470
|
-
<a href="#select-instance_method" title="#select (instance method)">#<strong>select</strong>(selector, *values) ⇒ Array<String> </a>
|
471
|
-
|
472
|
-
|
473
|
-
|
474
|
-
</span>
|
475
|
-
|
476
|
-
|
477
|
-
|
478
|
-
|
479
|
-
|
480
|
-
|
481
|
-
|
482
|
-
|
483
|
-
|
484
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
485
|
-
|
486
|
-
</li>
|
487
|
-
|
488
|
-
|
489
|
-
<li class="public ">
|
490
|
-
<span class="summary_signature">
|
491
|
-
|
492
|
-
<a href="#Seval-instance_method" title="#Seval (instance method)">#<strong>Seval</strong>(selector, page_function, *args) ⇒ !Promise<(!Object|undefined)> </a>
|
493
|
-
|
494
|
-
|
495
|
-
|
496
|
-
</span>
|
497
|
-
|
498
|
-
|
499
|
-
|
500
|
-
|
501
|
-
|
502
|
-
|
503
|
-
|
504
|
-
|
505
|
-
|
506
|
-
<span class="summary_desc"><div class='inline'>
|
507
|
-
<p>`$eval()` in JavaScript.</p>
|
508
|
-
</div></span>
|
509
|
-
|
510
|
-
</li>
|
511
|
-
|
512
|
-
|
513
|
-
<li class="public ">
|
514
|
-
<span class="summary_signature">
|
515
|
-
|
516
|
-
<a href="#SS-instance_method" title="#SS (instance method)">#<strong>SS</strong>(selector) ⇒ !Promise<!Array<!Puppeteer.ElementHandle>> </a>
|
517
|
-
|
518
|
-
|
519
|
-
|
520
|
-
</span>
|
521
|
-
|
522
|
-
|
523
|
-
|
524
|
-
|
525
|
-
|
526
|
-
|
527
|
-
|
528
|
-
|
529
|
-
|
530
|
-
<span class="summary_desc"><div class='inline'>
|
531
|
-
<p>`$$()` in JavaScript.</p>
|
532
|
-
</div></span>
|
533
|
-
|
534
|
-
</li>
|
535
|
-
|
536
|
-
|
537
|
-
<li class="public ">
|
538
|
-
<span class="summary_signature">
|
539
|
-
|
540
|
-
<a href="#SSeval-instance_method" title="#SSeval (instance method)">#<strong>SSeval</strong>(selector, page_function, *args) ⇒ !Promise<(!Object|undefined)> </a>
|
541
|
-
|
542
|
-
|
543
|
-
|
544
|
-
</span>
|
545
|
-
|
546
|
-
|
547
|
-
|
548
|
-
|
549
|
-
|
550
|
-
|
551
|
-
|
552
|
-
|
553
|
-
|
554
|
-
<span class="summary_desc"><div class='inline'>
|
555
|
-
<p>`$$eval()` in JavaScript.</p>
|
556
|
-
</div></span>
|
557
|
-
|
558
|
-
</li>
|
559
|
-
|
560
|
-
|
561
|
-
<li class="public ">
|
562
|
-
<span class="summary_signature">
|
563
|
-
|
564
|
-
<a href="#Sx-instance_method" title="#Sx (instance method)">#<strong>Sx</strong>(expression) ⇒ !Promise<!Array<!Puppeteer.ElementHandle>> </a>
|
565
|
-
|
566
|
-
|
567
|
-
|
568
|
-
</span>
|
569
|
-
|
570
|
-
|
571
|
-
|
572
|
-
|
573
|
-
|
574
|
-
|
575
|
-
|
576
|
-
|
577
|
-
|
578
|
-
<span class="summary_desc"><div class='inline'>
|
579
|
-
<p>`$x()` in JavaScript.</p>
|
580
|
-
</div></span>
|
581
|
-
|
582
|
-
</li>
|
583
|
-
|
584
|
-
|
585
|
-
<li class="public ">
|
586
|
-
<span class="summary_signature">
|
587
|
-
|
588
|
-
<a href="#tap-instance_method" title="#tap (instance method)">#<strong>tap</strong>(selector) ⇒ Object </a>
|
589
|
-
|
590
|
-
|
591
|
-
|
592
|
-
</span>
|
593
|
-
|
594
|
-
|
595
|
-
|
596
|
-
|
597
|
-
|
598
|
-
|
599
|
-
|
600
|
-
|
601
|
-
|
602
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
603
|
-
|
604
|
-
</li>
|
605
|
-
|
606
|
-
|
607
|
-
<li class="public ">
|
608
|
-
<span class="summary_signature">
|
609
|
-
|
610
|
-
<a href="#title-instance_method" title="#title (instance method)">#<strong>title</strong> ⇒ String </a>
|
611
|
-
|
612
|
-
|
613
|
-
|
614
|
-
</span>
|
615
|
-
|
616
|
-
|
617
|
-
|
618
|
-
|
619
|
-
|
620
|
-
|
621
|
-
|
622
|
-
|
623
|
-
|
624
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
625
|
-
|
626
|
-
</li>
|
627
|
-
|
628
|
-
|
629
|
-
<li class="public ">
|
630
|
-
<span class="summary_signature">
|
631
|
-
|
632
|
-
<a href="#type_text-instance_method" title="#type_text (instance method)">#<strong>type_text</strong>(selector, text, delay: nil) ⇒ Object </a>
|
633
|
-
|
634
|
-
|
635
|
-
|
636
|
-
</span>
|
637
|
-
|
638
|
-
|
639
|
-
|
640
|
-
|
641
|
-
|
642
|
-
|
643
|
-
|
644
|
-
|
645
|
-
|
646
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
647
|
-
|
648
|
-
</li>
|
649
|
-
|
650
|
-
|
651
|
-
<li class="public ">
|
652
|
-
<span class="summary_signature">
|
653
|
-
|
654
|
-
<a href="#wait_for_selector-instance_method" title="#wait_for_selector (instance method)">#<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) ⇒ Object </a>
|
655
|
-
|
656
|
-
|
657
|
-
|
658
|
-
</span>
|
659
|
-
|
660
|
-
|
661
|
-
|
662
|
-
|
663
|
-
|
664
|
-
|
665
|
-
|
666
|
-
|
667
|
-
|
668
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
669
|
-
|
670
|
-
</li>
|
671
|
-
|
672
|
-
|
673
|
-
<li class="public ">
|
674
|
-
<span class="summary_signature">
|
675
|
-
|
676
|
-
<a href="#wait_for_xpath-instance_method" title="#wait_for_xpath (instance method)">#<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) ⇒ Object </a>
|
677
|
-
|
678
|
-
|
679
|
-
|
680
|
-
</span>
|
681
|
-
|
682
|
-
|
683
|
-
|
684
|
-
|
685
|
-
|
686
|
-
|
687
|
-
|
688
|
-
|
689
|
-
|
690
|
-
<span class="summary_desc"><div class='inline'></div></span>
|
691
|
-
|
692
|
-
</li>
|
693
|
-
|
694
|
-
|
695
|
-
</ul>
|
696
|
-
|
697
|
-
|
698
|
-
<div id="constructor_details" class="method_details_list">
|
699
|
-
<h2>Constructor Details</h2>
|
700
|
-
|
701
|
-
<div class="method_details first">
|
702
|
-
<h3 class="signature first" id="initialize-instance_method">
|
703
|
-
|
704
|
-
#<strong>initialize</strong>(frame_manager, frame, timeout_settings) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::DOMWorld (class)">DOMWorld</a></span></tt>
|
705
|
-
|
706
|
-
|
707
|
-
|
708
|
-
|
709
|
-
|
710
|
-
</h3><div class="docstring">
|
711
|
-
<div class="discussion">
|
712
|
-
|
713
|
-
<p>Returns a new instance of DOMWorld.</p>
|
714
|
-
|
715
|
-
|
716
|
-
</div>
|
717
|
-
</div>
|
718
|
-
<div class="tags">
|
719
|
-
<p class="tag_title">Parameters:</p>
|
720
|
-
<ul class="param">
|
721
|
-
|
722
|
-
<li>
|
723
|
-
|
724
|
-
<span class='name'>frameManager</span>
|
725
|
-
|
726
|
-
|
727
|
-
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="FrameManager.html" title="Puppeteer::FrameManager (class)">FrameManager</a></span></tt>)</span>
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
</li>
|
732
|
-
|
733
|
-
<li>
|
734
|
-
|
735
|
-
<span class='name'>frame</span>
|
736
|
-
|
737
|
-
|
738
|
-
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Frame</a></span></tt>)</span>
|
739
|
-
|
740
|
-
|
741
|
-
|
742
|
-
</li>
|
743
|
-
|
744
|
-
<li>
|
745
|
-
|
746
|
-
<span class='name'>timeoutSettings</span>
|
747
|
-
|
748
|
-
|
749
|
-
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="TimeoutSettings.html" title="Puppeteer::TimeoutSettings (class)">TimeoutSettings</a></span></tt>)</span>
|
750
|
-
|
751
|
-
|
752
|
-
|
753
|
-
</li>
|
754
|
-
|
755
|
-
</ul>
|
756
|
-
|
757
|
-
|
758
|
-
</div><table class="source_code">
|
759
|
-
<tr>
|
760
|
-
<td>
|
761
|
-
<pre class="lines">
|
762
|
-
|
763
|
-
|
764
|
-
10
|
765
|
-
11
|
766
|
-
12
|
767
|
-
13
|
768
|
-
14
|
769
|
-
15
|
770
|
-
16
|
771
|
-
17
|
772
|
-
18</pre>
|
773
|
-
</td>
|
774
|
-
<td>
|
775
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 10</span>
|
776
|
-
|
777
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_frame_manager'>frame_manager</span><span class='comma'>,</span> <span class='id identifier rubyid_frame'>frame</span><span class='comma'>,</span> <span class='id identifier rubyid_timeout_settings'>timeout_settings</span><span class='rparen'>)</span>
|
778
|
-
<span class='ivar'>@frame_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span>
|
779
|
-
<span class='ivar'>@frame</span> <span class='op'>=</span> <span class='id identifier rubyid_frame'>frame</span>
|
780
|
-
<span class='ivar'>@timeout_settings</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout_settings'>timeout_settings</span>
|
781
|
-
<span class='ivar'>@context_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>
|
782
|
-
<span class='ivar'>@pending_destroy</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
|
783
|
-
<span class='ivar'>@wait_tasks</span> <span class='op'>=</span> <span class='const'>Set</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span>
|
784
|
-
<span class='ivar'>@detached</span> <span class='op'>=</span> <span class='kw'>false</span>
|
785
|
-
<span class='kw'>end</span></pre>
|
786
|
-
</td>
|
787
|
-
</tr>
|
788
|
-
</table>
|
789
|
-
</div>
|
790
|
-
|
791
|
-
</div>
|
792
|
-
|
793
|
-
<div id="instance_attr_details" class="attr_details">
|
794
|
-
<h2>Instance Attribute Details</h2>
|
795
|
-
|
796
|
-
|
797
|
-
<span id=""></span>
|
798
|
-
<div class="method_details first">
|
799
|
-
<h3 class="signature first" id="frame-instance_method">
|
800
|
-
|
801
|
-
#<strong>frame</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
802
|
-
|
803
|
-
|
804
|
-
|
805
|
-
|
806
|
-
|
807
|
-
</h3><div class="docstring">
|
808
|
-
<div class="discussion">
|
809
|
-
|
810
|
-
<p>Returns the value of attribute frame.</p>
|
811
|
-
|
812
|
-
|
813
|
-
</div>
|
814
|
-
</div>
|
815
|
-
<div class="tags">
|
816
|
-
|
817
|
-
|
818
|
-
</div><table class="source_code">
|
819
|
-
<tr>
|
820
|
-
<td>
|
821
|
-
<pre class="lines">
|
822
|
-
|
823
|
-
|
824
|
-
20
|
825
|
-
21
|
826
|
-
22</pre>
|
827
|
-
</td>
|
828
|
-
<td>
|
829
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 20</span>
|
830
|
-
|
831
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_frame'>frame</span>
|
832
|
-
<span class='ivar'>@frame</span>
|
833
|
-
<span class='kw'>end</span></pre>
|
834
|
-
</td>
|
835
|
-
</tr>
|
836
|
-
</table>
|
837
|
-
</div>
|
838
|
-
|
839
|
-
</div>
|
840
|
-
|
841
|
-
|
842
|
-
<div id="instance_method_details" class="method_details_list">
|
843
|
-
<h2>Instance Method Details</h2>
|
844
|
-
|
845
|
-
|
846
|
-
<div class="method_details first">
|
847
|
-
<h3 class="signature first" id="_wait_tasks-instance_method">
|
848
|
-
|
849
|
-
#<strong>_wait_tasks</strong> ⇒ <tt>Object</tt>
|
850
|
-
|
851
|
-
|
852
|
-
|
853
|
-
|
854
|
-
|
855
|
-
</h3><div class="docstring">
|
856
|
-
<div class="discussion">
|
857
|
-
|
858
|
-
<p>only used in Puppeteer::WaitTask#initialize</p>
|
859
|
-
|
860
|
-
|
861
|
-
</div>
|
862
|
-
</div>
|
863
|
-
<div class="tags">
|
864
|
-
|
865
|
-
|
866
|
-
</div><table class="source_code">
|
867
|
-
<tr>
|
868
|
-
<td>
|
869
|
-
<pre class="lines">
|
870
|
-
|
871
|
-
|
872
|
-
23
|
873
|
-
24
|
874
|
-
25</pre>
|
875
|
-
</td>
|
876
|
-
<td>
|
877
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 23</span>
|
878
|
-
|
879
|
-
<span class='kw'>def</span> <span class='id identifier rubyid__wait_tasks'>_wait_tasks</span>
|
880
|
-
<span class='ivar'>@wait_tasks</span>
|
881
|
-
<span class='kw'>end</span></pre>
|
882
|
-
</td>
|
883
|
-
</tr>
|
884
|
-
</table>
|
885
|
-
</div>
|
886
|
-
|
887
|
-
<div class="method_details ">
|
888
|
-
<h3 class="signature " id="click-instance_method">
|
889
|
-
|
890
|
-
#<strong>click</strong>(selector, delay: nil, button: nil, click_count: nil) ⇒ <tt>Object</tt>
|
891
|
-
|
892
|
-
|
893
|
-
|
894
|
-
|
895
|
-
|
896
|
-
</h3><div class="docstring">
|
897
|
-
<div class="discussion">
|
898
|
-
|
899
|
-
|
900
|
-
</div>
|
901
|
-
</div>
|
902
|
-
<div class="tags">
|
903
|
-
<p class="tag_title">Parameters:</p>
|
904
|
-
<ul class="param">
|
905
|
-
|
906
|
-
<li>
|
907
|
-
|
908
|
-
<span class='name'>selector</span>
|
909
|
-
|
910
|
-
|
911
|
-
<span class='type'>(<tt>String</tt>)</span>
|
912
|
-
|
913
|
-
|
914
|
-
|
915
|
-
</li>
|
916
|
-
|
917
|
-
<li>
|
918
|
-
|
919
|
-
<span class='name'>delay</span>
|
920
|
-
|
921
|
-
|
922
|
-
<span class='type'>(<tt>Number</tt>)</span>
|
923
|
-
|
924
|
-
|
925
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
926
|
-
|
927
|
-
|
928
|
-
</li>
|
929
|
-
|
930
|
-
<li>
|
931
|
-
|
932
|
-
<span class='name'>button</span>
|
933
|
-
|
934
|
-
|
935
|
-
<span class='type'>(<tt>String</tt>)</span>
|
936
|
-
|
937
|
-
|
938
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
939
|
-
|
940
|
-
|
941
|
-
—
|
942
|
-
<div class='inline'>
|
943
|
-
<p>“left”|“right”|“middle”</p>
|
944
|
-
</div>
|
945
|
-
|
946
|
-
</li>
|
947
|
-
|
948
|
-
<li>
|
949
|
-
|
950
|
-
<span class='name'>click_count</span>
|
951
|
-
|
952
|
-
|
953
|
-
<span class='type'>(<tt>Number</tt>)</span>
|
954
|
-
|
955
|
-
|
956
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
957
|
-
|
958
|
-
|
959
|
-
</li>
|
960
|
-
|
961
|
-
</ul>
|
962
|
-
|
963
|
-
|
964
|
-
</div><table class="source_code">
|
965
|
-
<tr>
|
966
|
-
<td>
|
967
|
-
<pre class="lines">
|
968
|
-
|
969
|
-
|
970
|
-
333
|
971
|
-
334
|
972
|
-
335
|
973
|
-
336
|
974
|
-
337</pre>
|
975
|
-
</td>
|
976
|
-
<td>
|
977
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 333</span>
|
978
|
-
|
979
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>click_count:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
980
|
-
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
981
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='label'>delay:</span> <span class='id identifier rubyid_delay'>delay</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='id identifier rubyid_button'>button</span><span class='comma'>,</span> <span class='label'>click_count:</span> <span class='id identifier rubyid_click_count'>click_count</span><span class='rparen'>)</span>
|
982
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
983
|
-
<span class='kw'>end</span></pre>
|
984
|
-
</td>
|
985
|
-
</tr>
|
986
|
-
</table>
|
987
|
-
</div>
|
988
|
-
|
989
|
-
<div class="method_details ">
|
990
|
-
<h3 class="signature " id="context=-instance_method">
|
991
|
-
|
992
|
-
#<strong>context=</strong>(context) ⇒ <tt>Object</tt>
|
993
|
-
|
994
|
-
|
995
|
-
|
996
|
-
|
997
|
-
|
998
|
-
</h3><div class="docstring">
|
999
|
-
<div class="discussion">
|
1000
|
-
|
1001
|
-
|
1002
|
-
</div>
|
1003
|
-
</div>
|
1004
|
-
<div class="tags">
|
1005
|
-
<p class="tag_title">Parameters:</p>
|
1006
|
-
<ul class="param">
|
1007
|
-
|
1008
|
-
<li>
|
1009
|
-
|
1010
|
-
<span class='name'>context</span>
|
1011
|
-
|
1012
|
-
|
1013
|
-
<span class='type'>(<tt>?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ExecutionContext.html" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span></tt>)</span>
|
1014
|
-
|
1015
|
-
|
1016
|
-
|
1017
|
-
</li>
|
1018
|
-
|
1019
|
-
</ul>
|
1020
|
-
|
1021
|
-
|
1022
|
-
</div><table class="source_code">
|
1023
|
-
<tr>
|
1024
|
-
<td>
|
1025
|
-
<pre class="lines">
|
1026
|
-
|
1027
|
-
|
1028
|
-
28
|
1029
|
-
29
|
1030
|
-
30
|
1031
|
-
31
|
1032
|
-
32
|
1033
|
-
33
|
1034
|
-
34
|
1035
|
-
35
|
1036
|
-
36
|
1037
|
-
37
|
1038
|
-
38
|
1039
|
-
39
|
1040
|
-
40
|
1041
|
-
41
|
1042
|
-
42
|
1043
|
-
43
|
1044
|
-
44
|
1045
|
-
45
|
1046
|
-
46
|
1047
|
-
47</pre>
|
1048
|
-
</td>
|
1049
|
-
<td>
|
1050
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 28</span>
|
1051
|
-
|
1052
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_context='>context=</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
1053
|
-
<span class='comment'># D, [2020-04-12T22:45:03.938754 #46154] DEBUG -- : RECV << {"method"=>"Runtime.executionContextCreated", "params"=>{"context"=>{"id"=>3, "origin"=>"https://github.com", "name"=>"", "auxData"=>{"isDefault"=>true, "type"=>"default", "frameId"=>"3AD7F1E82BCBA88BFE31D03BC49FF6CB"}}}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
1054
|
-
</span> <span class='comment'># D, [2020-04-12T22:45:03.938856 #46154] DEBUG -- : RECV << {"method"=>"Runtime.executionContextCreated", "params"=>{"context"=>{"id"=>4, "origin"=>"://", "name"=>"__puppeteer_utility_world__", "auxData"=>{"isDefault"=>false, "type"=>"isolated", "frameId"=>"3AD7F1E82BCBA88BFE31D03BC49FF6CB"}}}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
1055
|
-
</span> <span class='comment'># D, [2020-04-12T22:45:03.938960 #46154] DEBUG -- : RECV << {"method"=>"Runtime.executionContextDestroyed", "params"=>{"executionContextId"=>1}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
1056
|
-
</span> <span class='comment'># D, [2020-04-12T22:45:03.939110 #46154] DEBUG -- : RECV << {"method"=>"Page.frameNavigated", "params"=>{"frame"=>{"id"=>"3AD7F1E82BCBA88BFE31D03BC49FF6CB", "loaderId"=>"301B349884E582986C502CBE020966DF", "url"=>"https://github.com/", "securityOrigin"=>"https://github.com", "mimeType"=>"text/html"}}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
1057
|
-
</span> <span class='comment'># D, [2020-04-12T22:45:03.939793 #46154] DEBUG -- : RECV << {"method"=>"Runtime.executionContextDestroyed", "params"=>{"executionContextId"=>2}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
1058
|
-
</span> <span class='comment'># executionContextDestroyed is often notified after executionContextCreated.
|
1059
|
-
</span>
|
1060
|
-
<span class='kw'>if</span> <span class='id identifier rubyid_context'>context</span>
|
1061
|
-
<span class='kw'>if</span> <span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfilled?'>fulfilled?</span>
|
1062
|
-
<span class='ivar'>@pending_destroy</span> <span class='op'><<</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid__context_id'>_context_id</span>
|
1063
|
-
<span class='ivar'>@document</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1064
|
-
<span class='ivar'>@context_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>
|
1065
|
-
<span class='kw'>end</span>
|
1066
|
-
<span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
1067
|
-
<span class='ivar'>@wait_tasks</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:async_rerun</span><span class='rparen'>)</span>
|
1068
|
-
<span class='kw'>else</span>
|
1069
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>context should now be nil. Use #delete_context for clearing document.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1070
|
-
<span class='kw'>end</span>
|
1071
|
-
<span class='kw'>end</span></pre>
|
1072
|
-
</td>
|
1073
|
-
</tr>
|
1074
|
-
</table>
|
1075
|
-
</div>
|
1076
|
-
|
1077
|
-
<div class="method_details ">
|
1078
|
-
<h3 class="signature " id="delete_context-instance_method">
|
1079
|
-
|
1080
|
-
#<strong>delete_context</strong>(execution_context_id) ⇒ <tt>Object</tt>
|
1081
|
-
|
1082
|
-
|
1083
|
-
|
1084
|
-
|
1085
|
-
|
1086
|
-
</h3><table class="source_code">
|
1087
|
-
<tr>
|
1088
|
-
<td>
|
1089
|
-
<pre class="lines">
|
1090
|
-
|
1091
|
-
|
1092
|
-
49
|
1093
|
-
50
|
1094
|
-
51
|
1095
|
-
52
|
1096
|
-
53
|
1097
|
-
54
|
1098
|
-
55
|
1099
|
-
56</pre>
|
1100
|
-
</td>
|
1101
|
-
<td>
|
1102
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 49</span>
|
1103
|
-
|
1104
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_delete_context'>delete_context</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context_id'>execution_context_id</span><span class='rparen'>)</span>
|
1105
|
-
<span class='kw'>if</span> <span class='ivar'>@pending_destroy</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context_id'>execution_context_id</span><span class='rparen'>)</span>
|
1106
|
-
<span class='ivar'>@pending_destroy</span><span class='period'>.</span><span class='id identifier rubyid_delete'>delete</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context_id'>execution_context_id</span><span class='rparen'>)</span>
|
1107
|
-
<span class='kw'>else</span>
|
1108
|
-
<span class='ivar'>@document</span> <span class='op'>=</span> <span class='kw'>nil</span>
|
1109
|
-
<span class='ivar'>@context_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>
|
1110
|
-
<span class='kw'>end</span>
|
1111
|
-
<span class='kw'>end</span></pre>
|
1112
|
-
</td>
|
1113
|
-
</tr>
|
1114
|
-
</table>
|
1115
|
-
</div>
|
1116
|
-
|
1117
|
-
<div class="method_details ">
|
1118
|
-
<h3 class="signature " id="detach-instance_method">
|
1119
|
-
|
1120
|
-
#<strong>detach</strong> ⇒ <tt>Object</tt>
|
1121
|
-
|
1122
|
-
|
1123
|
-
|
1124
|
-
|
1125
|
-
|
1126
|
-
</h3><table class="source_code">
|
1127
|
-
<tr>
|
1128
|
-
<td>
|
1129
|
-
<pre class="lines">
|
1130
|
-
|
1131
|
-
|
1132
|
-
62
|
1133
|
-
63
|
1134
|
-
64
|
1135
|
-
65
|
1136
|
-
66
|
1137
|
-
67</pre>
|
1138
|
-
</td>
|
1139
|
-
<td>
|
1140
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 62</span>
|
1141
|
-
|
1142
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_detach'>detach</span>
|
1143
|
-
<span class='ivar'>@detached</span> <span class='op'>=</span> <span class='kw'>true</span>
|
1144
|
-
<span class='ivar'>@wait_tasks</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_wait_task'>wait_task</span><span class='op'>|</span>
|
1145
|
-
<span class='id identifier rubyid_wait_task'>wait_task</span><span class='period'>.</span><span class='id identifier rubyid_terminate'>terminate</span><span class='lparen'>(</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="WaitTask.html" title="Puppeteer::WaitTask (class)">WaitTask</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="WaitTask/TerminatedError.html" title="Puppeteer::WaitTask::TerminatedError (class)">TerminatedError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WaitTask.html#initialize-instance_method" title="Puppeteer::WaitTask#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>waitForFunction failed: frame got detached.</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
|
1146
|
-
<span class='kw'>end</span>
|
1147
|
-
<span class='kw'>end</span></pre>
|
1148
|
-
</td>
|
1149
|
-
</tr>
|
1150
|
-
</table>
|
1151
|
-
</div>
|
1152
|
-
|
1153
|
-
<div class="method_details ">
|
1154
|
-
<h3 class="signature " id="evaluate-instance_method">
|
1155
|
-
|
1156
|
-
#<strong>evaluate</strong>(page_function, *args) ⇒ <tt>!Promise<*></tt>
|
1157
|
-
|
1158
|
-
|
1159
|
-
|
1160
|
-
|
1161
|
-
|
1162
|
-
</h3><div class="docstring">
|
1163
|
-
<div class="discussion">
|
1164
|
-
|
1165
|
-
|
1166
|
-
</div>
|
1167
|
-
</div>
|
1168
|
-
<div class="tags">
|
1169
|
-
<p class="tag_title">Parameters:</p>
|
1170
|
-
<ul class="param">
|
1171
|
-
|
1172
|
-
<li>
|
1173
|
-
|
1174
|
-
<span class='name'>pageFunction</span>
|
1175
|
-
|
1176
|
-
|
1177
|
-
<span class='type'>(<tt>Function|string</tt>)</span>
|
1178
|
-
|
1179
|
-
|
1180
|
-
|
1181
|
-
</li>
|
1182
|
-
|
1183
|
-
<li>
|
1184
|
-
|
1185
|
-
<span class='name'>args</span>
|
1186
|
-
|
1187
|
-
|
1188
|
-
<span class='type'>(<tt>!Array<*></tt>)</span>
|
1189
|
-
|
1190
|
-
|
1191
|
-
|
1192
|
-
</li>
|
1193
|
-
|
1194
|
-
</ul>
|
1195
|
-
|
1196
|
-
<p class="tag_title">Returns:</p>
|
1197
|
-
<ul class="return">
|
1198
|
-
|
1199
|
-
<li>
|
1200
|
-
|
1201
|
-
|
1202
|
-
<span class='type'>(<tt>!Promise<*></tt>)</span>
|
1203
|
-
|
1204
|
-
|
1205
|
-
|
1206
|
-
</li>
|
1207
|
-
|
1208
|
-
</ul>
|
1209
|
-
|
1210
|
-
</div><table class="source_code">
|
1211
|
-
<tr>
|
1212
|
-
<td>
|
1213
|
-
<pre class="lines">
|
1214
|
-
|
1215
|
-
|
1216
|
-
89
|
1217
|
-
90
|
1218
|
-
91</pre>
|
1219
|
-
</td>
|
1220
|
-
<td>
|
1221
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 89</span>
|
1222
|
-
|
1223
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1224
|
-
<span class='id identifier rubyid_execution_context'>execution_context</span><span class='period'>.</span><span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1225
|
-
<span class='kw'>end</span></pre>
|
1226
|
-
</td>
|
1227
|
-
</tr>
|
1228
|
-
</table>
|
1229
|
-
</div>
|
1230
|
-
|
1231
|
-
<div class="method_details ">
|
1232
|
-
<h3 class="signature " id="evaluate_handle-instance_method">
|
1233
|
-
|
1234
|
-
#<strong>evaluate_handle</strong>(page_function, *args) ⇒ <tt>!Promise<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span>></tt>
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1238
|
-
|
1239
|
-
|
1240
|
-
</h3><div class="docstring">
|
1241
|
-
<div class="discussion">
|
1242
|
-
|
1243
|
-
|
1244
|
-
</div>
|
1245
|
-
</div>
|
1246
|
-
<div class="tags">
|
1247
|
-
<p class="tag_title">Parameters:</p>
|
1248
|
-
<ul class="param">
|
1249
|
-
|
1250
|
-
<li>
|
1251
|
-
|
1252
|
-
<span class='name'>pageFunction</span>
|
1253
|
-
|
1254
|
-
|
1255
|
-
<span class='type'>(<tt>Function|string</tt>)</span>
|
1256
|
-
|
1257
|
-
|
1258
|
-
|
1259
|
-
</li>
|
1260
|
-
|
1261
|
-
<li>
|
1262
|
-
|
1263
|
-
<span class='name'>args</span>
|
1264
|
-
|
1265
|
-
|
1266
|
-
<span class='type'>(<tt>!Array<*></tt>)</span>
|
1267
|
-
|
1268
|
-
|
1269
|
-
|
1270
|
-
</li>
|
1271
|
-
|
1272
|
-
</ul>
|
1273
|
-
|
1274
|
-
<p class="tag_title">Returns:</p>
|
1275
|
-
<ul class="return">
|
1276
|
-
|
1277
|
-
<li>
|
1278
|
-
|
1279
|
-
|
1280
|
-
<span class='type'>(<tt>!Promise<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span>></tt>)</span>
|
1281
|
-
|
1282
|
-
|
1283
|
-
|
1284
|
-
</li>
|
1285
|
-
|
1286
|
-
</ul>
|
1287
|
-
|
1288
|
-
</div><table class="source_code">
|
1289
|
-
<tr>
|
1290
|
-
<td>
|
1291
|
-
<pre class="lines">
|
1292
|
-
|
1293
|
-
|
1294
|
-
82
|
1295
|
-
83
|
1296
|
-
84</pre>
|
1297
|
-
</td>
|
1298
|
-
<td>
|
1299
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 82</span>
|
1300
|
-
|
1301
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1302
|
-
<span class='id identifier rubyid_execution_context'>execution_context</span><span class='period'>.</span><span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1303
|
-
<span class='kw'>end</span></pre>
|
1304
|
-
</td>
|
1305
|
-
</tr>
|
1306
|
-
</table>
|
1307
|
-
</div>
|
1308
|
-
|
1309
|
-
<div class="method_details ">
|
1310
|
-
<h3 class="signature " id="execution_context-instance_method">
|
1311
|
-
|
1312
|
-
#<strong>execution_context</strong> ⇒ <tt>!Promise<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ExecutionContext.html" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span>></tt>
|
1313
|
-
|
1314
|
-
|
1315
|
-
|
1316
|
-
|
1317
|
-
|
1318
|
-
</h3><div class="docstring">
|
1319
|
-
<div class="discussion">
|
1320
|
-
|
1321
|
-
|
1322
|
-
</div>
|
1323
|
-
</div>
|
1324
|
-
<div class="tags">
|
1325
|
-
|
1326
|
-
<p class="tag_title">Returns:</p>
|
1327
|
-
<ul class="return">
|
1328
|
-
|
1329
|
-
<li>
|
1330
|
-
|
1331
|
-
|
1332
|
-
<span class='type'>(<tt>!Promise<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ExecutionContext.html" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span>></tt>)</span>
|
1333
|
-
|
1334
|
-
|
1335
|
-
|
1336
|
-
</li>
|
1337
|
-
|
1338
|
-
</ul>
|
1339
|
-
|
1340
|
-
</div><table class="source_code">
|
1341
|
-
<tr>
|
1342
|
-
<td>
|
1343
|
-
<pre class="lines">
|
1344
|
-
|
1345
|
-
|
1346
|
-
72
|
1347
|
-
73
|
1348
|
-
74
|
1349
|
-
75
|
1350
|
-
76
|
1351
|
-
77</pre>
|
1352
|
-
</td>
|
1353
|
-
<td>
|
1354
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 72</span>
|
1355
|
-
|
1356
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_execution_context'>execution_context</span>
|
1357
|
-
<span class='kw'>if</span> <span class='ivar'>@detached</span>
|
1358
|
-
<span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="DOMWorld/DetachedError.html" title="Puppeteer::DOMWorld::DetachedError (class)">DetachedError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::DOMWorld#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>Execution Context is not available in detached frame \"</span><span class='embexpr_beg'>#{</span><span class='ivar'>@frame</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" (are you trying to evaluate?)</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1359
|
-
<span class='kw'>end</span>
|
1360
|
-
<span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_value!'>value!</span>
|
1361
|
-
<span class='kw'>end</span></pre>
|
1362
|
-
</td>
|
1363
|
-
</tr>
|
1364
|
-
</table>
|
1365
|
-
</div>
|
1366
|
-
|
1367
|
-
<div class="method_details ">
|
1368
|
-
<h3 class="signature " id="has_context?-instance_method">
|
1369
|
-
|
1370
|
-
#<strong>has_context?</strong> ⇒ <tt>Boolean</tt>
|
1371
|
-
|
1372
|
-
|
1373
|
-
|
1374
|
-
|
1375
|
-
|
1376
|
-
</h3><div class="docstring">
|
1377
|
-
<div class="discussion">
|
1378
|
-
|
1379
|
-
|
1380
|
-
</div>
|
1381
|
-
</div>
|
1382
|
-
<div class="tags">
|
1383
|
-
|
1384
|
-
<p class="tag_title">Returns:</p>
|
1385
|
-
<ul class="return">
|
1386
|
-
|
1387
|
-
<li>
|
1388
|
-
|
1389
|
-
|
1390
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
1391
|
-
|
1392
|
-
|
1393
|
-
|
1394
|
-
</li>
|
1395
|
-
|
1396
|
-
</ul>
|
1397
|
-
|
1398
|
-
</div><table class="source_code">
|
1399
|
-
<tr>
|
1400
|
-
<td>
|
1401
|
-
<pre class="lines">
|
1402
|
-
|
1403
|
-
|
1404
|
-
58
|
1405
|
-
59
|
1406
|
-
60</pre>
|
1407
|
-
</td>
|
1408
|
-
<td>
|
1409
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 58</span>
|
1410
|
-
|
1411
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_has_context?'>has_context?</span>
|
1412
|
-
<span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_resolved?'>resolved?</span>
|
1413
|
-
<span class='kw'>end</span></pre>
|
1414
|
-
</td>
|
1415
|
-
</tr>
|
1416
|
-
</table>
|
1417
|
-
</div>
|
1418
|
-
|
1419
|
-
<div class="method_details ">
|
1420
|
-
<h3 class="signature " id="S-instance_method">
|
1421
|
-
|
1422
|
-
#<strong>S</strong>(selector) ⇒ <tt>!Promise<?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>></tt>
|
1423
|
-
|
1424
|
-
|
1425
|
-
|
1426
|
-
|
1427
|
-
|
1428
|
-
</h3><div class="docstring">
|
1429
|
-
<div class="discussion">
|
1430
|
-
|
1431
|
-
<p>`$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
|
1432
|
-
|
1433
|
-
|
1434
|
-
</div>
|
1435
|
-
</div>
|
1436
|
-
<div class="tags">
|
1437
|
-
<p class="tag_title">Parameters:</p>
|
1438
|
-
<ul class="param">
|
1439
|
-
|
1440
|
-
<li>
|
1441
|
-
|
1442
|
-
<span class='name'>selector</span>
|
1443
|
-
|
1444
|
-
|
1445
|
-
<span class='type'>(<tt>string</tt>)</span>
|
1446
|
-
|
1447
|
-
|
1448
|
-
|
1449
|
-
</li>
|
1450
|
-
|
1451
|
-
</ul>
|
1452
|
-
|
1453
|
-
<p class="tag_title">Returns:</p>
|
1454
|
-
<ul class="return">
|
1455
|
-
|
1456
|
-
<li>
|
1457
|
-
|
1458
|
-
|
1459
|
-
<span class='type'>(<tt>!Promise<?<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>></tt>)</span>
|
1460
|
-
|
1461
|
-
|
1462
|
-
|
1463
|
-
</li>
|
1464
|
-
|
1465
|
-
</ul>
|
1466
|
-
|
1467
|
-
</div><table class="source_code">
|
1468
|
-
<tr>
|
1469
|
-
<td>
|
1470
|
-
<pre class="lines">
|
1471
|
-
|
1472
|
-
|
1473
|
-
96
|
1474
|
-
97
|
1475
|
-
98</pre>
|
1476
|
-
</td>
|
1477
|
-
<td>
|
1478
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 96</span>
|
1479
|
-
|
1480
|
-
<span class='kw'>def</span> <span class='const'>S</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1481
|
-
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>S</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1482
|
-
<span class='kw'>end</span></pre>
|
1483
|
-
</td>
|
1484
|
-
</tr>
|
1485
|
-
</table>
|
1486
|
-
</div>
|
1487
|
-
|
1488
|
-
<div class="method_details ">
|
1489
|
-
<h3 class="signature " id="select-instance_method">
|
1490
|
-
|
1491
|
-
#<strong>select</strong>(selector, *values) ⇒ <tt>Array<String></tt>
|
1492
|
-
|
1493
|
-
|
1494
|
-
|
1495
|
-
|
1496
|
-
|
1497
|
-
</h3><div class="docstring">
|
1498
|
-
<div class="discussion">
|
1499
|
-
|
1500
|
-
|
1501
|
-
</div>
|
1502
|
-
</div>
|
1503
|
-
<div class="tags">
|
1504
|
-
<p class="tag_title">Parameters:</p>
|
1505
|
-
<ul class="param">
|
1506
|
-
|
1507
|
-
<li>
|
1508
|
-
|
1509
|
-
<span class='name'>selector</span>
|
1510
|
-
|
1511
|
-
|
1512
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1513
|
-
|
1514
|
-
|
1515
|
-
|
1516
|
-
</li>
|
1517
|
-
|
1518
|
-
</ul>
|
1519
|
-
|
1520
|
-
<p class="tag_title">Returns:</p>
|
1521
|
-
<ul class="return">
|
1522
|
-
|
1523
|
-
<li>
|
1524
|
-
|
1525
|
-
|
1526
|
-
<span class='type'>(<tt>Array<String></tt>)</span>
|
1527
|
-
|
1528
|
-
|
1529
|
-
|
1530
|
-
</li>
|
1531
|
-
|
1532
|
-
</ul>
|
1533
|
-
|
1534
|
-
</div><table class="source_code">
|
1535
|
-
<tr>
|
1536
|
-
<td>
|
1537
|
-
<pre class="lines">
|
1538
|
-
|
1539
|
-
|
1540
|
-
361
|
1541
|
-
362
|
1542
|
-
363
|
1543
|
-
364
|
1544
|
-
365
|
1545
|
-
366
|
1546
|
-
367</pre>
|
1547
|
-
</td>
|
1548
|
-
<td>
|
1549
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 361</span>
|
1550
|
-
|
1551
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1552
|
-
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1553
|
-
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1554
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
1555
|
-
|
1556
|
-
<span class='id identifier rubyid_result'>result</span>
|
1557
|
-
<span class='kw'>end</span></pre>
|
1558
|
-
</td>
|
1559
|
-
</tr>
|
1560
|
-
</table>
|
1561
|
-
</div>
|
1562
|
-
|
1563
|
-
<div class="method_details ">
|
1564
|
-
<h3 class="signature " id="Seval-instance_method">
|
1565
|
-
|
1566
|
-
#<strong>Seval</strong>(selector, page_function, *args) ⇒ <tt>!Promise<(!Object|undefined)></tt>
|
1567
|
-
|
1568
|
-
|
1569
|
-
|
1570
|
-
|
1571
|
-
|
1572
|
-
</h3><div class="docstring">
|
1573
|
-
<div class="discussion">
|
1574
|
-
|
1575
|
-
<p>`$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
|
1576
|
-
|
1577
|
-
|
1578
|
-
</div>
|
1579
|
-
</div>
|
1580
|
-
<div class="tags">
|
1581
|
-
<p class="tag_title">Parameters:</p>
|
1582
|
-
<ul class="param">
|
1583
|
-
|
1584
|
-
<li>
|
1585
|
-
|
1586
|
-
<span class='name'>selector</span>
|
1587
|
-
|
1588
|
-
|
1589
|
-
<span class='type'>(<tt>string</tt>)</span>
|
1590
|
-
|
1591
|
-
|
1592
|
-
|
1593
|
-
</li>
|
1594
|
-
|
1595
|
-
<li>
|
1596
|
-
|
1597
|
-
<span class='name'>pageFunction</span>
|
1598
|
-
|
1599
|
-
|
1600
|
-
<span class='type'>(<tt>Function|string</tt>)</span>
|
1601
|
-
|
1602
|
-
|
1603
|
-
|
1604
|
-
</li>
|
1605
|
-
|
1606
|
-
<li>
|
1607
|
-
|
1608
|
-
<span class='name'>args</span>
|
1609
|
-
|
1610
|
-
|
1611
|
-
<span class='type'>(<tt>!Array<*></tt>)</span>
|
1612
|
-
|
1613
|
-
|
1614
|
-
|
1615
|
-
</li>
|
1616
|
-
|
1617
|
-
</ul>
|
1618
|
-
|
1619
|
-
<p class="tag_title">Returns:</p>
|
1620
|
-
<ul class="return">
|
1621
|
-
|
1622
|
-
<li>
|
1623
|
-
|
1624
|
-
|
1625
|
-
<span class='type'>(<tt>!Promise<(!Object|undefined)></tt>)</span>
|
1626
|
-
|
1627
|
-
|
1628
|
-
|
1629
|
-
</li>
|
1630
|
-
|
1631
|
-
</ul>
|
1632
|
-
|
1633
|
-
</div><table class="source_code">
|
1634
|
-
<tr>
|
1635
|
-
<td>
|
1636
|
-
<pre class="lines">
|
1637
|
-
|
1638
|
-
|
1639
|
-
130
|
1640
|
-
131
|
1641
|
-
132</pre>
|
1642
|
-
</td>
|
1643
|
-
<td>
|
1644
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 130</span>
|
1645
|
-
|
1646
|
-
<span class='kw'>def</span> <span class='const'>Seval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1647
|
-
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>Seval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1648
|
-
<span class='kw'>end</span></pre>
|
1649
|
-
</td>
|
1650
|
-
</tr>
|
1651
|
-
</table>
|
1652
|
-
</div>
|
1653
|
-
|
1654
|
-
<div class="method_details ">
|
1655
|
-
<h3 class="signature " id="SS-instance_method">
|
1656
|
-
|
1657
|
-
#<strong>SS</strong>(selector) ⇒ <tt>!Promise<!Array<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>>></tt>
|
1658
|
-
|
1659
|
-
|
1660
|
-
|
1661
|
-
|
1662
|
-
|
1663
|
-
</h3><div class="docstring">
|
1664
|
-
<div class="discussion">
|
1665
|
-
|
1666
|
-
<p>`$$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
|
1667
|
-
|
1668
|
-
|
1669
|
-
</div>
|
1670
|
-
</div>
|
1671
|
-
<div class="tags">
|
1672
|
-
<p class="tag_title">Parameters:</p>
|
1673
|
-
<ul class="param">
|
1674
|
-
|
1675
|
-
<li>
|
1676
|
-
|
1677
|
-
<span class='name'>selector</span>
|
1678
|
-
|
1679
|
-
|
1680
|
-
<span class='type'>(<tt>string</tt>)</span>
|
1681
|
-
|
1682
|
-
|
1683
|
-
|
1684
|
-
</li>
|
1685
|
-
|
1686
|
-
</ul>
|
1687
|
-
|
1688
|
-
<p class="tag_title">Returns:</p>
|
1689
|
-
<ul class="return">
|
1690
|
-
|
1691
|
-
<li>
|
1692
|
-
|
1693
|
-
|
1694
|
-
<span class='type'>(<tt>!Promise<!Array<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>>></tt>)</span>
|
1695
|
-
|
1696
|
-
|
1697
|
-
|
1698
|
-
</li>
|
1699
|
-
|
1700
|
-
</ul>
|
1701
|
-
|
1702
|
-
</div><table class="source_code">
|
1703
|
-
<tr>
|
1704
|
-
<td>
|
1705
|
-
<pre class="lines">
|
1706
|
-
|
1707
|
-
|
1708
|
-
146
|
1709
|
-
147
|
1710
|
-
148</pre>
|
1711
|
-
</td>
|
1712
|
-
<td>
|
1713
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 146</span>
|
1714
|
-
|
1715
|
-
<span class='kw'>def</span> <span class='const'>SS</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1716
|
-
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>SS</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1717
|
-
<span class='kw'>end</span></pre>
|
1718
|
-
</td>
|
1719
|
-
</tr>
|
1720
|
-
</table>
|
1721
|
-
</div>
|
1722
|
-
|
1723
|
-
<div class="method_details ">
|
1724
|
-
<h3 class="signature " id="SSeval-instance_method">
|
1725
|
-
|
1726
|
-
#<strong>SSeval</strong>(selector, page_function, *args) ⇒ <tt>!Promise<(!Object|undefined)></tt>
|
1727
|
-
|
1728
|
-
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1732
|
-
</h3><div class="docstring">
|
1733
|
-
<div class="discussion">
|
1734
|
-
|
1735
|
-
<p>`$$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
|
1736
|
-
|
1737
|
-
|
1738
|
-
</div>
|
1739
|
-
</div>
|
1740
|
-
<div class="tags">
|
1741
|
-
<p class="tag_title">Parameters:</p>
|
1742
|
-
<ul class="param">
|
1743
|
-
|
1744
|
-
<li>
|
1745
|
-
|
1746
|
-
<span class='name'>selector</span>
|
1747
|
-
|
1748
|
-
|
1749
|
-
<span class='type'>(<tt>string</tt>)</span>
|
1750
|
-
|
1751
|
-
|
1752
|
-
|
1753
|
-
</li>
|
1754
|
-
|
1755
|
-
<li>
|
1756
|
-
|
1757
|
-
<span class='name'>pageFunction</span>
|
1758
|
-
|
1759
|
-
|
1760
|
-
<span class='type'>(<tt>Function|string</tt>)</span>
|
1761
|
-
|
1762
|
-
|
1763
|
-
|
1764
|
-
</li>
|
1765
|
-
|
1766
|
-
<li>
|
1767
|
-
|
1768
|
-
<span class='name'>args</span>
|
1769
|
-
|
1770
|
-
|
1771
|
-
<span class='type'>(<tt>!Array<*></tt>)</span>
|
1772
|
-
|
1773
|
-
|
1774
|
-
|
1775
|
-
</li>
|
1776
|
-
|
1777
|
-
</ul>
|
1778
|
-
|
1779
|
-
<p class="tag_title">Returns:</p>
|
1780
|
-
<ul class="return">
|
1781
|
-
|
1782
|
-
<li>
|
1783
|
-
|
1784
|
-
|
1785
|
-
<span class='type'>(<tt>!Promise<(!Object|undefined)></tt>)</span>
|
1786
|
-
|
1787
|
-
|
1788
|
-
|
1789
|
-
</li>
|
1790
|
-
|
1791
|
-
</ul>
|
1792
|
-
|
1793
|
-
</div><table class="source_code">
|
1794
|
-
<tr>
|
1795
|
-
<td>
|
1796
|
-
<pre class="lines">
|
1797
|
-
|
1798
|
-
|
1799
|
-
139
|
1800
|
-
140
|
1801
|
-
141</pre>
|
1802
|
-
</td>
|
1803
|
-
<td>
|
1804
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 139</span>
|
1805
|
-
|
1806
|
-
<span class='kw'>def</span> <span class='const'>SSeval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1807
|
-
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>SSeval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1808
|
-
<span class='kw'>end</span></pre>
|
1809
|
-
</td>
|
1810
|
-
</tr>
|
1811
|
-
</table>
|
1812
|
-
</div>
|
1813
|
-
|
1814
|
-
<div class="method_details ">
|
1815
|
-
<h3 class="signature " id="Sx-instance_method">
|
1816
|
-
|
1817
|
-
#<strong>Sx</strong>(expression) ⇒ <tt>!Promise<!Array<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>>></tt>
|
1818
|
-
|
1819
|
-
|
1820
|
-
|
1821
|
-
|
1822
|
-
|
1823
|
-
</h3><div class="docstring">
|
1824
|
-
<div class="discussion">
|
1825
|
-
|
1826
|
-
<p>`$x()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
|
1827
|
-
|
1828
|
-
|
1829
|
-
</div>
|
1830
|
-
</div>
|
1831
|
-
<div class="tags">
|
1832
|
-
<p class="tag_title">Parameters:</p>
|
1833
|
-
<ul class="param">
|
1834
|
-
|
1835
|
-
<li>
|
1836
|
-
|
1837
|
-
<span class='name'>expression</span>
|
1838
|
-
|
1839
|
-
|
1840
|
-
<span class='type'>(<tt>string</tt>)</span>
|
1841
|
-
|
1842
|
-
|
1843
|
-
|
1844
|
-
</li>
|
1845
|
-
|
1846
|
-
</ul>
|
1847
|
-
|
1848
|
-
<p class="tag_title">Returns:</p>
|
1849
|
-
<ul class="return">
|
1850
|
-
|
1851
|
-
<li>
|
1852
|
-
|
1853
|
-
|
1854
|
-
<span class='type'>(<tt>!Promise<!Array<!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span>>></tt>)</span>
|
1855
|
-
|
1856
|
-
|
1857
|
-
|
1858
|
-
</li>
|
1859
|
-
|
1860
|
-
</ul>
|
1861
|
-
|
1862
|
-
</div><table class="source_code">
|
1863
|
-
<tr>
|
1864
|
-
<td>
|
1865
|
-
<pre class="lines">
|
1866
|
-
|
1867
|
-
|
1868
|
-
121
|
1869
|
-
122
|
1870
|
-
123</pre>
|
1871
|
-
</td>
|
1872
|
-
<td>
|
1873
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 121</span>
|
1874
|
-
|
1875
|
-
<span class='kw'>def</span> <span class='const'>Sx</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
1876
|
-
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>Sx</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
1877
|
-
<span class='kw'>end</span></pre>
|
1878
|
-
</td>
|
1879
|
-
</tr>
|
1880
|
-
</table>
|
1881
|
-
</div>
|
1882
|
-
|
1883
|
-
<div class="method_details ">
|
1884
|
-
<h3 class="signature " id="tap-instance_method">
|
1885
|
-
|
1886
|
-
#<strong>tap</strong>(selector) ⇒ <tt>Object</tt>
|
1887
|
-
|
1888
|
-
|
1889
|
-
|
1890
|
-
|
1891
|
-
|
1892
|
-
</h3><div class="docstring">
|
1893
|
-
<div class="discussion">
|
1894
|
-
|
1895
|
-
|
1896
|
-
</div>
|
1897
|
-
</div>
|
1898
|
-
<div class="tags">
|
1899
|
-
<p class="tag_title">Parameters:</p>
|
1900
|
-
<ul class="param">
|
1901
|
-
|
1902
|
-
<li>
|
1903
|
-
|
1904
|
-
<span class='name'>selector</span>
|
1905
|
-
|
1906
|
-
|
1907
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1908
|
-
|
1909
|
-
|
1910
|
-
|
1911
|
-
</li>
|
1912
|
-
|
1913
|
-
</ul>
|
1914
|
-
|
1915
|
-
|
1916
|
-
</div><table class="source_code">
|
1917
|
-
<tr>
|
1918
|
-
<td>
|
1919
|
-
<pre class="lines">
|
1920
|
-
|
1921
|
-
|
1922
|
-
370
|
1923
|
-
371
|
1924
|
-
372
|
1925
|
-
373
|
1926
|
-
374</pre>
|
1927
|
-
</td>
|
1928
|
-
<td>
|
1929
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 370</span>
|
1930
|
-
|
1931
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_tap'>tap</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1932
|
-
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1933
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span>
|
1934
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
1935
|
-
<span class='kw'>end</span></pre>
|
1936
|
-
</td>
|
1937
|
-
</tr>
|
1938
|
-
</table>
|
1939
|
-
</div>
|
1940
|
-
|
1941
|
-
<div class="method_details ">
|
1942
|
-
<h3 class="signature " id="title-instance_method">
|
1943
|
-
|
1944
|
-
#<strong>title</strong> ⇒ <tt>String</tt>
|
1945
|
-
|
1946
|
-
|
1947
|
-
|
1948
|
-
|
1949
|
-
|
1950
|
-
</h3><div class="docstring">
|
1951
|
-
<div class="discussion">
|
1952
|
-
|
1953
|
-
|
1954
|
-
</div>
|
1955
|
-
</div>
|
1956
|
-
<div class="tags">
|
1957
|
-
|
1958
|
-
<p class="tag_title">Returns:</p>
|
1959
|
-
<ul class="return">
|
1960
|
-
|
1961
|
-
<li>
|
1962
|
-
|
1963
|
-
|
1964
|
-
<span class='type'>(<tt>String</tt>)</span>
|
1965
|
-
|
1966
|
-
|
1967
|
-
|
1968
|
-
</li>
|
1969
|
-
|
1970
|
-
</ul>
|
1971
|
-
|
1972
|
-
</div><table class="source_code">
|
1973
|
-
<tr>
|
1974
|
-
<td>
|
1975
|
-
<pre class="lines">
|
1976
|
-
|
1977
|
-
|
1978
|
-
415
|
1979
|
-
416
|
1980
|
-
417</pre>
|
1981
|
-
</td>
|
1982
|
-
<td>
|
1983
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 415</span>
|
1984
|
-
|
1985
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_title'>title</span>
|
1986
|
-
<span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>() => document.title</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
1987
|
-
<span class='kw'>end</span></pre>
|
1988
|
-
</td>
|
1989
|
-
</tr>
|
1990
|
-
</table>
|
1991
|
-
</div>
|
1992
|
-
|
1993
|
-
<div class="method_details ">
|
1994
|
-
<h3 class="signature " id="type_text-instance_method">
|
1995
|
-
|
1996
|
-
#<strong>type_text</strong>(selector, text, delay: nil) ⇒ <tt>Object</tt>
|
1997
|
-
|
1998
|
-
|
1999
|
-
|
2000
|
-
|
2001
|
-
|
2002
|
-
</h3><div class="docstring">
|
2003
|
-
<div class="discussion">
|
2004
|
-
|
2005
|
-
|
2006
|
-
</div>
|
2007
|
-
</div>
|
2008
|
-
<div class="tags">
|
2009
|
-
<p class="tag_title">Parameters:</p>
|
2010
|
-
<ul class="param">
|
2011
|
-
|
2012
|
-
<li>
|
2013
|
-
|
2014
|
-
<span class='name'>selector</span>
|
2015
|
-
|
2016
|
-
|
2017
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2018
|
-
|
2019
|
-
|
2020
|
-
|
2021
|
-
</li>
|
2022
|
-
|
2023
|
-
<li>
|
2024
|
-
|
2025
|
-
<span class='name'>text</span>
|
2026
|
-
|
2027
|
-
|
2028
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2029
|
-
|
2030
|
-
|
2031
|
-
|
2032
|
-
</li>
|
2033
|
-
|
2034
|
-
<li>
|
2035
|
-
|
2036
|
-
<span class='name'>delay</span>
|
2037
|
-
|
2038
|
-
|
2039
|
-
<span class='type'>(<tt>Number</tt>)</span>
|
2040
|
-
|
2041
|
-
|
2042
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2043
|
-
|
2044
|
-
|
2045
|
-
</li>
|
2046
|
-
|
2047
|
-
</ul>
|
2048
|
-
|
2049
|
-
|
2050
|
-
</div><table class="source_code">
|
2051
|
-
<tr>
|
2052
|
-
<td>
|
2053
|
-
<pre class="lines">
|
2054
|
-
|
2055
|
-
|
2056
|
-
379
|
2057
|
-
380
|
2058
|
-
381
|
2059
|
-
382
|
2060
|
-
383</pre>
|
2061
|
-
</td>
|
2062
|
-
<td>
|
2063
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 379</span>
|
2064
|
-
|
2065
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_type_text'>type_text</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2066
|
-
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
2067
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_type_text'>type_text</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='id identifier rubyid_delay'>delay</span><span class='rparen'>)</span>
|
2068
|
-
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
2069
|
-
<span class='kw'>end</span></pre>
|
2070
|
-
</td>
|
2071
|
-
</tr>
|
2072
|
-
</table>
|
2073
|
-
</div>
|
2074
|
-
|
2075
|
-
<div class="method_details ">
|
2076
|
-
<h3 class="signature " id="wait_for_selector-instance_method">
|
2077
|
-
|
2078
|
-
#<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) ⇒ <tt>Object</tt>
|
2079
|
-
|
2080
|
-
|
2081
|
-
|
2082
|
-
|
2083
|
-
|
2084
|
-
</h3><div class="docstring">
|
2085
|
-
<div class="discussion">
|
2086
|
-
|
2087
|
-
|
2088
|
-
</div>
|
2089
|
-
</div>
|
2090
|
-
<div class="tags">
|
2091
|
-
<p class="tag_title">Parameters:</p>
|
2092
|
-
<ul class="param">
|
2093
|
-
|
2094
|
-
<li>
|
2095
|
-
|
2096
|
-
<span class='name'>selector</span>
|
2097
|
-
|
2098
|
-
|
2099
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2100
|
-
|
2101
|
-
|
2102
|
-
|
2103
|
-
</li>
|
2104
|
-
|
2105
|
-
<li>
|
2106
|
-
|
2107
|
-
<span class='name'>visible</span>
|
2108
|
-
|
2109
|
-
|
2110
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
2111
|
-
|
2112
|
-
|
2113
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2114
|
-
|
2115
|
-
|
2116
|
-
—
|
2117
|
-
<div class='inline'>
|
2118
|
-
<p>Wait for element visible (not 'display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2119
|
-
</div>
|
2120
|
-
|
2121
|
-
</li>
|
2122
|
-
|
2123
|
-
<li>
|
2124
|
-
|
2125
|
-
<span class='name'>hidden</span>
|
2126
|
-
|
2127
|
-
|
2128
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
2129
|
-
|
2130
|
-
|
2131
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2132
|
-
|
2133
|
-
|
2134
|
-
—
|
2135
|
-
<div class='inline'>
|
2136
|
-
<p>Wait for element invisible ('display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2137
|
-
</div>
|
2138
|
-
|
2139
|
-
</li>
|
2140
|
-
|
2141
|
-
<li>
|
2142
|
-
|
2143
|
-
<span class='name'>timeout</span>
|
2144
|
-
|
2145
|
-
|
2146
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
2147
|
-
|
2148
|
-
|
2149
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2150
|
-
|
2151
|
-
|
2152
|
-
</li>
|
2153
|
-
|
2154
|
-
</ul>
|
2155
|
-
|
2156
|
-
|
2157
|
-
</div><table class="source_code">
|
2158
|
-
<tr>
|
2159
|
-
<td>
|
2160
|
-
<pre class="lines">
|
2161
|
-
|
2162
|
-
|
2163
|
-
389
|
2164
|
-
390
|
2165
|
-
391</pre>
|
2166
|
-
</td>
|
2167
|
-
<td>
|
2168
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 389</span>
|
2169
|
-
|
2170
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_selector'>wait_for_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2171
|
-
<span class='id identifier rubyid_wait_for_selector_or_xpath'>wait_for_selector_or_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='id identifier rubyid_visible'>visible</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='id identifier rubyid_hidden'>hidden</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
|
2172
|
-
<span class='kw'>end</span></pre>
|
2173
|
-
</td>
|
2174
|
-
</tr>
|
2175
|
-
</table>
|
2176
|
-
</div>
|
2177
|
-
|
2178
|
-
<div class="method_details ">
|
2179
|
-
<h3 class="signature " id="wait_for_xpath-instance_method">
|
2180
|
-
|
2181
|
-
#<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) ⇒ <tt>Object</tt>
|
2182
|
-
|
2183
|
-
|
2184
|
-
|
2185
|
-
|
2186
|
-
|
2187
|
-
</h3><div class="docstring">
|
2188
|
-
<div class="discussion">
|
2189
|
-
|
2190
|
-
|
2191
|
-
</div>
|
2192
|
-
</div>
|
2193
|
-
<div class="tags">
|
2194
|
-
<p class="tag_title">Parameters:</p>
|
2195
|
-
<ul class="param">
|
2196
|
-
|
2197
|
-
<li>
|
2198
|
-
|
2199
|
-
<span class='name'>xpath</span>
|
2200
|
-
|
2201
|
-
|
2202
|
-
<span class='type'>(<tt>String</tt>)</span>
|
2203
|
-
|
2204
|
-
|
2205
|
-
|
2206
|
-
</li>
|
2207
|
-
|
2208
|
-
<li>
|
2209
|
-
|
2210
|
-
<span class='name'>visible</span>
|
2211
|
-
|
2212
|
-
|
2213
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
2214
|
-
|
2215
|
-
|
2216
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2217
|
-
|
2218
|
-
|
2219
|
-
—
|
2220
|
-
<div class='inline'>
|
2221
|
-
<p>Wait for element visible (not 'display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2222
|
-
</div>
|
2223
|
-
|
2224
|
-
</li>
|
2225
|
-
|
2226
|
-
<li>
|
2227
|
-
|
2228
|
-
<span class='name'>hidden</span>
|
2229
|
-
|
2230
|
-
|
2231
|
-
<span class='type'>(<tt>Boolean</tt>)</span>
|
2232
|
-
|
2233
|
-
|
2234
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2235
|
-
|
2236
|
-
|
2237
|
-
—
|
2238
|
-
<div class='inline'>
|
2239
|
-
<p>Wait for element invisible ('display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2240
|
-
</div>
|
2241
|
-
|
2242
|
-
</li>
|
2243
|
-
|
2244
|
-
<li>
|
2245
|
-
|
2246
|
-
<span class='name'>timeout</span>
|
2247
|
-
|
2248
|
-
|
2249
|
-
<span class='type'>(<tt>Integer</tt>)</span>
|
2250
|
-
|
2251
|
-
|
2252
|
-
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2253
|
-
|
2254
|
-
|
2255
|
-
</li>
|
2256
|
-
|
2257
|
-
</ul>
|
2258
|
-
|
2259
|
-
|
2260
|
-
</div><table class="source_code">
|
2261
|
-
<tr>
|
2262
|
-
<td>
|
2263
|
-
<pre class="lines">
|
2264
|
-
|
2265
|
-
|
2266
|
-
397
|
2267
|
-
398
|
2268
|
-
399</pre>
|
2269
|
-
</td>
|
2270
|
-
<td>
|
2271
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 397</span>
|
2272
|
-
|
2273
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_xpath'>wait_for_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_xpath'>xpath</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2274
|
-
<span class='id identifier rubyid_wait_for_selector_or_xpath'>wait_for_selector_or_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_xpath'>xpath</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='id identifier rubyid_visible'>visible</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='id identifier rubyid_hidden'>hidden</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
|
2275
|
-
<span class='kw'>end</span></pre>
|
2276
|
-
</td>
|
2277
|
-
</tr>
|
2278
|
-
</table>
|
2279
|
-
</div>
|
2280
|
-
|
2281
|
-
</div>
|
2282
|
-
|
2283
|
-
</div>
|
2284
|
-
|
2285
|
-
<div id="footer">
|
2286
|
-
Generated on Wed Jun 24 03:08:00 2020 by
|
2287
|
-
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2288
|
-
0.9.24 (ruby-2.6.3).
|
2289
|
-
</div>
|
2290
|
-
|
2291
|
-
</div>
|
2292
|
-
</body>
|
2293
|
-
</html>
|