puppeteer-ruby 0.0.3 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (125) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.github/stale.yml +16 -0
  4. data/.rubocop.yml +4 -5
  5. data/README.md +4 -1
  6. data/docs/Puppeteer.html +2020 -0
  7. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  8. data/docs/Puppeteer/Browser.html +2150 -0
  9. data/docs/Puppeteer/BrowserContext.html +809 -0
  10. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  11. data/docs/Puppeteer/BrowserRunner.html +914 -0
  12. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  13. data/docs/Puppeteer/CDPSession.html +813 -0
  14. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  15. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  16. data/docs/Puppeteer/Connection.html +960 -0
  17. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  18. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  19. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  20. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  21. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  22. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  23. data/docs/Puppeteer/DOMWorld.html +2219 -0
  24. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  25. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  26. data/docs/Puppeteer/DebugPrint.html +233 -0
  27. data/docs/Puppeteer/Device.html +470 -0
  28. data/docs/Puppeteer/Devices.html +139 -0
  29. data/docs/Puppeteer/ElementHandle.html +2224 -0
  30. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  31. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  32. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  33. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  34. data/docs/Puppeteer/EmulationManager.html +454 -0
  35. data/docs/Puppeteer/EventCallbackable.html +433 -0
  36. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  37. data/docs/Puppeteer/ExecutionContext.html +998 -0
  38. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  39. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  40. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  41. data/docs/Puppeteer/FileChooser.html +455 -0
  42. data/docs/Puppeteer/Frame.html +3677 -0
  43. data/docs/Puppeteer/FrameManager.html +2414 -0
  44. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  45. data/docs/Puppeteer/IfPresent.html +222 -0
  46. data/docs/Puppeteer/JSHandle.html +1352 -0
  47. data/docs/Puppeteer/Keyboard.html +1557 -0
  48. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  49. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  50. data/docs/Puppeteer/Launcher.html +237 -0
  51. data/docs/Puppeteer/Launcher/Base.html +385 -0
  52. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  53. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  54. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  55. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  56. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  57. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  58. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  59. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  60. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  61. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  62. data/docs/Puppeteer/Mouse.html +1105 -0
  63. data/docs/Puppeteer/Mouse/Button.html +136 -0
  64. data/docs/Puppeteer/NetworkManager.html +901 -0
  65. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  66. data/docs/Puppeteer/Page.html +5970 -0
  67. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  68. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  69. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  70. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  71. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  72. data/docs/Puppeteer/RemoteObject.html +1016 -0
  73. data/docs/Puppeteer/Target.html +1384 -0
  74. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  75. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  76. data/docs/Puppeteer/TimeoutError.html +135 -0
  77. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  78. data/docs/Puppeteer/TouchScreen.html +464 -0
  79. data/docs/Puppeteer/Viewport.html +757 -0
  80. data/docs/Puppeteer/WaitTask.html +637 -0
  81. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  82. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  83. data/docs/Puppeteer/WebSocket.html +673 -0
  84. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  85. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  86. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  87. data/docs/_index.html +809 -0
  88. data/docs/class_list.html +51 -0
  89. data/docs/css/common.css +1 -0
  90. data/docs/css/full_list.css +58 -0
  91. data/docs/css/style.css +496 -0
  92. data/docs/file.README.html +123 -0
  93. data/docs/file_list.html +56 -0
  94. data/docs/frames.html +17 -0
  95. data/docs/index.html +123 -0
  96. data/docs/js/app.js +314 -0
  97. data/docs/js/full_list.js +216 -0
  98. data/docs/js/jquery.js +4 -0
  99. data/docs/method_list.html +3979 -0
  100. data/docs/top-level-namespace.html +126 -0
  101. data/lib/puppeteer.rb +16 -8
  102. data/lib/puppeteer/async_await_behavior.rb +6 -0
  103. data/lib/puppeteer/browser.rb +21 -1
  104. data/lib/puppeteer/browser_runner.rb +1 -1
  105. data/lib/puppeteer/cdp_session.rb +33 -11
  106. data/lib/puppeteer/connection.rb +1 -1
  107. data/lib/puppeteer/dom_world.rb +142 -121
  108. data/lib/puppeteer/element_handle.rb +223 -181
  109. data/lib/puppeteer/execution_context.rb +41 -17
  110. data/lib/puppeteer/file_chooser.rb +29 -0
  111. data/lib/puppeteer/frame.rb +23 -15
  112. data/lib/puppeteer/frame_manager.rb +7 -9
  113. data/lib/puppeteer/js_handle.rb +3 -3
  114. data/lib/puppeteer/keyboard.rb +1 -1
  115. data/lib/puppeteer/keyboard/us_keyboard_layout.rb +4 -4
  116. data/lib/puppeteer/launcher.rb +0 -1
  117. data/lib/puppeteer/launcher/chrome.rb +48 -2
  118. data/lib/puppeteer/lifecycle_watcher.rb +9 -4
  119. data/lib/puppeteer/mouse.rb +10 -7
  120. data/lib/puppeteer/page.rb +134 -70
  121. data/lib/puppeteer/remote_object.rb +11 -1
  122. data/lib/puppeteer/version.rb +1 -1
  123. data/lib/puppeteer/wait_task.rb +183 -1
  124. data/puppeteer-ruby.gemspec +4 -1
  125. metadata +143 -4
@@ -0,0 +1,389 @@
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::JavaScriptFunction
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::ExecutionContext::JavaScriptFunction";
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 (J)</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="../ExecutionContext.html" title="Puppeteer::ExecutionContext (class)">ExecutionContext</a></span></span>
41
+ &raquo;
42
+ <span class="title">JavaScriptFunction</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::JavaScriptFunction
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::JavaScriptFunction</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
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+ <h2>
116
+ Instance Method Summary
117
+ <small><a href="#" class="summary_toggle">collapse</a></small>
118
+ </h2>
119
+
120
+ <ul class="summary">
121
+
122
+ <li class="public ">
123
+ <span class="summary_signature">
124
+
125
+ <a href="#evaluate_with-instance_method" title="#evaluate_with (instance method)">#<strong>evaluate_with</strong>(client:, context_id:) &#x21d2; Object|JSHandle </a>
126
+
127
+
128
+
129
+ </span>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+ <span class="summary_desc"><div class='inline'></div></span>
140
+
141
+ </li>
142
+
143
+
144
+ <li class="public ">
145
+ <span class="summary_signature">
146
+
147
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(execution_context, expression, args, return_by_value) &#x21d2; JavaScriptFunction </a>
148
+
149
+
150
+
151
+ </span>
152
+
153
+
154
+ <span class="note title constructor">constructor</span>
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+
163
+ <span class="summary_desc"><div class='inline'>
164
+ <p>A new instance of JavaScriptFunction.</p>
165
+ </div></span>
166
+
167
+ </li>
168
+
169
+
170
+ </ul>
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+
181
+
182
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="../IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></h3>
183
+ <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>
184
+ <div id="constructor_details" class="method_details_list">
185
+ <h2>Constructor Details</h2>
186
+
187
+ <div class="method_details first">
188
+ <h3 class="signature first" id="initialize-instance_method">
189
+
190
+ #<strong>initialize</strong>(execution_context, expression, args, return_by_value) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::ExecutionContext::JavaScriptFunction (class)">JavaScriptFunction</a></span></tt>
191
+
192
+
193
+
194
+
195
+
196
+ </h3><div class="docstring">
197
+ <div class="discussion">
198
+
199
+ <p>Returns a new instance of JavaScriptFunction.</p>
200
+
201
+
202
+ </div>
203
+ </div>
204
+ <div class="tags">
205
+
206
+
207
+ </div><table class="source_code">
208
+ <tr>
209
+ <td>
210
+ <pre class="lines">
211
+
212
+
213
+ 95
214
+ 96
215
+ 97
216
+ 98
217
+ 99
218
+ 100</pre>
219
+ </td>
220
+ <td>
221
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 95</span>
222
+
223
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context'>execution_context</span><span class='comma'>,</span> <span class='id identifier rubyid_expression'>expression</span><span class='comma'>,</span> <span class='id identifier rubyid_args'>args</span><span class='comma'>,</span> <span class='id identifier rubyid_return_by_value'>return_by_value</span><span class='rparen'>)</span>
224
+ <span class='ivar'>@execution_context</span> <span class='op'>=</span> <span class='id identifier rubyid_execution_context'>execution_context</span>
225
+ <span class='ivar'>@expression</span> <span class='op'>=</span> <span class='id identifier rubyid_expression'>expression</span>
226
+ <span class='ivar'>@return_by_value</span> <span class='op'>=</span> <span class='id identifier rubyid_return_by_value'>return_by_value</span>
227
+ <span class='ivar'>@args</span> <span class='op'>=</span> <span class='id identifier rubyid_args'>args</span>
228
+ <span class='kw'>end</span></pre>
229
+ </td>
230
+ </tr>
231
+ </table>
232
+ </div>
233
+
234
+ </div>
235
+
236
+
237
+ <div id="instance_method_details" class="method_details_list">
238
+ <h2>Instance Method Details</h2>
239
+
240
+
241
+ <div class="method_details first">
242
+ <h3 class="signature first" id="evaluate_with-instance_method">
243
+
244
+ #<strong>evaluate_with</strong>(client:, context_id:) &#x21d2; <tt>Object|<span class='object_link'><a href="../JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></tt>
245
+
246
+
247
+
248
+
249
+
250
+ </h3><div class="docstring">
251
+ <div class="discussion">
252
+
253
+
254
+ </div>
255
+ </div>
256
+ <div class="tags">
257
+ <p class="tag_title">Parameters:</p>
258
+ <ul class="param">
259
+
260
+ <li>
261
+
262
+ <span class='name'>client</span>
263
+
264
+
265
+ <span class='type'>(<tt><span class='object_link'><a href="../CDPSession.html" title="Puppeteer::CDPSession (class)">Puppeteer::CDPSession</a></span></tt>)</span>
266
+
267
+
268
+
269
+ </li>
270
+
271
+ <li>
272
+
273
+ <span class='name'>context_id</span>
274
+
275
+
276
+ <span class='type'>(<tt>String</tt>)</span>
277
+
278
+
279
+
280
+ </li>
281
+
282
+ </ul>
283
+
284
+ <p class="tag_title">Returns:</p>
285
+ <ul class="return">
286
+
287
+ <li>
288
+
289
+
290
+ <span class='type'>(<tt>Object|<span class='object_link'><a href="../JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></tt>)</span>
291
+
292
+
293
+
294
+ </li>
295
+
296
+ </ul>
297
+
298
+ </div><table class="source_code">
299
+ <tr>
300
+ <td>
301
+ <pre class="lines">
302
+
303
+
304
+ 105
305
+ 106
306
+ 107
307
+ 108
308
+ 109
309
+ 110
310
+ 111
311
+ 112
312
+ 113
313
+ 114
314
+ 115
315
+ 116
316
+ 117
317
+ 118
318
+ 119
319
+ 120
320
+ 121
321
+ 122
322
+ 123
323
+ 124
324
+ 125
325
+ 126
326
+ 127
327
+ 128
328
+ 129
329
+ 130
330
+ 131
331
+ 132
332
+ 133
333
+ 134
334
+ 135
335
+ 136</pre>
336
+ </td>
337
+ <td>
338
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/execution_context.rb', line 105</span>
339
+
340
+ <span class='kw'>def</span> <span class='id identifier rubyid_evaluate_with'>evaluate_with</span><span class='lparen'>(</span><span class='label'>client:</span><span class='comma'>,</span> <span class='label'>context_id:</span><span class='rparen'>)</span>
341
+ <span class='comment'># `function` can be omitted in JS after ES2015.
342
+ </span> <span class='comment'># https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Operators/Object_initializer
343
+ </span> <span class='comment'>#
344
+ </span> <span class='comment'># Original puppeteer implementation take it into consideration.
345
+ </span> <span class='comment'># But we don&#39;t support the syntax here.
346
+ </span>
347
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>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'>&#39;</span><span class='tstring_content'>Runtime.callFunctionOn</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
348
+ <span class='label'>functionDeclaration:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='embexpr_beg'>#{</span><span class='ivar'>@expression</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_suffix'>suffix</span><span class='embexpr_end'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span><span class='comma'>,</span>
349
+ <span class='label'>executionContextId:</span> <span class='id identifier rubyid_context_id'>context_id</span><span class='comma'>,</span>
350
+ <span class='label'>arguments:</span> <span class='id identifier rubyid_converted_args'>converted_args</span><span class='comma'>,</span>
351
+ <span class='label'>returnByValue:</span> <span class='ivar'>@return_by_value</span><span class='comma'>,</span>
352
+ <span class='label'>awaitPromise:</span> <span class='kw'>true</span><span class='comma'>,</span>
353
+ <span class='label'>userGesture:</span> <span class='kw'>true</span><span class='comma'>,</span>
354
+ <span class='rparen'>)</span> <span class='comment'># .catch(rewriteError);
355
+ </span>
356
+ <span class='id identifier rubyid_exception_details'>exception_details</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>exceptionDetails</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
357
+ <span class='id identifier rubyid_remote_object'>remote_object</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="../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_result'>result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>result</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
358
+
359
+ <span class='kw'>if</span> <span class='id identifier rubyid_exception_details'>exception_details</span>
360
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="EvaluationError.html" title="Puppeteer::ExecutionContext::EvaluationError (class)">EvaluationError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="../ExecutionContext.html#initialize-instance_method" title="Puppeteer::ExecutionContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Evaluation failed: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_exception_details'>exception_details</span><span class='embexpr_end'>}</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
361
+ <span class='kw'>end</span>
362
+
363
+ <span class='kw'>if</span> <span class='ivar'>@return_by_value</span>
364
+ <span class='id identifier rubyid_remote_object'>remote_object</span><span class='period'>.</span><span class='id identifier rubyid_value'>value</span>
365
+ <span class='kw'>else</span>
366
+ <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>
367
+ <span class='label'>context:</span> <span class='ivar'>@execution_context</span><span class='comma'>,</span>
368
+ <span class='label'>remote_object:</span> <span class='id identifier rubyid_remote_object'>remote_object</span><span class='comma'>,</span>
369
+ <span class='rparen'>)</span>
370
+ <span class='kw'>end</span>
371
+ <span class='kw'>end</span></pre>
372
+ </td>
373
+ </tr>
374
+ </table>
375
+ </div>
376
+
377
+ </div>
378
+
379
+ </div>
380
+
381
+ <div id="footer">
382
+ Generated on Thu Jun 4 23:54:43 2020 by
383
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
384
+ 0.9.24 (ruby-2.6.3).
385
+ </div>
386
+
387
+ </div>
388
+ </body>
389
+ </html>
@@ -0,0 +1,455 @@
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::FileChooser
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::FileChooser";
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 (F)</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">FileChooser</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::FileChooser
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::FileChooser</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/file_chooser.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+ <h2>
111
+ Instance Method Summary
112
+ <small><a href="#" class="summary_toggle">collapse</a></small>
113
+ </h2>
114
+
115
+ <ul class="summary">
116
+
117
+ <li class="public ">
118
+ <span class="summary_signature">
119
+
120
+ <a href="#accept-instance_method" title="#accept (instance method)">#<strong>accept</strong>(file_paths) &#x21d2; Object </a>
121
+
122
+
123
+
124
+ </span>
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+ <span class="summary_desc"><div class='inline'></div></span>
135
+
136
+ </li>
137
+
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#cancel-instance_method" title="#cancel (instance method)">#<strong>cancel</strong> &#x21d2; Object </a>
143
+
144
+
145
+
146
+ </span>
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+ <span class="summary_desc"><div class='inline'></div></span>
157
+
158
+ </li>
159
+
160
+
161
+ <li class="public ">
162
+ <span class="summary_signature">
163
+
164
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(element, event) &#x21d2; FileChooser </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+ <span class="note title constructor">constructor</span>
172
+
173
+
174
+
175
+
176
+
177
+
178
+
179
+
180
+ <span class="summary_desc"><div class='inline'>
181
+ <p>A new instance of FileChooser.</p>
182
+ </div></span>
183
+
184
+ </li>
185
+
186
+
187
+ <li class="public ">
188
+ <span class="summary_signature">
189
+
190
+ <a href="#multiple%3F-instance_method" title="#multiple? (instance method)">#<strong>multiple?</strong> &#x21d2; Boolean </a>
191
+
192
+
193
+
194
+ </span>
195
+
196
+
197
+
198
+
199
+
200
+
201
+
202
+
203
+
204
+ <span class="summary_desc"><div class='inline'></div></span>
205
+
206
+ </li>
207
+
208
+
209
+ </ul>
210
+
211
+
212
+ <div id="constructor_details" class="method_details_list">
213
+ <h2>Constructor Details</h2>
214
+
215
+ <div class="method_details first">
216
+ <h3 class="signature first" id="initialize-instance_method">
217
+
218
+ #<strong>initialize</strong>(element, event) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::FileChooser (class)">FileChooser</a></span></tt>
219
+
220
+
221
+
222
+
223
+
224
+ </h3><div class="docstring">
225
+ <div class="discussion">
226
+
227
+ <p>Returns a new instance of FileChooser.</p>
228
+
229
+
230
+ </div>
231
+ </div>
232
+ <div class="tags">
233
+ <p class="tag_title">Parameters:</p>
234
+ <ul class="param">
235
+
236
+ <li>
237
+
238
+ <span class='name'>element</span>
239
+
240
+
241
+ <span class='type'>(<tt><span class='object_link'><a href="ElementHandle.html" title="Puppeteer::ElementHandle (class)">Puppeteer::ElementHandle</a></span></tt>)</span>
242
+
243
+
244
+
245
+ </li>
246
+
247
+ <li>
248
+
249
+ <span class='name'>event</span>
250
+
251
+
252
+ <span class='type'>(<tt>Hash</tt>)</span>
253
+
254
+
255
+
256
+ </li>
257
+
258
+ </ul>
259
+
260
+
261
+ </div><table class="source_code">
262
+ <tr>
263
+ <td>
264
+ <pre class="lines">
265
+
266
+
267
+ 4
268
+ 5
269
+ 6
270
+ 7
271
+ 8</pre>
272
+ </td>
273
+ <td>
274
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/file_chooser.rb', line 4</span>
275
+
276
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_element'>element</span><span class='comma'>,</span> <span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
277
+ <span class='ivar'>@element</span> <span class='op'>=</span> <span class='id identifier rubyid_element'>element</span>
278
+ <span class='ivar'>@multiple</span> <span class='op'>=</span> <span class='id identifier rubyid_event'>event</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mode</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span> <span class='op'>!=</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>selectSingle</span><span class='tstring_end'>&#39;</span></span>
279
+ <span class='ivar'>@handled</span> <span class='op'>=</span> <span class='kw'>false</span>
280
+ <span class='kw'>end</span></pre>
281
+ </td>
282
+ </tr>
283
+ </table>
284
+ </div>
285
+
286
+ </div>
287
+
288
+
289
+ <div id="instance_method_details" class="method_details_list">
290
+ <h2>Instance Method Details</h2>
291
+
292
+
293
+ <div class="method_details first">
294
+ <h3 class="signature first" id="accept-instance_method">
295
+
296
+ #<strong>accept</strong>(file_paths) &#x21d2; <tt>Object</tt>
297
+
298
+
299
+
300
+
301
+
302
+ </h3><div class="docstring">
303
+ <div class="discussion">
304
+
305
+
306
+ </div>
307
+ </div>
308
+ <div class="tags">
309
+ <p class="tag_title">Parameters:</p>
310
+ <ul class="param">
311
+
312
+ <li>
313
+
314
+ <span class='name'>file_paths</span>
315
+
316
+
317
+ <span class='type'>(<tt>Array&lt;String&gt;</tt>)</span>
318
+
319
+
320
+
321
+ </li>
322
+
323
+ </ul>
324
+
325
+
326
+ </div><table class="source_code">
327
+ <tr>
328
+ <td>
329
+ <pre class="lines">
330
+
331
+
332
+ 15
333
+ 16
334
+ 17
335
+ 18
336
+ 19
337
+ 20
338
+ 21</pre>
339
+ </td>
340
+ <td>
341
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/file_chooser.rb', line 15</span>
342
+
343
+ <span class='kw'>def</span> <span class='id identifier rubyid_accept'>accept</span><span class='lparen'>(</span><span class='id identifier rubyid_file_paths'>file_paths</span><span class='rparen'>)</span>
344
+ <span class='kw'>if</span> <span class='ivar'>@handled</span>
345
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Cannot accept FileChooser which is already handled!</span><span class='tstring_end'>&#39;</span></span>
346
+ <span class='kw'>end</span>
347
+ <span class='ivar'>@handled</span> <span class='op'>=</span> <span class='kw'>true</span>
348
+ <span class='ivar'>@element</span><span class='period'>.</span><span class='id identifier rubyid_upload_file'>upload_file</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_file_paths'>file_paths</span><span class='rparen'>)</span>
349
+ <span class='kw'>end</span></pre>
350
+ </td>
351
+ </tr>
352
+ </table>
353
+ </div>
354
+
355
+ <div class="method_details ">
356
+ <h3 class="signature " id="cancel-instance_method">
357
+
358
+ #<strong>cancel</strong> &#x21d2; <tt>Object</tt>
359
+
360
+
361
+
362
+
363
+
364
+ </h3><table class="source_code">
365
+ <tr>
366
+ <td>
367
+ <pre class="lines">
368
+
369
+
370
+ 23
371
+ 24
372
+ 25
373
+ 26
374
+ 27
375
+ 28</pre>
376
+ </td>
377
+ <td>
378
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/file_chooser.rb', line 23</span>
379
+
380
+ <span class='kw'>def</span> <span class='id identifier rubyid_cancel'>cancel</span>
381
+ <span class='kw'>if</span> <span class='ivar'>@handled</span>
382
+ <span class='id identifier rubyid_raise'>raise</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Cannot cancel FileChooser which is already handled!</span><span class='tstring_end'>&#39;</span></span>
383
+ <span class='kw'>end</span>
384
+ <span class='ivar'>@handled</span> <span class='op'>=</span> <span class='kw'>true</span>
385
+ <span class='kw'>end</span></pre>
386
+ </td>
387
+ </tr>
388
+ </table>
389
+ </div>
390
+
391
+ <div class="method_details ">
392
+ <h3 class="signature " id="multiple?-instance_method">
393
+
394
+ #<strong>multiple?</strong> &#x21d2; <tt>Boolean</tt>
395
+
396
+
397
+
398
+
399
+
400
+ </h3><div class="docstring">
401
+ <div class="discussion">
402
+
403
+
404
+ </div>
405
+ </div>
406
+ <div class="tags">
407
+
408
+ <p class="tag_title">Returns:</p>
409
+ <ul class="return">
410
+
411
+ <li>
412
+
413
+
414
+ <span class='type'>(<tt>Boolean</tt>)</span>
415
+
416
+
417
+
418
+ </li>
419
+
420
+ </ul>
421
+
422
+ </div><table class="source_code">
423
+ <tr>
424
+ <td>
425
+ <pre class="lines">
426
+
427
+
428
+ 10
429
+ 11
430
+ 12</pre>
431
+ </td>
432
+ <td>
433
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/file_chooser.rb', line 10</span>
434
+
435
+ <span class='kw'>def</span> <span class='id identifier rubyid_multiple?'>multiple?</span>
436
+ <span class='ivar'>@multiple</span>
437
+ <span class='kw'>end</span></pre>
438
+ </td>
439
+ </tr>
440
+ </table>
441
+ </div>
442
+
443
+ </div>
444
+
445
+ </div>
446
+
447
+ <div id="footer">
448
+ Generated on Thu Jun 4 23:54:42 2020 by
449
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
450
+ 0.9.24 (ruby-2.6.3).
451
+ </div>
452
+
453
+ </div>
454
+ </body>
455
+ </html>