puppeteer-ruby 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +71 -0
- data/.github/stale.yml +16 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +302 -0
- data/.travis.yml +7 -0
- data/Dockerfile +6 -0
- data/Gemfile +6 -0
- data/README.md +54 -0
- data/Rakefile +1 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +15 -0
- data/docs/Puppeteer.html +2020 -0
- data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
- data/docs/Puppeteer/Browser.html +2148 -0
- data/docs/Puppeteer/BrowserContext.html +809 -0
- data/docs/Puppeteer/BrowserFetcher.html +214 -0
- data/docs/Puppeteer/BrowserRunner.html +914 -0
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
- data/docs/Puppeteer/CDPSession.html +813 -0
- data/docs/Puppeteer/CDPSession/Error.html +124 -0
- data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
- data/docs/Puppeteer/Connection.html +960 -0
- data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
- data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
- data/docs/Puppeteer/ConsoleMessage.html +565 -0
- data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
- data/docs/Puppeteer/DOMWorld.html +2219 -0
- data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
- data/docs/Puppeteer/DebugPrint.html +233 -0
- data/docs/Puppeteer/Device.html +470 -0
- data/docs/Puppeteer/Devices.html +139 -0
- data/docs/Puppeteer/ElementHandle.html +2542 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
- data/docs/Puppeteer/ElementHandle/Point.html +492 -0
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
- data/docs/Puppeteer/EmulationManager.html +454 -0
- data/docs/Puppeteer/EventCallbackable.html +433 -0
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
- data/docs/Puppeteer/ExecutionContext.html +998 -0
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
- data/docs/Puppeteer/FileChooser.html +455 -0
- data/docs/Puppeteer/Frame.html +3677 -0
- data/docs/Puppeteer/FrameManager.html +2410 -0
- data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
- data/docs/Puppeteer/IfPresent.html +222 -0
- data/docs/Puppeteer/JSHandle.html +1352 -0
- data/docs/Puppeteer/Keyboard.html +1557 -0
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
- data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
- data/docs/Puppeteer/Launcher.html +237 -0
- data/docs/Puppeteer/Launcher/Base.html +385 -0
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
- data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
- data/docs/Puppeteer/Launcher/Chrome.html +669 -0
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
- data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
- data/docs/Puppeteer/LifecycleWatcher.html +834 -0
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
- data/docs/Puppeteer/Mouse.html +1105 -0
- data/docs/Puppeteer/Mouse/Button.html +136 -0
- data/docs/Puppeteer/NetworkManager.html +901 -0
- data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
- data/docs/Puppeteer/Page.html +5970 -0
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
- data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
- data/docs/Puppeteer/Page/ScriptTag.html +555 -0
- data/docs/Puppeteer/Page/StyleTag.html +448 -0
- data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
- data/docs/Puppeteer/RemoteObject.html +1087 -0
- data/docs/Puppeteer/Target.html +1336 -0
- data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
- data/docs/Puppeteer/Target/TargetInfo.html +729 -0
- data/docs/Puppeteer/TimeoutError.html +135 -0
- data/docs/Puppeteer/TimeoutSettings.html +496 -0
- data/docs/Puppeteer/TouchScreen.html +464 -0
- data/docs/Puppeteer/Viewport.html +837 -0
- data/docs/Puppeteer/WaitTask.html +637 -0
- data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
- data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
- data/docs/Puppeteer/WebSocket.html +673 -0
- data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
- data/docs/Puppeteer/WebSocketTransport.html +600 -0
- data/docs/Puppeteer/WebSocktTransportError.html +124 -0
- data/docs/_index.html +823 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +123 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +123 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +4075 -0
- data/docs/top-level-namespace.html +126 -0
- data/lib/puppeteer.rb +200 -0
- data/lib/puppeteer/async_await_behavior.rb +38 -0
- data/lib/puppeteer/browser.rb +259 -0
- data/lib/puppeteer/browser_context.rb +90 -0
- data/lib/puppeteer/browser_fetcher.rb +6 -0
- data/lib/puppeteer/browser_runner.rb +161 -0
- data/lib/puppeteer/cdp_session.rb +100 -0
- data/lib/puppeteer/concurrent_ruby_utils.rb +37 -0
- data/lib/puppeteer/connection.rb +254 -0
- data/lib/puppeteer/console_message.rb +24 -0
- data/lib/puppeteer/debug_print.rb +20 -0
- data/lib/puppeteer/device.rb +12 -0
- data/lib/puppeteer/devices.rb +885 -0
- data/lib/puppeteer/dom_world.rb +484 -0
- data/lib/puppeteer/element_handle.rb +433 -0
- data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
- data/lib/puppeteer/element_handle/box_model.rb +19 -0
- data/lib/puppeteer/element_handle/point.rb +26 -0
- data/lib/puppeteer/emulation_manager.rb +46 -0
- data/lib/puppeteer/errors.rb +2 -0
- data/lib/puppeteer/event_callbackable.rb +88 -0
- data/lib/puppeteer/execution_context.rb +254 -0
- data/lib/puppeteer/file_chooser.rb +29 -0
- data/lib/puppeteer/frame.rb +286 -0
- data/lib/puppeteer/frame_manager.rb +378 -0
- data/lib/puppeteer/if_present.rb +18 -0
- data/lib/puppeteer/js_handle.rb +142 -0
- data/lib/puppeteer/keyboard.rb +183 -0
- data/lib/puppeteer/keyboard/key_description.rb +19 -0
- data/lib/puppeteer/keyboard/us_keyboard_layout.rb +283 -0
- data/lib/puppeteer/launcher.rb +25 -0
- data/lib/puppeteer/launcher/base.rb +48 -0
- data/lib/puppeteer/launcher/browser_options.rb +41 -0
- data/lib/puppeteer/launcher/chrome.rb +211 -0
- data/lib/puppeteer/launcher/chrome_arg_options.rb +49 -0
- data/lib/puppeteer/launcher/launch_options.rb +68 -0
- data/lib/puppeteer/lifecycle_watcher.rb +171 -0
- data/lib/puppeteer/mouse.rb +123 -0
- data/lib/puppeteer/network_manager.rb +122 -0
- data/lib/puppeteer/page.rb +1065 -0
- data/lib/puppeteer/page/screenshot_options.rb +78 -0
- data/lib/puppeteer/remote_object.rb +143 -0
- data/lib/puppeteer/target.rb +150 -0
- data/lib/puppeteer/timeout_settings.rb +15 -0
- data/lib/puppeteer/touch_screen.rb +43 -0
- data/lib/puppeteer/version.rb +3 -0
- data/lib/puppeteer/viewport.rb +54 -0
- data/lib/puppeteer/wait_task.rb +188 -0
- data/lib/puppeteer/web_socket.rb +122 -0
- data/lib/puppeteer/web_socket_transport.rb +49 -0
- data/puppeteer-ruby.gemspec +32 -0
- metadata +355 -0
@@ -0,0 +1,998 @@
|
|
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::ExecutionContext
|
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::ExecutionContext";
|
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 (E)</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">ExecutionContext</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::ExecutionContext
|
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::ExecutionContext</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd><span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/puppeteer/execution_context.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Defined Under Namespace</h2>
|
108
|
+
<p class="children">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="ExecutionContext/EvaluationError.html" title="Puppeteer::ExecutionContext::EvaluationError (class)">EvaluationError</a></span>, <span class='object_link'><a href="ExecutionContext/JavaScriptExpression.html" title="Puppeteer::ExecutionContext::JavaScriptExpression (class)">JavaScriptExpression</a></span>, <span class='object_link'><a href="ExecutionContext/JavaScriptFunction.html" title="Puppeteer::ExecutionContext::JavaScriptFunction (class)">JavaScriptFunction</a></span>
|
114
|
+
|
115
|
+
|
116
|
+
</p>
|
117
|
+
|
118
|
+
|
119
|
+
<h2>
|
120
|
+
Constant Summary
|
121
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
122
|
+
</h2>
|
123
|
+
|
124
|
+
<dl class="constants">
|
125
|
+
|
126
|
+
<dt id="EVALUATION_SCRIPT_URL-constant" class="">EVALUATION_SCRIPT_URL =
|
127
|
+
|
128
|
+
</dt>
|
129
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>__puppeteer_evaluation_script__</span><span class='tstring_end'>'</span></span></pre></dd>
|
130
|
+
|
131
|
+
<dt id="SOURCE_URL_REGEX-constant" class="">SOURCE_URL_REGEX =
|
132
|
+
|
133
|
+
</dt>
|
134
|
+
<dd><pre class="code"><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>^[\040\t]*\/\/[@#] sourceURL=\s*(\S*?)\s*$</span><span class='regexp_end'>/m</span></span></pre></dd>
|
135
|
+
|
136
|
+
</dl>
|
137
|
+
|
138
|
+
|
139
|
+
|
140
|
+
|
141
|
+
|
142
|
+
<h2>Instance Attribute Summary <small><a href="#" class="summary_toggle">collapse</a></small></h2>
|
143
|
+
<ul class="summary">
|
144
|
+
|
145
|
+
<li class="public ">
|
146
|
+
<span class="summary_signature">
|
147
|
+
|
148
|
+
<a href="#client-instance_method" title="#client (instance method)">#<strong>client</strong> ⇒ Object </a>
|
149
|
+
|
150
|
+
|
151
|
+
|
152
|
+
</span>
|
153
|
+
|
154
|
+
|
155
|
+
|
156
|
+
|
157
|
+
<span class="note title readonly">readonly</span>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
<span class="summary_desc"><div class='inline'>
|
168
|
+
<p>Returns the value of attribute client.</p>
|
169
|
+
</div></span>
|
170
|
+
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="public ">
|
175
|
+
<span class="summary_signature">
|
176
|
+
|
177
|
+
<a href="#world-instance_method" title="#world (instance method)">#<strong>world</strong> ⇒ Object </a>
|
178
|
+
|
179
|
+
|
180
|
+
|
181
|
+
</span>
|
182
|
+
|
183
|
+
|
184
|
+
|
185
|
+
|
186
|
+
<span class="note title readonly">readonly</span>
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
<span class="summary_desc"><div class='inline'>
|
197
|
+
<p>Returns the value of attribute world.</p>
|
198
|
+
</div></span>
|
199
|
+
|
200
|
+
</li>
|
201
|
+
|
202
|
+
|
203
|
+
</ul>
|
204
|
+
|
205
|
+
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
<h2>
|
210
|
+
Instance Method Summary
|
211
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
212
|
+
</h2>
|
213
|
+
|
214
|
+
<ul class="summary">
|
215
|
+
|
216
|
+
<li class="public ">
|
217
|
+
<span class="summary_signature">
|
218
|
+
|
219
|
+
<a href="#_context_id-instance_method" title="#_context_id (instance method)">#<strong>_context_id</strong> ⇒ Object </a>
|
220
|
+
|
221
|
+
|
222
|
+
|
223
|
+
</span>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
<span class="summary_desc"><div class='inline'>
|
234
|
+
<p>only used in DomWorld#delete_context.</p>
|
235
|
+
</div></span>
|
236
|
+
|
237
|
+
</li>
|
238
|
+
|
239
|
+
|
240
|
+
<li class="public ">
|
241
|
+
<span class="summary_signature">
|
242
|
+
|
243
|
+
<a href="#adopt_backend_node_id-instance_method" title="#adopt_backend_node_id (instance method)">#<strong>adopt_backend_node_id</strong>(backend_node_id) ⇒ Puppeteer::ElementHandle </a>
|
244
|
+
|
245
|
+
|
246
|
+
|
247
|
+
</span>
|
248
|
+
|
249
|
+
|
250
|
+
|
251
|
+
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
258
|
+
|
259
|
+
</li>
|
260
|
+
|
261
|
+
|
262
|
+
<li class="public ">
|
263
|
+
<span class="summary_signature">
|
264
|
+
|
265
|
+
<a href="#adopt_element_handle-instance_method" title="#adopt_element_handle (instance method)">#<strong>adopt_element_handle</strong>(element_handle) ⇒ Puppeteer::ElementHandle </a>
|
266
|
+
|
267
|
+
|
268
|
+
|
269
|
+
</span>
|
270
|
+
|
271
|
+
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
280
|
+
|
281
|
+
</li>
|
282
|
+
|
283
|
+
|
284
|
+
<li class="public ">
|
285
|
+
<span class="summary_signature">
|
286
|
+
|
287
|
+
<a href="#evaluate-instance_method" title="#evaluate (instance method)">#<strong>evaluate</strong>(page_function, *args) ⇒ Object </a>
|
288
|
+
|
289
|
+
|
290
|
+
|
291
|
+
</span>
|
292
|
+
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
302
|
+
|
303
|
+
</li>
|
304
|
+
|
305
|
+
|
306
|
+
<li class="public ">
|
307
|
+
<span class="summary_signature">
|
308
|
+
|
309
|
+
<a href="#evaluate_handle-instance_method" title="#evaluate_handle (instance method)">#<strong>evaluate_handle</strong>(page_function, *args) ⇒ Puppeteer::JSHandle </a>
|
310
|
+
|
311
|
+
|
312
|
+
|
313
|
+
</span>
|
314
|
+
|
315
|
+
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
324
|
+
|
325
|
+
</li>
|
326
|
+
|
327
|
+
|
328
|
+
<li class="public ">
|
329
|
+
<span class="summary_signature">
|
330
|
+
|
331
|
+
<a href="#frame-instance_method" title="#frame (instance method)">#<strong>frame</strong> ⇒ Puppeteer::Frame </a>
|
332
|
+
|
333
|
+
|
334
|
+
|
335
|
+
</span>
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
346
|
+
|
347
|
+
</li>
|
348
|
+
|
349
|
+
|
350
|
+
<li class="public ">
|
351
|
+
<span class="summary_signature">
|
352
|
+
|
353
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client, context_payload, world) ⇒ ExecutionContext </a>
|
354
|
+
|
355
|
+
|
356
|
+
|
357
|
+
</span>
|
358
|
+
|
359
|
+
|
360
|
+
<span class="note title constructor">constructor</span>
|
361
|
+
|
362
|
+
|
363
|
+
|
364
|
+
|
365
|
+
|
366
|
+
|
367
|
+
|
368
|
+
|
369
|
+
<span class="summary_desc"><div class='inline'>
|
370
|
+
<p>A new instance of ExecutionContext.</p>
|
371
|
+
</div></span>
|
372
|
+
|
373
|
+
</li>
|
374
|
+
|
375
|
+
|
376
|
+
</ul>
|
377
|
+
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
|
382
|
+
|
383
|
+
|
384
|
+
|
385
|
+
|
386
|
+
|
387
|
+
|
388
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></h3>
|
389
|
+
<p class="inherited"><span class='object_link'><a href="IfPresent.html#if_present-instance_method" title="Puppeteer::IfPresent#if_present (method)">#if_present</a></span></p>
|
390
|
+
<div id="constructor_details" class="method_details_list">
|
391
|
+
<h2>Constructor Details</h2>
|
392
|
+
|
393
|
+
<div class="method_details first">
|
394
|
+
<h3 class="signature first" id="initialize-instance_method">
|
395
|
+
|
396
|
+
#<strong>initialize</strong>(client, context_payload, world) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span></tt>
|
397
|
+
|
398
|
+
|
399
|
+
|
400
|
+
|
401
|
+
|
402
|
+
</h3><div class="docstring">
|
403
|
+
<div class="discussion">
|
404
|
+
|
405
|
+
<p>Returns a new instance of ExecutionContext.</p>
|
406
|
+
|
407
|
+
|
408
|
+
</div>
|
409
|
+
</div>
|
410
|
+
<div class="tags">
|
411
|
+
<p class="tag_title">Parameters:</p>
|
412
|
+
<ul class="param">
|
413
|
+
|
414
|
+
<li>
|
415
|
+
|
416
|
+
<span class='name'>client</span>
|
417
|
+
|
418
|
+
|
419
|
+
<span class='type'>(<tt><span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">Puppeteer::CDPSession</a></span></tt>)</span>
|
420
|
+
|
421
|
+
|
422
|
+
|
423
|
+
</li>
|
424
|
+
|
425
|
+
<li>
|
426
|
+
|
427
|
+
<span class='name'>context_payload</span>
|
428
|
+
|
429
|
+
|
430
|
+
<span class='type'>(<tt>Hash</tt>)</span>
|
431
|
+
|
432
|
+
|
433
|
+
|
434
|
+
</li>
|
435
|
+
|
436
|
+
<li>
|
437
|
+
|
438
|
+
<span class='name'>world</span>
|
439
|
+
|
440
|
+
|
441
|
+
<span class='type'>(<tt><span class='object_link'><a href="DOMWorld.html" title="Puppeteer::DOMWorld (class)">Puppeteer::DOMWorld</a></span>?</tt>)</span>
|
442
|
+
|
443
|
+
|
444
|
+
|
445
|
+
</li>
|
446
|
+
|
447
|
+
</ul>
|
448
|
+
|
449
|
+
|
450
|
+
</div><table class="source_code">
|
451
|
+
<tr>
|
452
|
+
<td>
|
453
|
+
<pre class="lines">
|
454
|
+
|
455
|
+
|
456
|
+
11
|
457
|
+
12
|
458
|
+
13
|
459
|
+
14
|
460
|
+
15</pre>
|
461
|
+
</td>
|
462
|
+
<td>
|
463
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 11</span>
|
464
|
+
|
465
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_context_payload'>context_payload</span><span class='comma'>,</span> <span class='id identifier rubyid_world'>world</span><span class='rparen'>)</span>
|
466
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
467
|
+
<span class='ivar'>@world</span> <span class='op'>=</span> <span class='id identifier rubyid_world'>world</span>
|
468
|
+
<span class='ivar'>@context_id</span> <span class='op'>=</span> <span class='id identifier rubyid_context_payload'>context_payload</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>id</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
469
|
+
<span class='kw'>end</span></pre>
|
470
|
+
</td>
|
471
|
+
</tr>
|
472
|
+
</table>
|
473
|
+
</div>
|
474
|
+
|
475
|
+
</div>
|
476
|
+
|
477
|
+
<div id="instance_attr_details" class="attr_details">
|
478
|
+
<h2>Instance Attribute Details</h2>
|
479
|
+
|
480
|
+
|
481
|
+
<span id=""></span>
|
482
|
+
<div class="method_details first">
|
483
|
+
<h3 class="signature first" id="client-instance_method">
|
484
|
+
|
485
|
+
#<strong>client</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
486
|
+
|
487
|
+
|
488
|
+
|
489
|
+
|
490
|
+
|
491
|
+
</h3><div class="docstring">
|
492
|
+
<div class="discussion">
|
493
|
+
|
494
|
+
<p>Returns the value of attribute client.</p>
|
495
|
+
|
496
|
+
|
497
|
+
</div>
|
498
|
+
</div>
|
499
|
+
<div class="tags">
|
500
|
+
|
501
|
+
|
502
|
+
</div><table class="source_code">
|
503
|
+
<tr>
|
504
|
+
<td>
|
505
|
+
<pre class="lines">
|
506
|
+
|
507
|
+
|
508
|
+
17
|
509
|
+
18
|
510
|
+
19</pre>
|
511
|
+
</td>
|
512
|
+
<td>
|
513
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 17</span>
|
514
|
+
|
515
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_client'>client</span>
|
516
|
+
<span class='ivar'>@client</span>
|
517
|
+
<span class='kw'>end</span></pre>
|
518
|
+
</td>
|
519
|
+
</tr>
|
520
|
+
</table>
|
521
|
+
</div>
|
522
|
+
|
523
|
+
|
524
|
+
<span id=""></span>
|
525
|
+
<div class="method_details ">
|
526
|
+
<h3 class="signature " id="world-instance_method">
|
527
|
+
|
528
|
+
#<strong>world</strong> ⇒ <tt>Object</tt> <span class="extras">(readonly)</span>
|
529
|
+
|
530
|
+
|
531
|
+
|
532
|
+
|
533
|
+
|
534
|
+
</h3><div class="docstring">
|
535
|
+
<div class="discussion">
|
536
|
+
|
537
|
+
<p>Returns the value of attribute world.</p>
|
538
|
+
|
539
|
+
|
540
|
+
</div>
|
541
|
+
</div>
|
542
|
+
<div class="tags">
|
543
|
+
|
544
|
+
|
545
|
+
</div><table class="source_code">
|
546
|
+
<tr>
|
547
|
+
<td>
|
548
|
+
<pre class="lines">
|
549
|
+
|
550
|
+
|
551
|
+
17
|
552
|
+
18
|
553
|
+
19</pre>
|
554
|
+
</td>
|
555
|
+
<td>
|
556
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 17</span>
|
557
|
+
|
558
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_world'>world</span>
|
559
|
+
<span class='ivar'>@world</span>
|
560
|
+
<span class='kw'>end</span></pre>
|
561
|
+
</td>
|
562
|
+
</tr>
|
563
|
+
</table>
|
564
|
+
</div>
|
565
|
+
|
566
|
+
</div>
|
567
|
+
|
568
|
+
|
569
|
+
<div id="instance_method_details" class="method_details_list">
|
570
|
+
<h2>Instance Method Details</h2>
|
571
|
+
|
572
|
+
|
573
|
+
<div class="method_details first">
|
574
|
+
<h3 class="signature first" id="_context_id-instance_method">
|
575
|
+
|
576
|
+
#<strong>_context_id</strong> ⇒ <tt>Object</tt>
|
577
|
+
|
578
|
+
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
</h3><div class="docstring">
|
583
|
+
<div class="discussion">
|
584
|
+
|
585
|
+
<p>only used in DomWorld#delete_context</p>
|
586
|
+
|
587
|
+
|
588
|
+
</div>
|
589
|
+
</div>
|
590
|
+
<div class="tags">
|
591
|
+
|
592
|
+
|
593
|
+
</div><table class="source_code">
|
594
|
+
<tr>
|
595
|
+
<td>
|
596
|
+
<pre class="lines">
|
597
|
+
|
598
|
+
|
599
|
+
20
|
600
|
+
21
|
601
|
+
22</pre>
|
602
|
+
</td>
|
603
|
+
<td>
|
604
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 20</span>
|
605
|
+
|
606
|
+
<span class='kw'>def</span> <span class='id identifier rubyid__context_id'>_context_id</span>
|
607
|
+
<span class='ivar'>@context_id</span>
|
608
|
+
<span class='kw'>end</span></pre>
|
609
|
+
</td>
|
610
|
+
</tr>
|
611
|
+
</table>
|
612
|
+
</div>
|
613
|
+
|
614
|
+
<div class="method_details ">
|
615
|
+
<h3 class="signature " id="adopt_backend_node_id-instance_method">
|
616
|
+
|
617
|
+
#<strong>adopt_backend_node_id</strong>(backend_node_id) ⇒ <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
</h3><div class="docstring">
|
624
|
+
<div class="discussion">
|
625
|
+
|
626
|
+
|
627
|
+
</div>
|
628
|
+
</div>
|
629
|
+
<div class="tags">
|
630
|
+
<p class="tag_title">Parameters:</p>
|
631
|
+
<ul class="param">
|
632
|
+
|
633
|
+
<li>
|
634
|
+
|
635
|
+
<span class='name'>backend_node_id</span>
|
636
|
+
|
637
|
+
|
638
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
</li>
|
643
|
+
|
644
|
+
</ul>
|
645
|
+
|
646
|
+
<p class="tag_title">Returns:</p>
|
647
|
+
<ul class="return">
|
648
|
+
|
649
|
+
<li>
|
650
|
+
|
651
|
+
|
652
|
+
<span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
|
653
|
+
|
654
|
+
|
655
|
+
|
656
|
+
</li>
|
657
|
+
|
658
|
+
</ul>
|
659
|
+
|
660
|
+
</div><table class="source_code">
|
661
|
+
<tr>
|
662
|
+
<td>
|
663
|
+
<pre class="lines">
|
664
|
+
|
665
|
+
|
666
|
+
221
|
667
|
+
222
|
668
|
+
223
|
669
|
+
224
|
670
|
+
225
|
671
|
+
226
|
672
|
+
227
|
673
|
+
228
|
674
|
+
229
|
675
|
+
230</pre>
|
676
|
+
</td>
|
677
|
+
<td>
|
678
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 221</span>
|
679
|
+
|
680
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_adopt_backend_node_id'>adopt_backend_node_id</span><span class='lparen'>(</span><span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='rparen'>)</span>
|
681
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOM.resolveNode</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
682
|
+
<span class='label'>backendNodeId:</span> <span class='id identifier rubyid_backend_node_id'>backend_node_id</span><span class='comma'>,</span>
|
683
|
+
<span class='label'>executionContextId:</span> <span class='ivar'>@context_id</span><span class='comma'>,</span>
|
684
|
+
<span class='rparen'>)</span>
|
685
|
+
<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="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span></span><span class='lparen'>(</span>
|
686
|
+
<span class='label'>context:</span> <span class='kw'>self</span><span class='comma'>,</span>
|
687
|
+
<span class='label'>remote_object:</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="RemoteObject.html" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RemoteObject.html#initialize-instance_method" title="Puppeteer::RemoteObject#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
|
688
|
+
<span class='rparen'>)</span>
|
689
|
+
<span class='kw'>end</span></pre>
|
690
|
+
</td>
|
691
|
+
</tr>
|
692
|
+
</table>
|
693
|
+
</div>
|
694
|
+
|
695
|
+
<div class="method_details ">
|
696
|
+
<h3 class="signature " id="adopt_element_handle-instance_method">
|
697
|
+
|
698
|
+
#<strong>adopt_element_handle</strong>(element_handle) ⇒ <tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>
|
699
|
+
|
700
|
+
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
</h3><div class="docstring">
|
705
|
+
<div class="discussion">
|
706
|
+
|
707
|
+
|
708
|
+
</div>
|
709
|
+
</div>
|
710
|
+
<div class="tags">
|
711
|
+
<p class="tag_title">Parameters:</p>
|
712
|
+
<ul class="param">
|
713
|
+
|
714
|
+
<li>
|
715
|
+
|
716
|
+
<span class='name'>element_handle</span>
|
717
|
+
|
718
|
+
|
719
|
+
<span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
|
720
|
+
|
721
|
+
|
722
|
+
|
723
|
+
</li>
|
724
|
+
|
725
|
+
</ul>
|
726
|
+
|
727
|
+
<p class="tag_title">Returns:</p>
|
728
|
+
<ul class="return">
|
729
|
+
|
730
|
+
<li>
|
731
|
+
|
732
|
+
|
733
|
+
<span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
|
734
|
+
|
735
|
+
|
736
|
+
|
737
|
+
</li>
|
738
|
+
|
739
|
+
</ul>
|
740
|
+
|
741
|
+
</div><table class="source_code">
|
742
|
+
<tr>
|
743
|
+
<td>
|
744
|
+
<pre class="lines">
|
745
|
+
|
746
|
+
|
747
|
+
234
|
748
|
+
235
|
749
|
+
236
|
750
|
+
237
|
751
|
+
238
|
752
|
+
239
|
753
|
+
240
|
754
|
+
241
|
755
|
+
242
|
756
|
+
243
|
757
|
+
244
|
758
|
+
245
|
759
|
+
246
|
760
|
+
247
|
761
|
+
248
|
762
|
+
249
|
763
|
+
250
|
764
|
+
251
|
765
|
+
252
|
766
|
+
253</pre>
|
767
|
+
</td>
|
768
|
+
<td>
|
769
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 234</span>
|
770
|
+
|
771
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_adopt_element_handle'>adopt_element_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_element_handle'>element_handle</span><span class='rparen'>)</span>
|
772
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_execution_context'>execution_context</span> <span class='op'>==</span> <span class='kw'>self</span>
|
773
|
+
<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'>Cannot adopt handle that already belongs to this execution context</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
774
|
+
<span class='kw'>end</span>
|
775
|
+
|
776
|
+
<span class='kw'>unless</span> <span class='ivar'>@world</span>
|
777
|
+
<span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Cannot adopt handle without DOMWorld</span><span class='tstring_end'>'</span></span>
|
778
|
+
<span class='kw'>end</span>
|
779
|
+
|
780
|
+
<span class='id identifier rubyid_node_info'>node_info</span> <span class='op'>=</span> <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_remote_object'>remote_object</span><span class='period'>.</span><span class='id identifier rubyid_node_info'>node_info</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span>
|
781
|
+
<span class='id identifier rubyid_response'>response</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>DOM.resolveNode</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
782
|
+
<span class='label'>backendNodeId:</span> <span class='id identifier rubyid_node_info'>node_info</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>node</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>backendNodeId</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='comma'>,</span>
|
783
|
+
<span class='label'>executionContextId:</span> <span class='ivar'>@context_id</span><span class='comma'>,</span>
|
784
|
+
<span class='rparen'>)</span>
|
785
|
+
|
786
|
+
<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="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span><span class='period'>.</span><span class='id identifier rubyid_create'><span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span></span><span class='lparen'>(</span>
|
787
|
+
<span class='label'>context:</span> <span class='kw'>self</span><span class='comma'>,</span>
|
788
|
+
<span class='label'>remote_object:</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="RemoteObject.html" title="Puppeteer::RemoteObject (class)">RemoteObject</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="RemoteObject.html#initialize-instance_method" title="Puppeteer::RemoteObject#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_response'>response</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>object</span><span class='tstring_end'>"</span></span><span class='rbracket'>]</span><span class='rparen'>)</span><span class='comma'>,</span>
|
789
|
+
<span class='rparen'>)</span>
|
790
|
+
<span class='kw'>end</span></pre>
|
791
|
+
</td>
|
792
|
+
</tr>
|
793
|
+
</table>
|
794
|
+
</div>
|
795
|
+
|
796
|
+
<div class="method_details ">
|
797
|
+
<h3 class="signature " id="evaluate-instance_method">
|
798
|
+
|
799
|
+
#<strong>evaluate</strong>(page_function, *args) ⇒ <tt>Object</tt>
|
800
|
+
|
801
|
+
|
802
|
+
|
803
|
+
|
804
|
+
|
805
|
+
</h3><div class="docstring">
|
806
|
+
<div class="discussion">
|
807
|
+
|
808
|
+
|
809
|
+
</div>
|
810
|
+
</div>
|
811
|
+
<div class="tags">
|
812
|
+
<p class="tag_title">Parameters:</p>
|
813
|
+
<ul class="param">
|
814
|
+
|
815
|
+
<li>
|
816
|
+
|
817
|
+
<span class='name'>page_function</span>
|
818
|
+
|
819
|
+
|
820
|
+
<span class='type'>(<tt>String</tt>)</span>
|
821
|
+
|
822
|
+
|
823
|
+
|
824
|
+
</li>
|
825
|
+
|
826
|
+
</ul>
|
827
|
+
|
828
|
+
<p class="tag_title">Returns:</p>
|
829
|
+
<ul class="return">
|
830
|
+
|
831
|
+
<li>
|
832
|
+
|
833
|
+
|
834
|
+
<span class='type'>(<tt>Object</tt>)</span>
|
835
|
+
|
836
|
+
|
837
|
+
|
838
|
+
</li>
|
839
|
+
|
840
|
+
</ul>
|
841
|
+
|
842
|
+
</div><table class="source_code">
|
843
|
+
<tr>
|
844
|
+
<td>
|
845
|
+
<pre class="lines">
|
846
|
+
|
847
|
+
|
848
|
+
33
|
849
|
+
34
|
850
|
+
35</pre>
|
851
|
+
</td>
|
852
|
+
<td>
|
853
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 33</span>
|
854
|
+
|
855
|
+
<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>
|
856
|
+
<span class='id identifier rubyid_evaluate_internal'>evaluate_internal</span><span class='lparen'>(</span><span class='kw'>true</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>
|
857
|
+
<span class='kw'>end</span></pre>
|
858
|
+
</td>
|
859
|
+
</tr>
|
860
|
+
</table>
|
861
|
+
</div>
|
862
|
+
|
863
|
+
<div class="method_details ">
|
864
|
+
<h3 class="signature " id="evaluate_handle-instance_method">
|
865
|
+
|
866
|
+
#<strong>evaluate_handle</strong>(page_function, *args) ⇒ <tt><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">Puppeteer::JSHandle</a></span></tt>
|
867
|
+
|
868
|
+
|
869
|
+
|
870
|
+
|
871
|
+
|
872
|
+
</h3><div class="docstring">
|
873
|
+
<div class="discussion">
|
874
|
+
|
875
|
+
|
876
|
+
</div>
|
877
|
+
</div>
|
878
|
+
<div class="tags">
|
879
|
+
<p class="tag_title">Parameters:</p>
|
880
|
+
<ul class="param">
|
881
|
+
|
882
|
+
<li>
|
883
|
+
|
884
|
+
<span class='name'>page_function</span>
|
885
|
+
|
886
|
+
|
887
|
+
<span class='type'>(<tt>String</tt>)</span>
|
888
|
+
|
889
|
+
|
890
|
+
|
891
|
+
</li>
|
892
|
+
|
893
|
+
</ul>
|
894
|
+
|
895
|
+
<p class="tag_title">Returns:</p>
|
896
|
+
<ul class="return">
|
897
|
+
|
898
|
+
<li>
|
899
|
+
|
900
|
+
|
901
|
+
<span class='type'>(<tt><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">Puppeteer::JSHandle</a></span></tt>)</span>
|
902
|
+
|
903
|
+
|
904
|
+
|
905
|
+
</li>
|
906
|
+
|
907
|
+
</ul>
|
908
|
+
|
909
|
+
</div><table class="source_code">
|
910
|
+
<tr>
|
911
|
+
<td>
|
912
|
+
<pre class="lines">
|
913
|
+
|
914
|
+
|
915
|
+
39
|
916
|
+
40
|
917
|
+
41</pre>
|
918
|
+
</td>
|
919
|
+
<td>
|
920
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 39</span>
|
921
|
+
|
922
|
+
<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>
|
923
|
+
<span class='id identifier rubyid_evaluate_internal'>evaluate_internal</span><span class='lparen'>(</span><span class='kw'>false</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>
|
924
|
+
<span class='kw'>end</span></pre>
|
925
|
+
</td>
|
926
|
+
</tr>
|
927
|
+
</table>
|
928
|
+
</div>
|
929
|
+
|
930
|
+
<div class="method_details ">
|
931
|
+
<h3 class="signature " id="frame-instance_method">
|
932
|
+
|
933
|
+
#<strong>frame</strong> ⇒ <tt><span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Puppeteer::Frame</a></span></tt>
|
934
|
+
|
935
|
+
|
936
|
+
|
937
|
+
|
938
|
+
|
939
|
+
</h3><div class="docstring">
|
940
|
+
<div class="discussion">
|
941
|
+
|
942
|
+
|
943
|
+
</div>
|
944
|
+
</div>
|
945
|
+
<div class="tags">
|
946
|
+
|
947
|
+
<p class="tag_title">Returns:</p>
|
948
|
+
<ul class="return">
|
949
|
+
|
950
|
+
<li>
|
951
|
+
|
952
|
+
|
953
|
+
<span class='type'>(<tt><span class='object_link'><a href="Frame.html" title="Puppeteer::Frame (class)">Puppeteer::Frame</a></span></tt>)</span>
|
954
|
+
|
955
|
+
|
956
|
+
|
957
|
+
</li>
|
958
|
+
|
959
|
+
</ul>
|
960
|
+
|
961
|
+
</div><table class="source_code">
|
962
|
+
<tr>
|
963
|
+
<td>
|
964
|
+
<pre class="lines">
|
965
|
+
|
966
|
+
|
967
|
+
25
|
968
|
+
26
|
969
|
+
27
|
970
|
+
28
|
971
|
+
29</pre>
|
972
|
+
</td>
|
973
|
+
<td>
|
974
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 25</span>
|
975
|
+
|
976
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_frame'>frame</span>
|
977
|
+
<span class='id identifier rubyid_if_present'>if_present</span><span class='lparen'>(</span><span class='ivar'>@world</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_world'>world</span><span class='op'>|</span>
|
978
|
+
<span class='id identifier rubyid_world'>world</span><span class='period'>.</span><span class='id identifier rubyid_frame'>frame</span>
|
979
|
+
<span class='kw'>end</span>
|
980
|
+
<span class='kw'>end</span></pre>
|
981
|
+
</td>
|
982
|
+
</tr>
|
983
|
+
</table>
|
984
|
+
</div>
|
985
|
+
|
986
|
+
</div>
|
987
|
+
|
988
|
+
</div>
|
989
|
+
|
990
|
+
<div id="footer">
|
991
|
+
Generated on Fri Jun 12 12:38:35 2020 by
|
992
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
993
|
+
0.9.24 (ruby-2.6.3).
|
994
|
+
</div>
|
995
|
+
|
996
|
+
</div>
|
997
|
+
</body>
|
998
|
+
</html>
|