puppeteer-ruby 0.0.12 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -14
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +52 -1
  6. data/lib/puppeteer.rb +10 -2
  7. data/lib/puppeteer/browser.rb +53 -34
  8. data/lib/puppeteer/browser_context.rb +35 -5
  9. data/lib/puppeteer/cdp_session.rb +3 -19
  10. data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
  11. data/lib/puppeteer/connection.rb +9 -16
  12. data/lib/puppeteer/debug_print.rb +1 -1
  13. data/lib/puppeteer/define_async_method.rb +23 -0
  14. data/lib/puppeteer/dom_world.rb +67 -78
  15. data/lib/puppeteer/element_handle.rb +19 -47
  16. data/lib/puppeteer/emulation_manager.rb +2 -6
  17. data/lib/puppeteer/env.rb +18 -0
  18. data/lib/puppeteer/execution_context.rb +1 -6
  19. data/lib/puppeteer/frame.rb +34 -39
  20. data/lib/puppeteer/frame_manager.rb +7 -25
  21. data/lib/puppeteer/js_handle.rb +3 -12
  22. data/lib/puppeteer/keyboard.rb +9 -29
  23. data/lib/puppeteer/launcher/chrome.rb +9 -7
  24. data/lib/puppeteer/mouse.rb +20 -24
  25. data/lib/puppeteer/network_manager.rb +163 -5
  26. data/lib/puppeteer/page.rb +213 -179
  27. data/lib/puppeteer/page/pdf_options.rb +166 -0
  28. data/lib/puppeteer/remote_object.rb +2 -5
  29. data/lib/puppeteer/request.rb +330 -0
  30. data/lib/puppeteer/response.rb +113 -0
  31. data/lib/puppeteer/touch_screen.rb +2 -7
  32. data/lib/puppeteer/version.rb +1 -1
  33. data/lib/puppeteer/wait_task.rb +2 -4
  34. data/lib/puppeteer/web_socket.rb +7 -0
  35. data/puppeteer-ruby.gemspec +2 -1
  36. metadata +25 -103
  37. data/docs/Puppeteer.html +0 -2338
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2258
  40. data/docs/Puppeteer/BrowserContext.html +0 -809
  41. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  42. data/docs/Puppeteer/BrowserRunner.html +0 -914
  43. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  44. data/docs/Puppeteer/CDPSession.html +0 -813
  45. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  46. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
  47. data/docs/Puppeteer/Connection.html +0 -964
  48. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  49. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  50. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  51. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  52. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  53. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  54. data/docs/Puppeteer/DOMWorld.html +0 -2219
  55. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  56. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  57. data/docs/Puppeteer/DebugPrint.html +0 -233
  58. data/docs/Puppeteer/Device.html +0 -470
  59. data/docs/Puppeteer/Devices.html +0 -139
  60. data/docs/Puppeteer/ElementHandle.html +0 -2542
  61. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  62. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  63. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  64. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  65. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  66. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  67. data/docs/Puppeteer/EmulationManager.html +0 -454
  68. data/docs/Puppeteer/EventCallbackable.html +0 -499
  69. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  70. data/docs/Puppeteer/ExecutionContext.html +0 -998
  71. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  72. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  73. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  74. data/docs/Puppeteer/FileChooser.html +0 -455
  75. data/docs/Puppeteer/Frame.html +0 -3813
  76. data/docs/Puppeteer/FrameManager.html +0 -2410
  77. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  78. data/docs/Puppeteer/IfPresent.html +0 -222
  79. data/docs/Puppeteer/JSHandle.html +0 -1352
  80. data/docs/Puppeteer/Keyboard.html +0 -1557
  81. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  82. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  83. data/docs/Puppeteer/Launcher.html +0 -237
  84. data/docs/Puppeteer/Launcher/Base.html +0 -385
  85. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  86. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  87. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  88. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  89. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  90. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  91. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  92. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  93. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  94. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  95. data/docs/Puppeteer/Mouse.html +0 -1095
  96. data/docs/Puppeteer/Mouse/Button.html +0 -136
  97. data/docs/Puppeteer/NetworkManager.html +0 -901
  98. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  99. data/docs/Puppeteer/Page.html +0 -6173
  100. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  101. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  102. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  103. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  104. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  105. data/docs/Puppeteer/RemoteObject.html +0 -1087
  106. data/docs/Puppeteer/Target.html +0 -1336
  107. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  108. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  109. data/docs/Puppeteer/TimeoutError.html +0 -135
  110. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  111. data/docs/Puppeteer/TouchScreen.html +0 -464
  112. data/docs/Puppeteer/Viewport.html +0 -837
  113. data/docs/Puppeteer/WaitTask.html +0 -637
  114. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  115. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  116. data/docs/Puppeteer/WebSocket.html +0 -673
  117. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  118. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  119. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  120. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  121. data/docs/_index.html +0 -816
  122. data/docs/class_list.html +0 -51
  123. data/docs/css/common.css +0 -1
  124. data/docs/css/full_list.css +0 -58
  125. data/docs/css/style.css +0 -496
  126. data/docs/file.README.html +0 -125
  127. data/docs/file_list.html +0 -56
  128. data/docs/frames.html +0 -17
  129. data/docs/index.html +0 -125
  130. data/docs/js/app.js +0 -314
  131. data/docs/js/full_list.js +0 -216
  132. data/docs/js/jquery.js +0 -4
  133. data/docs/method_list.html +0 -4115
  134. data/docs/top-level-namespace.html +0 -126
  135. 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
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::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> &raquo;
40
- <span class='title'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../ConsoleMessage.html" title="Puppeteer::ConsoleMessage (class)">ConsoleMessage</a></span></span>
41
- &raquo;
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> &#x21d2; 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> &#x21d2; 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> &#x21d2; 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) &#x21d2; 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) &#x21d2; <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> &#x21d2; <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> &#x21d2; <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> &#x21d2; <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 Tue Jun 23 10:25:00 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,2219 +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
- &mdash; Documentation by YARD 0.9.24
10
-
11
- </title>
12
-
13
- <link rel="stylesheet" href="../css/style.css" type="text/css" />
14
-
15
- <link rel="stylesheet" href="../css/common.css" type="text/css" />
16
-
17
- <script type="text/javascript">
18
- pathId = "Puppeteer::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> &raquo;
40
- <span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
41
- &raquo;
42
- <span class="title">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'>&lt;&lt;~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 &amp;&amp; !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 &amp;&amp; style.visibility !== &#39;hidden&#39; &amp;&amp; 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> &#x21d2; 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> &#x21d2; 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) &#x21d2; 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) &#x21d2; 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) &#x21d2; 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> &#x21d2; 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) &#x21d2; !Promise&lt;*&gt; </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) &#x21d2; !Promise&lt;!Puppeteer.JSHandle&gt; </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> &#x21d2; !Promise&lt;!Puppeteer.ExecutionContext&gt; </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> &#x21d2; 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) &#x21d2; 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) &#x21d2; !Promise&lt;?Puppeteer.ElementHandle&gt; </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) &#x21d2; Array&lt;String&gt; </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) &#x21d2; !Promise&lt;(!Object|undefined)&gt; </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) &#x21d2; !Promise&lt;!Array&lt;!Puppeteer.ElementHandle&gt;&gt; </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) &#x21d2; !Promise&lt;(!Object|undefined)&gt; </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) &#x21d2; !Promise&lt;!Array&lt;!Puppeteer.ElementHandle&gt;&gt; </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) &#x21d2; 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="#type_text-instance_method" title="#type_text (instance method)">#<strong>type_text</strong>(selector, text, delay: nil) &#x21d2; Object </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="#wait_for_selector-instance_method" title="#wait_for_selector (instance method)">#<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) &#x21d2; 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_xpath-instance_method" title="#wait_for_xpath (instance method)">#<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) &#x21d2; 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
- </ul>
674
-
675
-
676
- <div id="constructor_details" class="method_details_list">
677
- <h2>Constructor Details</h2>
678
-
679
- <div class="method_details first">
680
- <h3 class="signature first" id="initialize-instance_method">
681
-
682
- #<strong>initialize</strong>(frame_manager, frame, timeout_settings) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::DOMWorld (class)">DOMWorld</a></span></tt>
683
-
684
-
685
-
686
-
687
-
688
- </h3><div class="docstring">
689
- <div class="discussion">
690
-
691
- <p>Returns a new instance of DOMWorld.</p>
692
-
693
-
694
- </div>
695
- </div>
696
- <div class="tags">
697
- <p class="tag_title">Parameters:</p>
698
- <ul class="param">
699
-
700
- <li>
701
-
702
- <span class='name'>frameManager</span>
703
-
704
-
705
- <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>
706
-
707
-
708
-
709
- </li>
710
-
711
- <li>
712
-
713
- <span class='name'>frame</span>
714
-
715
-
716
- <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>
717
-
718
-
719
-
720
- </li>
721
-
722
- <li>
723
-
724
- <span class='name'>timeoutSettings</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="TimeoutSettings.html" title="Puppeteer::TimeoutSettings (class)">TimeoutSettings</a></span></tt>)</span>
728
-
729
-
730
-
731
- </li>
732
-
733
- </ul>
734
-
735
-
736
- </div><table class="source_code">
737
- <tr>
738
- <td>
739
- <pre class="lines">
740
-
741
-
742
- 10
743
- 11
744
- 12
745
- 13
746
- 14
747
- 15
748
- 16
749
- 17
750
- 18</pre>
751
- </td>
752
- <td>
753
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 10</span>
754
-
755
- <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>
756
- <span class='ivar'>@frame_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span>
757
- <span class='ivar'>@frame</span> <span class='op'>=</span> <span class='id identifier rubyid_frame'>frame</span>
758
- <span class='ivar'>@timeout_settings</span> <span class='op'>=</span> <span class='id identifier rubyid_timeout_settings'>timeout_settings</span>
759
- <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>
760
- <span class='ivar'>@pending_destroy</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
761
- <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>
762
- <span class='ivar'>@detached</span> <span class='op'>=</span> <span class='kw'>false</span>
763
- <span class='kw'>end</span></pre>
764
- </td>
765
- </tr>
766
- </table>
767
- </div>
768
-
769
- </div>
770
-
771
- <div id="instance_attr_details" class="attr_details">
772
- <h2>Instance Attribute Details</h2>
773
-
774
-
775
- <span id=""></span>
776
- <div class="method_details first">
777
- <h3 class="signature first" id="frame-instance_method">
778
-
779
- #<strong>frame</strong> &#x21d2; <tt>Object</tt> <span class="extras">(readonly)</span>
780
-
781
-
782
-
783
-
784
-
785
- </h3><div class="docstring">
786
- <div class="discussion">
787
-
788
- <p>Returns the value of attribute frame.</p>
789
-
790
-
791
- </div>
792
- </div>
793
- <div class="tags">
794
-
795
-
796
- </div><table class="source_code">
797
- <tr>
798
- <td>
799
- <pre class="lines">
800
-
801
-
802
- 20
803
- 21
804
- 22</pre>
805
- </td>
806
- <td>
807
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 20</span>
808
-
809
- <span class='kw'>def</span> <span class='id identifier rubyid_frame'>frame</span>
810
- <span class='ivar'>@frame</span>
811
- <span class='kw'>end</span></pre>
812
- </td>
813
- </tr>
814
- </table>
815
- </div>
816
-
817
- </div>
818
-
819
-
820
- <div id="instance_method_details" class="method_details_list">
821
- <h2>Instance Method Details</h2>
822
-
823
-
824
- <div class="method_details first">
825
- <h3 class="signature first" id="_wait_tasks-instance_method">
826
-
827
- #<strong>_wait_tasks</strong> &#x21d2; <tt>Object</tt>
828
-
829
-
830
-
831
-
832
-
833
- </h3><div class="docstring">
834
- <div class="discussion">
835
-
836
- <p>only used in Puppeteer::WaitTask#initialize</p>
837
-
838
-
839
- </div>
840
- </div>
841
- <div class="tags">
842
-
843
-
844
- </div><table class="source_code">
845
- <tr>
846
- <td>
847
- <pre class="lines">
848
-
849
-
850
- 23
851
- 24
852
- 25</pre>
853
- </td>
854
- <td>
855
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 23</span>
856
-
857
- <span class='kw'>def</span> <span class='id identifier rubyid__wait_tasks'>_wait_tasks</span>
858
- <span class='ivar'>@wait_tasks</span>
859
- <span class='kw'>end</span></pre>
860
- </td>
861
- </tr>
862
- </table>
863
- </div>
864
-
865
- <div class="method_details ">
866
- <h3 class="signature " id="click-instance_method">
867
-
868
- #<strong>click</strong>(selector, delay: nil, button: nil, click_count: nil) &#x21d2; <tt>Object</tt>
869
-
870
-
871
-
872
-
873
-
874
- </h3><div class="docstring">
875
- <div class="discussion">
876
-
877
-
878
- </div>
879
- </div>
880
- <div class="tags">
881
- <p class="tag_title">Parameters:</p>
882
- <ul class="param">
883
-
884
- <li>
885
-
886
- <span class='name'>selector</span>
887
-
888
-
889
- <span class='type'>(<tt>String</tt>)</span>
890
-
891
-
892
-
893
- </li>
894
-
895
- <li>
896
-
897
- <span class='name'>delay</span>
898
-
899
-
900
- <span class='type'>(<tt>Number</tt>)</span>
901
-
902
-
903
- <em class="default">(defaults to: <tt>nil</tt>)</em>
904
-
905
-
906
- </li>
907
-
908
- <li>
909
-
910
- <span class='name'>button</span>
911
-
912
-
913
- <span class='type'>(<tt>String</tt>)</span>
914
-
915
-
916
- <em class="default">(defaults to: <tt>nil</tt>)</em>
917
-
918
-
919
- &mdash;
920
- <div class='inline'>
921
- <p>“left”|“right”|“middle”</p>
922
- </div>
923
-
924
- </li>
925
-
926
- <li>
927
-
928
- <span class='name'>click_count</span>
929
-
930
-
931
- <span class='type'>(<tt>Number</tt>)</span>
932
-
933
-
934
- <em class="default">(defaults to: <tt>nil</tt>)</em>
935
-
936
-
937
- </li>
938
-
939
- </ul>
940
-
941
-
942
- </div><table class="source_code">
943
- <tr>
944
- <td>
945
- <pre class="lines">
946
-
947
-
948
- 333
949
- 334
950
- 335
951
- 336
952
- 337</pre>
953
- </td>
954
- <td>
955
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 333</span>
956
-
957
- <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>
958
- <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>
959
- <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>
960
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
961
- <span class='kw'>end</span></pre>
962
- </td>
963
- </tr>
964
- </table>
965
- </div>
966
-
967
- <div class="method_details ">
968
- <h3 class="signature " id="context=-instance_method">
969
-
970
- #<strong>context=</strong>(context) &#x21d2; <tt>Object</tt>
971
-
972
-
973
-
974
-
975
-
976
- </h3><div class="docstring">
977
- <div class="discussion">
978
-
979
-
980
- </div>
981
- </div>
982
- <div class="tags">
983
- <p class="tag_title">Parameters:</p>
984
- <ul class="param">
985
-
986
- <li>
987
-
988
- <span class='name'>context</span>
989
-
990
-
991
- <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>
992
-
993
-
994
-
995
- </li>
996
-
997
- </ul>
998
-
999
-
1000
- </div><table class="source_code">
1001
- <tr>
1002
- <td>
1003
- <pre class="lines">
1004
-
1005
-
1006
- 28
1007
- 29
1008
- 30
1009
- 31
1010
- 32
1011
- 33
1012
- 34
1013
- 35
1014
- 36
1015
- 37
1016
- 38
1017
- 39
1018
- 40
1019
- 41
1020
- 42
1021
- 43
1022
- 44
1023
- 45
1024
- 46
1025
- 47</pre>
1026
- </td>
1027
- <td>
1028
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 28</span>
1029
-
1030
- <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>
1031
- <span class='comment'># D, [2020-04-12T22:45:03.938754 #46154] DEBUG -- : RECV &lt;&lt; {&quot;method&quot;=&gt;&quot;Runtime.executionContextCreated&quot;, &quot;params&quot;=&gt;{&quot;context&quot;=&gt;{&quot;id&quot;=&gt;3, &quot;origin&quot;=&gt;&quot;https://github.com&quot;, &quot;name&quot;=&gt;&quot;&quot;, &quot;auxData&quot;=&gt;{&quot;isDefault&quot;=&gt;true, &quot;type&quot;=&gt;&quot;default&quot;, &quot;frameId&quot;=&gt;&quot;3AD7F1E82BCBA88BFE31D03BC49FF6CB&quot;}}}, &quot;sessionId&quot;=&gt;&quot;636CEF0C4FEAFC4FE815E9E7B5F7BA68&quot;}
1032
- </span> <span class='comment'># D, [2020-04-12T22:45:03.938856 #46154] DEBUG -- : RECV &lt;&lt; {&quot;method&quot;=&gt;&quot;Runtime.executionContextCreated&quot;, &quot;params&quot;=&gt;{&quot;context&quot;=&gt;{&quot;id&quot;=&gt;4, &quot;origin&quot;=&gt;&quot;://&quot;, &quot;name&quot;=&gt;&quot;__puppeteer_utility_world__&quot;, &quot;auxData&quot;=&gt;{&quot;isDefault&quot;=&gt;false, &quot;type&quot;=&gt;&quot;isolated&quot;, &quot;frameId&quot;=&gt;&quot;3AD7F1E82BCBA88BFE31D03BC49FF6CB&quot;}}}, &quot;sessionId&quot;=&gt;&quot;636CEF0C4FEAFC4FE815E9E7B5F7BA68&quot;}
1033
- </span> <span class='comment'># D, [2020-04-12T22:45:03.938960 #46154] DEBUG -- : RECV &lt;&lt; {&quot;method&quot;=&gt;&quot;Runtime.executionContextDestroyed&quot;, &quot;params&quot;=&gt;{&quot;executionContextId&quot;=&gt;1}, &quot;sessionId&quot;=&gt;&quot;636CEF0C4FEAFC4FE815E9E7B5F7BA68&quot;}
1034
- </span> <span class='comment'># D, [2020-04-12T22:45:03.939110 #46154] DEBUG -- : RECV &lt;&lt; {&quot;method&quot;=&gt;&quot;Page.frameNavigated&quot;, &quot;params&quot;=&gt;{&quot;frame&quot;=&gt;{&quot;id&quot;=&gt;&quot;3AD7F1E82BCBA88BFE31D03BC49FF6CB&quot;, &quot;loaderId&quot;=&gt;&quot;301B349884E582986C502CBE020966DF&quot;, &quot;url&quot;=&gt;&quot;https://github.com/&quot;, &quot;securityOrigin&quot;=&gt;&quot;https://github.com&quot;, &quot;mimeType&quot;=&gt;&quot;text/html&quot;}}, &quot;sessionId&quot;=&gt;&quot;636CEF0C4FEAFC4FE815E9E7B5F7BA68&quot;}
1035
- </span> <span class='comment'># D, [2020-04-12T22:45:03.939793 #46154] DEBUG -- : RECV &lt;&lt; {&quot;method&quot;=&gt;&quot;Runtime.executionContextDestroyed&quot;, &quot;params&quot;=&gt;{&quot;executionContextId&quot;=&gt;2}, &quot;sessionId&quot;=&gt;&quot;636CEF0C4FEAFC4FE815E9E7B5F7BA68&quot;}
1036
- </span> <span class='comment'># executionContextDestroyed is often notified after executionContextCreated.
1037
- </span>
1038
- <span class='kw'>if</span> <span class='id identifier rubyid_context'>context</span>
1039
- <span class='kw'>if</span> <span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfilled?'>fulfilled?</span>
1040
- <span class='ivar'>@pending_destroy</span> <span class='op'>&lt;&lt;</span> <span class='id identifier rubyid_context'>context</span><span class='period'>.</span><span class='id identifier rubyid__context_id'>_context_id</span>
1041
- <span class='ivar'>@document</span> <span class='op'>=</span> <span class='kw'>nil</span>
1042
- <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>
1043
- <span class='kw'>end</span>
1044
- <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>
1045
- <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'>&amp;</span><span class='symbol'>:async_rerun</span><span class='rparen'>)</span>
1046
- <span class='kw'>else</span>
1047
- <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'>&quot;</span><span class='tstring_content'>context should now be nil. Use #delete_context for clearing document.</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1048
- <span class='kw'>end</span>
1049
- <span class='kw'>end</span></pre>
1050
- </td>
1051
- </tr>
1052
- </table>
1053
- </div>
1054
-
1055
- <div class="method_details ">
1056
- <h3 class="signature " id="delete_context-instance_method">
1057
-
1058
- #<strong>delete_context</strong>(execution_context_id) &#x21d2; <tt>Object</tt>
1059
-
1060
-
1061
-
1062
-
1063
-
1064
- </h3><table class="source_code">
1065
- <tr>
1066
- <td>
1067
- <pre class="lines">
1068
-
1069
-
1070
- 49
1071
- 50
1072
- 51
1073
- 52
1074
- 53
1075
- 54
1076
- 55
1077
- 56</pre>
1078
- </td>
1079
- <td>
1080
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 49</span>
1081
-
1082
- <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>
1083
- <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>
1084
- <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>
1085
- <span class='kw'>else</span>
1086
- <span class='ivar'>@document</span> <span class='op'>=</span> <span class='kw'>nil</span>
1087
- <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>
1088
- <span class='kw'>end</span>
1089
- <span class='kw'>end</span></pre>
1090
- </td>
1091
- </tr>
1092
- </table>
1093
- </div>
1094
-
1095
- <div class="method_details ">
1096
- <h3 class="signature " id="detach-instance_method">
1097
-
1098
- #<strong>detach</strong> &#x21d2; <tt>Object</tt>
1099
-
1100
-
1101
-
1102
-
1103
-
1104
- </h3><table class="source_code">
1105
- <tr>
1106
- <td>
1107
- <pre class="lines">
1108
-
1109
-
1110
- 62
1111
- 63
1112
- 64
1113
- 65
1114
- 66
1115
- 67</pre>
1116
- </td>
1117
- <td>
1118
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 62</span>
1119
-
1120
- <span class='kw'>def</span> <span class='id identifier rubyid_detach'>detach</span>
1121
- <span class='ivar'>@detached</span> <span class='op'>=</span> <span class='kw'>true</span>
1122
- <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>
1123
- <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'>&#39;</span><span class='tstring_content'>waitForFunction failed: frame got detached.</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span><span class='rparen'>)</span>
1124
- <span class='kw'>end</span>
1125
- <span class='kw'>end</span></pre>
1126
- </td>
1127
- </tr>
1128
- </table>
1129
- </div>
1130
-
1131
- <div class="method_details ">
1132
- <h3 class="signature " id="evaluate-instance_method">
1133
-
1134
- #<strong>evaluate</strong>(page_function, *args) &#x21d2; <tt>!Promise&lt;*&gt;</tt>
1135
-
1136
-
1137
-
1138
-
1139
-
1140
- </h3><div class="docstring">
1141
- <div class="discussion">
1142
-
1143
-
1144
- </div>
1145
- </div>
1146
- <div class="tags">
1147
- <p class="tag_title">Parameters:</p>
1148
- <ul class="param">
1149
-
1150
- <li>
1151
-
1152
- <span class='name'>pageFunction</span>
1153
-
1154
-
1155
- <span class='type'>(<tt>Function|string</tt>)</span>
1156
-
1157
-
1158
-
1159
- </li>
1160
-
1161
- <li>
1162
-
1163
- <span class='name'>args</span>
1164
-
1165
-
1166
- <span class='type'>(<tt>!Array&lt;*&gt;</tt>)</span>
1167
-
1168
-
1169
-
1170
- </li>
1171
-
1172
- </ul>
1173
-
1174
- <p class="tag_title">Returns:</p>
1175
- <ul class="return">
1176
-
1177
- <li>
1178
-
1179
-
1180
- <span class='type'>(<tt>!Promise&lt;*&gt;</tt>)</span>
1181
-
1182
-
1183
-
1184
- </li>
1185
-
1186
- </ul>
1187
-
1188
- </div><table class="source_code">
1189
- <tr>
1190
- <td>
1191
- <pre class="lines">
1192
-
1193
-
1194
- 89
1195
- 90
1196
- 91</pre>
1197
- </td>
1198
- <td>
1199
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 89</span>
1200
-
1201
- <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>
1202
- <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>
1203
- <span class='kw'>end</span></pre>
1204
- </td>
1205
- </tr>
1206
- </table>
1207
- </div>
1208
-
1209
- <div class="method_details ">
1210
- <h3 class="signature " id="evaluate_handle-instance_method">
1211
-
1212
- #<strong>evaluate_handle</strong>(page_function, *args) &#x21d2; <tt>!Promise&lt;!<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>&gt;</tt>
1213
-
1214
-
1215
-
1216
-
1217
-
1218
- </h3><div class="docstring">
1219
- <div class="discussion">
1220
-
1221
-
1222
- </div>
1223
- </div>
1224
- <div class="tags">
1225
- <p class="tag_title">Parameters:</p>
1226
- <ul class="param">
1227
-
1228
- <li>
1229
-
1230
- <span class='name'>pageFunction</span>
1231
-
1232
-
1233
- <span class='type'>(<tt>Function|string</tt>)</span>
1234
-
1235
-
1236
-
1237
- </li>
1238
-
1239
- <li>
1240
-
1241
- <span class='name'>args</span>
1242
-
1243
-
1244
- <span class='type'>(<tt>!Array&lt;*&gt;</tt>)</span>
1245
-
1246
-
1247
-
1248
- </li>
1249
-
1250
- </ul>
1251
-
1252
- <p class="tag_title">Returns:</p>
1253
- <ul class="return">
1254
-
1255
- <li>
1256
-
1257
-
1258
- <span class='type'>(<tt>!Promise&lt;!<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>&gt;</tt>)</span>
1259
-
1260
-
1261
-
1262
- </li>
1263
-
1264
- </ul>
1265
-
1266
- </div><table class="source_code">
1267
- <tr>
1268
- <td>
1269
- <pre class="lines">
1270
-
1271
-
1272
- 82
1273
- 83
1274
- 84</pre>
1275
- </td>
1276
- <td>
1277
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 82</span>
1278
-
1279
- <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>
1280
- <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>
1281
- <span class='kw'>end</span></pre>
1282
- </td>
1283
- </tr>
1284
- </table>
1285
- </div>
1286
-
1287
- <div class="method_details ">
1288
- <h3 class="signature " id="execution_context-instance_method">
1289
-
1290
- #<strong>execution_context</strong> &#x21d2; <tt>!Promise&lt;!<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>&gt;</tt>
1291
-
1292
-
1293
-
1294
-
1295
-
1296
- </h3><div class="docstring">
1297
- <div class="discussion">
1298
-
1299
-
1300
- </div>
1301
- </div>
1302
- <div class="tags">
1303
-
1304
- <p class="tag_title">Returns:</p>
1305
- <ul class="return">
1306
-
1307
- <li>
1308
-
1309
-
1310
- <span class='type'>(<tt>!Promise&lt;!<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>&gt;</tt>)</span>
1311
-
1312
-
1313
-
1314
- </li>
1315
-
1316
- </ul>
1317
-
1318
- </div><table class="source_code">
1319
- <tr>
1320
- <td>
1321
- <pre class="lines">
1322
-
1323
-
1324
- 72
1325
- 73
1326
- 74
1327
- 75
1328
- 76
1329
- 77</pre>
1330
- </td>
1331
- <td>
1332
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 72</span>
1333
-
1334
- <span class='kw'>def</span> <span class='id identifier rubyid_execution_context'>execution_context</span>
1335
- <span class='kw'>if</span> <span class='ivar'>@detached</span>
1336
- <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'>&quot;</span><span class='tstring_content'>Execution Context is not available in detached frame \&quot;</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'>\&quot; (are you trying to evaluate?)</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1337
- <span class='kw'>end</span>
1338
- <span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_value!'>value!</span>
1339
- <span class='kw'>end</span></pre>
1340
- </td>
1341
- </tr>
1342
- </table>
1343
- </div>
1344
-
1345
- <div class="method_details ">
1346
- <h3 class="signature " id="has_context?-instance_method">
1347
-
1348
- #<strong>has_context?</strong> &#x21d2; <tt>Boolean</tt>
1349
-
1350
-
1351
-
1352
-
1353
-
1354
- </h3><div class="docstring">
1355
- <div class="discussion">
1356
-
1357
-
1358
- </div>
1359
- </div>
1360
- <div class="tags">
1361
-
1362
- <p class="tag_title">Returns:</p>
1363
- <ul class="return">
1364
-
1365
- <li>
1366
-
1367
-
1368
- <span class='type'>(<tt>Boolean</tt>)</span>
1369
-
1370
-
1371
-
1372
- </li>
1373
-
1374
- </ul>
1375
-
1376
- </div><table class="source_code">
1377
- <tr>
1378
- <td>
1379
- <pre class="lines">
1380
-
1381
-
1382
- 58
1383
- 59
1384
- 60</pre>
1385
- </td>
1386
- <td>
1387
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 58</span>
1388
-
1389
- <span class='kw'>def</span> <span class='id identifier rubyid_has_context?'>has_context?</span>
1390
- <span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_resolved?'>resolved?</span>
1391
- <span class='kw'>end</span></pre>
1392
- </td>
1393
- </tr>
1394
- </table>
1395
- </div>
1396
-
1397
- <div class="method_details ">
1398
- <h3 class="signature " id="S-instance_method">
1399
-
1400
- #<strong>S</strong>(selector) &#x21d2; <tt>!Promise&lt;?<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>&gt;</tt>
1401
-
1402
-
1403
-
1404
-
1405
-
1406
- </h3><div class="docstring">
1407
- <div class="discussion">
1408
-
1409
- <p>`$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1410
-
1411
-
1412
- </div>
1413
- </div>
1414
- <div class="tags">
1415
- <p class="tag_title">Parameters:</p>
1416
- <ul class="param">
1417
-
1418
- <li>
1419
-
1420
- <span class='name'>selector</span>
1421
-
1422
-
1423
- <span class='type'>(<tt>string</tt>)</span>
1424
-
1425
-
1426
-
1427
- </li>
1428
-
1429
- </ul>
1430
-
1431
- <p class="tag_title">Returns:</p>
1432
- <ul class="return">
1433
-
1434
- <li>
1435
-
1436
-
1437
- <span class='type'>(<tt>!Promise&lt;?<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>&gt;</tt>)</span>
1438
-
1439
-
1440
-
1441
- </li>
1442
-
1443
- </ul>
1444
-
1445
- </div><table class="source_code">
1446
- <tr>
1447
- <td>
1448
- <pre class="lines">
1449
-
1450
-
1451
- 96
1452
- 97
1453
- 98</pre>
1454
- </td>
1455
- <td>
1456
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 96</span>
1457
-
1458
- <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>
1459
- <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>
1460
- <span class='kw'>end</span></pre>
1461
- </td>
1462
- </tr>
1463
- </table>
1464
- </div>
1465
-
1466
- <div class="method_details ">
1467
- <h3 class="signature " id="select-instance_method">
1468
-
1469
- #<strong>select</strong>(selector, *values) &#x21d2; <tt>Array&lt;String&gt;</tt>
1470
-
1471
-
1472
-
1473
-
1474
-
1475
- </h3><div class="docstring">
1476
- <div class="discussion">
1477
-
1478
-
1479
- </div>
1480
- </div>
1481
- <div class="tags">
1482
- <p class="tag_title">Parameters:</p>
1483
- <ul class="param">
1484
-
1485
- <li>
1486
-
1487
- <span class='name'>selector</span>
1488
-
1489
-
1490
- <span class='type'>(<tt>String</tt>)</span>
1491
-
1492
-
1493
-
1494
- </li>
1495
-
1496
- </ul>
1497
-
1498
- <p class="tag_title">Returns:</p>
1499
- <ul class="return">
1500
-
1501
- <li>
1502
-
1503
-
1504
- <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
1505
-
1506
-
1507
-
1508
- </li>
1509
-
1510
- </ul>
1511
-
1512
- </div><table class="source_code">
1513
- <tr>
1514
- <td>
1515
- <pre class="lines">
1516
-
1517
-
1518
- 361
1519
- 362
1520
- 363
1521
- 364
1522
- 365
1523
- 366
1524
- 367</pre>
1525
- </td>
1526
- <td>
1527
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 361</span>
1528
-
1529
- <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>
1530
- <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>
1531
- <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>
1532
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1533
-
1534
- <span class='id identifier rubyid_result'>result</span>
1535
- <span class='kw'>end</span></pre>
1536
- </td>
1537
- </tr>
1538
- </table>
1539
- </div>
1540
-
1541
- <div class="method_details ">
1542
- <h3 class="signature " id="Seval-instance_method">
1543
-
1544
- #<strong>Seval</strong>(selector, page_function, *args) &#x21d2; <tt>!Promise&lt;(!Object|undefined)&gt;</tt>
1545
-
1546
-
1547
-
1548
-
1549
-
1550
- </h3><div class="docstring">
1551
- <div class="discussion">
1552
-
1553
- <p>`$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1554
-
1555
-
1556
- </div>
1557
- </div>
1558
- <div class="tags">
1559
- <p class="tag_title">Parameters:</p>
1560
- <ul class="param">
1561
-
1562
- <li>
1563
-
1564
- <span class='name'>selector</span>
1565
-
1566
-
1567
- <span class='type'>(<tt>string</tt>)</span>
1568
-
1569
-
1570
-
1571
- </li>
1572
-
1573
- <li>
1574
-
1575
- <span class='name'>pageFunction</span>
1576
-
1577
-
1578
- <span class='type'>(<tt>Function|string</tt>)</span>
1579
-
1580
-
1581
-
1582
- </li>
1583
-
1584
- <li>
1585
-
1586
- <span class='name'>args</span>
1587
-
1588
-
1589
- <span class='type'>(<tt>!Array&lt;*&gt;</tt>)</span>
1590
-
1591
-
1592
-
1593
- </li>
1594
-
1595
- </ul>
1596
-
1597
- <p class="tag_title">Returns:</p>
1598
- <ul class="return">
1599
-
1600
- <li>
1601
-
1602
-
1603
- <span class='type'>(<tt>!Promise&lt;(!Object|undefined)&gt;</tt>)</span>
1604
-
1605
-
1606
-
1607
- </li>
1608
-
1609
- </ul>
1610
-
1611
- </div><table class="source_code">
1612
- <tr>
1613
- <td>
1614
- <pre class="lines">
1615
-
1616
-
1617
- 130
1618
- 131
1619
- 132</pre>
1620
- </td>
1621
- <td>
1622
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 130</span>
1623
-
1624
- <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>
1625
- <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>
1626
- <span class='kw'>end</span></pre>
1627
- </td>
1628
- </tr>
1629
- </table>
1630
- </div>
1631
-
1632
- <div class="method_details ">
1633
- <h3 class="signature " id="SS-instance_method">
1634
-
1635
- #<strong>SS</strong>(selector) &#x21d2; <tt>!Promise&lt;!Array&lt;!<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>&gt;&gt;</tt>
1636
-
1637
-
1638
-
1639
-
1640
-
1641
- </h3><div class="docstring">
1642
- <div class="discussion">
1643
-
1644
- <p>`$$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1645
-
1646
-
1647
- </div>
1648
- </div>
1649
- <div class="tags">
1650
- <p class="tag_title">Parameters:</p>
1651
- <ul class="param">
1652
-
1653
- <li>
1654
-
1655
- <span class='name'>selector</span>
1656
-
1657
-
1658
- <span class='type'>(<tt>string</tt>)</span>
1659
-
1660
-
1661
-
1662
- </li>
1663
-
1664
- </ul>
1665
-
1666
- <p class="tag_title">Returns:</p>
1667
- <ul class="return">
1668
-
1669
- <li>
1670
-
1671
-
1672
- <span class='type'>(<tt>!Promise&lt;!Array&lt;!<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>&gt;&gt;</tt>)</span>
1673
-
1674
-
1675
-
1676
- </li>
1677
-
1678
- </ul>
1679
-
1680
- </div><table class="source_code">
1681
- <tr>
1682
- <td>
1683
- <pre class="lines">
1684
-
1685
-
1686
- 146
1687
- 147
1688
- 148</pre>
1689
- </td>
1690
- <td>
1691
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 146</span>
1692
-
1693
- <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>
1694
- <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>
1695
- <span class='kw'>end</span></pre>
1696
- </td>
1697
- </tr>
1698
- </table>
1699
- </div>
1700
-
1701
- <div class="method_details ">
1702
- <h3 class="signature " id="SSeval-instance_method">
1703
-
1704
- #<strong>SSeval</strong>(selector, page_function, *args) &#x21d2; <tt>!Promise&lt;(!Object|undefined)&gt;</tt>
1705
-
1706
-
1707
-
1708
-
1709
-
1710
- </h3><div class="docstring">
1711
- <div class="discussion">
1712
-
1713
- <p>`$$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1714
-
1715
-
1716
- </div>
1717
- </div>
1718
- <div class="tags">
1719
- <p class="tag_title">Parameters:</p>
1720
- <ul class="param">
1721
-
1722
- <li>
1723
-
1724
- <span class='name'>selector</span>
1725
-
1726
-
1727
- <span class='type'>(<tt>string</tt>)</span>
1728
-
1729
-
1730
-
1731
- </li>
1732
-
1733
- <li>
1734
-
1735
- <span class='name'>pageFunction</span>
1736
-
1737
-
1738
- <span class='type'>(<tt>Function|string</tt>)</span>
1739
-
1740
-
1741
-
1742
- </li>
1743
-
1744
- <li>
1745
-
1746
- <span class='name'>args</span>
1747
-
1748
-
1749
- <span class='type'>(<tt>!Array&lt;*&gt;</tt>)</span>
1750
-
1751
-
1752
-
1753
- </li>
1754
-
1755
- </ul>
1756
-
1757
- <p class="tag_title">Returns:</p>
1758
- <ul class="return">
1759
-
1760
- <li>
1761
-
1762
-
1763
- <span class='type'>(<tt>!Promise&lt;(!Object|undefined)&gt;</tt>)</span>
1764
-
1765
-
1766
-
1767
- </li>
1768
-
1769
- </ul>
1770
-
1771
- </div><table class="source_code">
1772
- <tr>
1773
- <td>
1774
- <pre class="lines">
1775
-
1776
-
1777
- 139
1778
- 140
1779
- 141</pre>
1780
- </td>
1781
- <td>
1782
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 139</span>
1783
-
1784
- <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>
1785
- <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>
1786
- <span class='kw'>end</span></pre>
1787
- </td>
1788
- </tr>
1789
- </table>
1790
- </div>
1791
-
1792
- <div class="method_details ">
1793
- <h3 class="signature " id="Sx-instance_method">
1794
-
1795
- #<strong>Sx</strong>(expression) &#x21d2; <tt>!Promise&lt;!Array&lt;!<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>&gt;&gt;</tt>
1796
-
1797
-
1798
-
1799
-
1800
-
1801
- </h3><div class="docstring">
1802
- <div class="discussion">
1803
-
1804
- <p>`$x()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1805
-
1806
-
1807
- </div>
1808
- </div>
1809
- <div class="tags">
1810
- <p class="tag_title">Parameters:</p>
1811
- <ul class="param">
1812
-
1813
- <li>
1814
-
1815
- <span class='name'>expression</span>
1816
-
1817
-
1818
- <span class='type'>(<tt>string</tt>)</span>
1819
-
1820
-
1821
-
1822
- </li>
1823
-
1824
- </ul>
1825
-
1826
- <p class="tag_title">Returns:</p>
1827
- <ul class="return">
1828
-
1829
- <li>
1830
-
1831
-
1832
- <span class='type'>(<tt>!Promise&lt;!Array&lt;!<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>&gt;&gt;</tt>)</span>
1833
-
1834
-
1835
-
1836
- </li>
1837
-
1838
- </ul>
1839
-
1840
- </div><table class="source_code">
1841
- <tr>
1842
- <td>
1843
- <pre class="lines">
1844
-
1845
-
1846
- 121
1847
- 122
1848
- 123</pre>
1849
- </td>
1850
- <td>
1851
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 121</span>
1852
-
1853
- <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>
1854
- <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>
1855
- <span class='kw'>end</span></pre>
1856
- </td>
1857
- </tr>
1858
- </table>
1859
- </div>
1860
-
1861
- <div class="method_details ">
1862
- <h3 class="signature " id="tap-instance_method">
1863
-
1864
- #<strong>tap</strong>(selector) &#x21d2; <tt>Object</tt>
1865
-
1866
-
1867
-
1868
-
1869
-
1870
- </h3><div class="docstring">
1871
- <div class="discussion">
1872
-
1873
-
1874
- </div>
1875
- </div>
1876
- <div class="tags">
1877
- <p class="tag_title">Parameters:</p>
1878
- <ul class="param">
1879
-
1880
- <li>
1881
-
1882
- <span class='name'>selector</span>
1883
-
1884
-
1885
- <span class='type'>(<tt>String</tt>)</span>
1886
-
1887
-
1888
-
1889
- </li>
1890
-
1891
- </ul>
1892
-
1893
-
1894
- </div><table class="source_code">
1895
- <tr>
1896
- <td>
1897
- <pre class="lines">
1898
-
1899
-
1900
- 370
1901
- 371
1902
- 372
1903
- 373
1904
- 374</pre>
1905
- </td>
1906
- <td>
1907
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 370</span>
1908
-
1909
- <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>
1910
- <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>
1911
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span>
1912
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1913
- <span class='kw'>end</span></pre>
1914
- </td>
1915
- </tr>
1916
- </table>
1917
- </div>
1918
-
1919
- <div class="method_details ">
1920
- <h3 class="signature " id="type_text-instance_method">
1921
-
1922
- #<strong>type_text</strong>(selector, text, delay: nil) &#x21d2; <tt>Object</tt>
1923
-
1924
-
1925
-
1926
-
1927
-
1928
- </h3><div class="docstring">
1929
- <div class="discussion">
1930
-
1931
-
1932
- </div>
1933
- </div>
1934
- <div class="tags">
1935
- <p class="tag_title">Parameters:</p>
1936
- <ul class="param">
1937
-
1938
- <li>
1939
-
1940
- <span class='name'>selector</span>
1941
-
1942
-
1943
- <span class='type'>(<tt>String</tt>)</span>
1944
-
1945
-
1946
-
1947
- </li>
1948
-
1949
- <li>
1950
-
1951
- <span class='name'>text</span>
1952
-
1953
-
1954
- <span class='type'>(<tt>String</tt>)</span>
1955
-
1956
-
1957
-
1958
- </li>
1959
-
1960
- <li>
1961
-
1962
- <span class='name'>delay</span>
1963
-
1964
-
1965
- <span class='type'>(<tt>Number</tt>)</span>
1966
-
1967
-
1968
- <em class="default">(defaults to: <tt>nil</tt>)</em>
1969
-
1970
-
1971
- </li>
1972
-
1973
- </ul>
1974
-
1975
-
1976
- </div><table class="source_code">
1977
- <tr>
1978
- <td>
1979
- <pre class="lines">
1980
-
1981
-
1982
- 379
1983
- 380
1984
- 381
1985
- 382
1986
- 383</pre>
1987
- </td>
1988
- <td>
1989
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 379</span>
1990
-
1991
- <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>
1992
- <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>
1993
- <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>
1994
- <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1995
- <span class='kw'>end</span></pre>
1996
- </td>
1997
- </tr>
1998
- </table>
1999
- </div>
2000
-
2001
- <div class="method_details ">
2002
- <h3 class="signature " id="wait_for_selector-instance_method">
2003
-
2004
- #<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) &#x21d2; <tt>Object</tt>
2005
-
2006
-
2007
-
2008
-
2009
-
2010
- </h3><div class="docstring">
2011
- <div class="discussion">
2012
-
2013
-
2014
- </div>
2015
- </div>
2016
- <div class="tags">
2017
- <p class="tag_title">Parameters:</p>
2018
- <ul class="param">
2019
-
2020
- <li>
2021
-
2022
- <span class='name'>selector</span>
2023
-
2024
-
2025
- <span class='type'>(<tt>String</tt>)</span>
2026
-
2027
-
2028
-
2029
- </li>
2030
-
2031
- <li>
2032
-
2033
- <span class='name'>visible</span>
2034
-
2035
-
2036
- <span class='type'>(<tt>Boolean</tt>)</span>
2037
-
2038
-
2039
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2040
-
2041
-
2042
- &mdash;
2043
- <div class='inline'>
2044
- <p>Wait for element visible (not &#39;display: none&#39; nor &#39;visibility: hidden&#39;) on true. default to false.</p>
2045
- </div>
2046
-
2047
- </li>
2048
-
2049
- <li>
2050
-
2051
- <span class='name'>hidden</span>
2052
-
2053
-
2054
- <span class='type'>(<tt>Boolean</tt>)</span>
2055
-
2056
-
2057
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2058
-
2059
-
2060
- &mdash;
2061
- <div class='inline'>
2062
- <p>Wait for element invisible (&#39;display: none&#39; nor &#39;visibility: hidden&#39;) on true. default to false.</p>
2063
- </div>
2064
-
2065
- </li>
2066
-
2067
- <li>
2068
-
2069
- <span class='name'>timeout</span>
2070
-
2071
-
2072
- <span class='type'>(<tt>Integer</tt>)</span>
2073
-
2074
-
2075
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2076
-
2077
-
2078
- </li>
2079
-
2080
- </ul>
2081
-
2082
-
2083
- </div><table class="source_code">
2084
- <tr>
2085
- <td>
2086
- <pre class="lines">
2087
-
2088
-
2089
- 389
2090
- 390
2091
- 391</pre>
2092
- </td>
2093
- <td>
2094
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 389</span>
2095
-
2096
- <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>
2097
- <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>
2098
- <span class='kw'>end</span></pre>
2099
- </td>
2100
- </tr>
2101
- </table>
2102
- </div>
2103
-
2104
- <div class="method_details ">
2105
- <h3 class="signature " id="wait_for_xpath-instance_method">
2106
-
2107
- #<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) &#x21d2; <tt>Object</tt>
2108
-
2109
-
2110
-
2111
-
2112
-
2113
- </h3><div class="docstring">
2114
- <div class="discussion">
2115
-
2116
-
2117
- </div>
2118
- </div>
2119
- <div class="tags">
2120
- <p class="tag_title">Parameters:</p>
2121
- <ul class="param">
2122
-
2123
- <li>
2124
-
2125
- <span class='name'>xpath</span>
2126
-
2127
-
2128
- <span class='type'>(<tt>String</tt>)</span>
2129
-
2130
-
2131
-
2132
- </li>
2133
-
2134
- <li>
2135
-
2136
- <span class='name'>visible</span>
2137
-
2138
-
2139
- <span class='type'>(<tt>Boolean</tt>)</span>
2140
-
2141
-
2142
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2143
-
2144
-
2145
- &mdash;
2146
- <div class='inline'>
2147
- <p>Wait for element visible (not &#39;display: none&#39; nor &#39;visibility: hidden&#39;) on true. default to false.</p>
2148
- </div>
2149
-
2150
- </li>
2151
-
2152
- <li>
2153
-
2154
- <span class='name'>hidden</span>
2155
-
2156
-
2157
- <span class='type'>(<tt>Boolean</tt>)</span>
2158
-
2159
-
2160
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2161
-
2162
-
2163
- &mdash;
2164
- <div class='inline'>
2165
- <p>Wait for element invisible (&#39;display: none&#39; nor &#39;visibility: hidden&#39;) on true. default to false.</p>
2166
- </div>
2167
-
2168
- </li>
2169
-
2170
- <li>
2171
-
2172
- <span class='name'>timeout</span>
2173
-
2174
-
2175
- <span class='type'>(<tt>Integer</tt>)</span>
2176
-
2177
-
2178
- <em class="default">(defaults to: <tt>nil</tt>)</em>
2179
-
2180
-
2181
- </li>
2182
-
2183
- </ul>
2184
-
2185
-
2186
- </div><table class="source_code">
2187
- <tr>
2188
- <td>
2189
- <pre class="lines">
2190
-
2191
-
2192
- 397
2193
- 398
2194
- 399</pre>
2195
- </td>
2196
- <td>
2197
- <pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 397</span>
2198
-
2199
- <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>
2200
- <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>
2201
- <span class='kw'>end</span></pre>
2202
- </td>
2203
- </tr>
2204
- </table>
2205
- </div>
2206
-
2207
- </div>
2208
-
2209
- </div>
2210
-
2211
- <div id="footer">
2212
- Generated on Tue Jun 23 10:24:59 2020 by
2213
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
2214
- 0.9.24 (ruby-2.6.3).
2215
- </div>
2216
-
2217
- </div>
2218
- </body>
2219
- </html>