puppeteer-ruby 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.rubocop.yml +4 -5
  4. data/docs/Puppeteer.html +2010 -0
  5. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  6. data/docs/Puppeteer/Browser.html +2150 -0
  7. data/docs/Puppeteer/BrowserContext.html +809 -0
  8. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  9. data/docs/Puppeteer/BrowserRunner.html +914 -0
  10. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  11. data/docs/Puppeteer/CDPSession.html +784 -0
  12. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  13. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  14. data/docs/Puppeteer/Connection.html +960 -0
  15. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  16. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  17. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  18. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  19. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  20. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  21. data/docs/Puppeteer/DOMWorld.html +1580 -0
  22. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  23. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  24. data/docs/Puppeteer/DebugPrint.html +233 -0
  25. data/docs/Puppeteer/Device.html +470 -0
  26. data/docs/Puppeteer/Devices.html +139 -0
  27. data/docs/Puppeteer/ElementHandle.html +1603 -0
  28. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  29. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  30. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  31. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  32. data/docs/Puppeteer/EmulationManager.html +454 -0
  33. data/docs/Puppeteer/EventCallbackable.html +433 -0
  34. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  35. data/docs/Puppeteer/ExecutionContext.html +772 -0
  36. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  37. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  38. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  39. data/docs/Puppeteer/Frame.html +3625 -0
  40. data/docs/Puppeteer/FrameManager.html +2414 -0
  41. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  42. data/docs/Puppeteer/IfPresent.html +222 -0
  43. data/docs/Puppeteer/JSHandle.html +1352 -0
  44. data/docs/Puppeteer/Keyboard.html +1557 -0
  45. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  46. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  47. data/docs/Puppeteer/Launcher.html +237 -0
  48. data/docs/Puppeteer/Launcher/Base.html +385 -0
  49. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  50. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  51. data/docs/Puppeteer/Launcher/Chrome.html +628 -0
  52. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  53. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  54. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  55. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  56. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  57. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  58. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  59. data/docs/Puppeteer/Mouse.html +1105 -0
  60. data/docs/Puppeteer/Mouse/Button.html +136 -0
  61. data/docs/Puppeteer/NetworkManager.html +901 -0
  62. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  63. data/docs/Puppeteer/Page.html +5426 -0
  64. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  65. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  66. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  67. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  68. data/docs/Puppeteer/RemoteObject.html +951 -0
  69. data/docs/Puppeteer/Target.html +1384 -0
  70. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  71. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  72. data/docs/Puppeteer/TimeoutError.html +135 -0
  73. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  74. data/docs/Puppeteer/TouchScreen.html +464 -0
  75. data/docs/Puppeteer/Viewport.html +757 -0
  76. data/docs/Puppeteer/WaitTask.html +211 -0
  77. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  78. data/docs/Puppeteer/WebSocket.html +673 -0
  79. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  80. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  81. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  82. data/docs/_index.html +788 -0
  83. data/docs/class_list.html +51 -0
  84. data/docs/css/common.css +1 -0
  85. data/docs/css/full_list.css +58 -0
  86. data/docs/css/style.css +496 -0
  87. data/docs/file.README.html +121 -0
  88. data/docs/file_list.html +56 -0
  89. data/docs/frames.html +17 -0
  90. data/docs/index.html +121 -0
  91. data/docs/js/app.js +314 -0
  92. data/docs/js/full_list.js +216 -0
  93. data/docs/js/jquery.js +4 -0
  94. data/docs/method_list.html +3747 -0
  95. data/docs/top-level-namespace.html +126 -0
  96. data/lib/puppeteer.rb +9 -7
  97. data/lib/puppeteer/async_await_behavior.rb +6 -0
  98. data/lib/puppeteer/browser.rb +21 -1
  99. data/lib/puppeteer/connection.rb +1 -1
  100. data/lib/puppeteer/dom_world.rb +15 -2
  101. data/lib/puppeteer/element_handle.rb +3 -2
  102. data/lib/puppeteer/frame.rb +4 -0
  103. data/lib/puppeteer/frame_manager.rb +1 -1
  104. data/lib/puppeteer/js_handle.rb +3 -2
  105. data/lib/puppeteer/launcher.rb +0 -1
  106. data/lib/puppeteer/lifecycle_watcher.rb +3 -3
  107. data/lib/puppeteer/page.rb +6 -4
  108. data/lib/puppeteer/version.rb +1 -1
  109. data/puppeteer-ruby.gemspec +4 -1
  110. metadata +138 -4
@@ -0,0 +1,139 @@
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::Devices
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::Devices";
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">Devices</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::Devices
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::Devices</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/devices.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>Instead of Puppeteer::DEVICES[“iPhone X”], Puppeteer::DEVICES[“iPad Pro”],</p>
106
+ <ul><li>
107
+ <p>Puppeteer::Devices.iPhone_X</p>
108
+ </li><li>
109
+ <p>Puppeteer::Devices.iPad_Pro</p>
110
+ </li></ul>
111
+
112
+ <p>etc…</p>
113
+
114
+
115
+ </div>
116
+ </div>
117
+ <div class="tags">
118
+
119
+
120
+ </div>
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+ </div>
130
+
131
+ <div id="footer">
132
+ Generated on Sun Apr 26 15:52:56 2020 by
133
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
134
+ 0.9.24 (ruby-2.6.3).
135
+ </div>
136
+
137
+ </div>
138
+ </body>
139
+ </html>
@@ -0,0 +1,1603 @@
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::ElementHandle
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::ElementHandle";
19
+ relpath = '../';
20
+ </script>
21
+
22
+
23
+ <script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
24
+
25
+ <script type="text/javascript" charset="utf-8" src="../js/app.js"></script>
26
+
27
+
28
+ </head>
29
+ <body>
30
+ <div class="nav_wrap">
31
+ <iframe id="nav" src="../class_list.html?1"></iframe>
32
+ <div id="resizer"></div>
33
+ </div>
34
+
35
+ <div id="main" tabindex="-1">
36
+ <div id="header">
37
+ <div id="menu">
38
+
39
+ <a href="../_index.html">Index (E)</a> &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">ElementHandle</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::ElementHandle
63
+
64
+
65
+
66
+ </h1>
67
+ <div class="box_info">
68
+
69
+ <dl>
70
+ <dt>Inherits:</dt>
71
+ <dd>
72
+ <span class="inheritName"><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></span>
73
+
74
+ <ul class="fullTree">
75
+ <li>Object</li>
76
+
77
+ <li class="next"><span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></li>
78
+
79
+ <li class="next">Puppeteer::ElementHandle</li>
80
+
81
+ </ul>
82
+ <a href="#" class="inheritanceTree">show all</a>
83
+
84
+ </dd>
85
+ </dl>
86
+
87
+
88
+
89
+
90
+
91
+
92
+ <dl>
93
+ <dt>Includes:</dt>
94
+ <dd><span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></dd>
95
+ </dl>
96
+
97
+
98
+
99
+
100
+
101
+
102
+ <dl>
103
+ <dt>Defined in:</dt>
104
+ <dd>lib/puppeteer/element_handle.rb</dd>
105
+ </dl>
106
+
107
+ </div>
108
+
109
+ <h2>Defined Under Namespace</h2>
110
+ <p class="children">
111
+
112
+
113
+
114
+
115
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="ElementHandle/ElementNotFoundError.html" title="Puppeteer::ElementHandle::ElementNotFoundError (class)">ElementNotFoundError</a></span>, <span class='object_link'><a href="ElementHandle/ElementNotVisibleError.html" title="Puppeteer::ElementHandle::ElementNotVisibleError (class)">ElementNotVisibleError</a></span>, <span class='object_link'><a href="ElementHandle/Point.html" title="Puppeteer::ElementHandle::Point (class)">Point</a></span>, <span class='object_link'><a href="ElementHandle/ScrollIntoViewError.html" title="Puppeteer::ElementHandle::ScrollIntoViewError (class)">ScrollIntoViewError</a></span>
116
+
117
+
118
+ </p>
119
+
120
+
121
+
122
+
123
+
124
+
125
+ <h2>Instance Attribute Summary</h2>
126
+
127
+ <h3 class="inherited">Attributes inherited from <span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></h3>
128
+ <p class="inherited"><span class='object_link'><a href="JSHandle.html#context-instance_method" title="Puppeteer::JSHandle#context (method)">#context</a></span>, <span class='object_link'><a href="JSHandle.html#remote_object-instance_method" title="Puppeteer::JSHandle#remote_object (method)">#remote_object</a></span></p>
129
+
130
+
131
+
132
+ <h2>
133
+ Instance Method Summary
134
+ <small><a href="#" class="summary_toggle">collapse</a></small>
135
+ </h2>
136
+
137
+ <ul class="summary">
138
+
139
+ <li class="public ">
140
+ <span class="summary_signature">
141
+
142
+ <a href="#as_element-instance_method" title="#as_element (instance method)">#<strong>as_element</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="#async_press-instance_method" title="#async_press (instance method)">#<strong>async_press</strong> &#x21d2; Future </a>
165
+
166
+
167
+
168
+ </span>
169
+
170
+
171
+
172
+
173
+
174
+
175
+
176
+
177
+
178
+ <span class="summary_desc"><div class='inline'></div></span>
179
+
180
+ </li>
181
+
182
+
183
+ <li class="public ">
184
+ <span class="summary_signature">
185
+
186
+ <a href="#async_type_text-instance_method" title="#async_type_text (instance method)">#<strong>async_type_text</strong> &#x21d2; Future </a>
187
+
188
+
189
+
190
+ </span>
191
+
192
+
193
+
194
+
195
+
196
+
197
+
198
+
199
+
200
+ <span class="summary_desc"><div class='inline'></div></span>
201
+
202
+ </li>
203
+
204
+
205
+ <li class="public ">
206
+ <span class="summary_signature">
207
+
208
+ <a href="#click-instance_method" title="#click (instance method)">#<strong>click</strong>(delay: nil, button: nil, click_count: nil) &#x21d2; Object </a>
209
+
210
+
211
+
212
+ </span>
213
+
214
+
215
+
216
+
217
+
218
+
219
+
220
+
221
+
222
+ <span class="summary_desc"><div class='inline'></div></span>
223
+
224
+ </li>
225
+
226
+
227
+ <li class="public ">
228
+ <span class="summary_signature">
229
+
230
+ <a href="#clickable_point-instance_method" title="#clickable_point (instance method)">#<strong>clickable_point</strong> &#x21d2; Object </a>
231
+
232
+
233
+
234
+ </span>
235
+
236
+
237
+
238
+
239
+
240
+
241
+
242
+
243
+
244
+ <span class="summary_desc"><div class='inline'></div></span>
245
+
246
+ </li>
247
+
248
+
249
+ <li class="public ">
250
+ <span class="summary_signature">
251
+
252
+ <a href="#content_frame-instance_method" title="#content_frame (instance method)">#<strong>content_frame</strong> &#x21d2; Object </a>
253
+
254
+
255
+
256
+ </span>
257
+
258
+
259
+
260
+
261
+
262
+
263
+
264
+
265
+
266
+ <span class="summary_desc"><div class='inline'></div></span>
267
+
268
+ </li>
269
+
270
+
271
+ <li class="public ">
272
+ <span class="summary_signature">
273
+
274
+ <a href="#focus-instance_method" title="#focus (instance method)">#<strong>focus</strong> &#x21d2; Object </a>
275
+
276
+
277
+
278
+ </span>
279
+
280
+
281
+
282
+
283
+
284
+
285
+
286
+
287
+
288
+ <span class="summary_desc"><div class='inline'></div></span>
289
+
290
+ </li>
291
+
292
+
293
+ <li class="public ">
294
+ <span class="summary_signature">
295
+
296
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(context:, client:, remote_object:, page:, frame_manager:) &#x21d2; ElementHandle </a>
297
+
298
+
299
+
300
+ </span>
301
+
302
+
303
+ <span class="note title constructor">constructor</span>
304
+
305
+
306
+
307
+
308
+
309
+
310
+
311
+
312
+ <span class="summary_desc"><div class='inline'>
313
+ <p>A new instance of ElementHandle.</p>
314
+ </div></span>
315
+
316
+ </li>
317
+
318
+
319
+ <li class="public ">
320
+ <span class="summary_signature">
321
+
322
+ <a href="#press-instance_method" title="#press (instance method)">#<strong>press</strong>(key, delay: nil) &#x21d2; Object </a>
323
+
324
+
325
+
326
+ </span>
327
+
328
+
329
+
330
+
331
+
332
+
333
+
334
+
335
+
336
+ <span class="summary_desc"><div class='inline'></div></span>
337
+
338
+ </li>
339
+
340
+
341
+ <li class="public ">
342
+ <span class="summary_signature">
343
+
344
+ <a href="#S-instance_method" title="#S (instance method)">#<strong>S</strong>(selector) &#x21d2; Object </a>
345
+
346
+
347
+
348
+ </span>
349
+
350
+
351
+
352
+
353
+
354
+
355
+
356
+
357
+
358
+ <span class="summary_desc"><div class='inline'>
359
+ <p>`$()` in JavaScript.</p>
360
+ </div></span>
361
+
362
+ </li>
363
+
364
+
365
+ <li class="public ">
366
+ <span class="summary_signature">
367
+
368
+ <a href="#scroll_into_view_if_needed-instance_method" title="#scroll_into_view_if_needed (instance method)">#<strong>scroll_into_view_if_needed</strong> &#x21d2; Object </a>
369
+
370
+
371
+
372
+ </span>
373
+
374
+
375
+
376
+
377
+
378
+
379
+
380
+
381
+
382
+ <span class="summary_desc"><div class='inline'></div></span>
383
+
384
+ </li>
385
+
386
+
387
+ <li class="public ">
388
+ <span class="summary_signature">
389
+
390
+ <a href="#Seval-instance_method" title="#Seval (instance method)">#<strong>Seval</strong>(selector, page_function, *args) &#x21d2; Object </a>
391
+
392
+
393
+
394
+ </span>
395
+
396
+
397
+
398
+
399
+
400
+
401
+
402
+
403
+
404
+ <span class="summary_desc"><div class='inline'>
405
+ <p>`$eval()` in JavaScript.</p>
406
+ </div></span>
407
+
408
+ </li>
409
+
410
+
411
+ <li class="public ">
412
+ <span class="summary_signature">
413
+
414
+ <a href="#SS-instance_method" title="#SS (instance method)">#<strong>SS</strong>(selector) &#x21d2; Object </a>
415
+
416
+
417
+
418
+ </span>
419
+
420
+
421
+
422
+
423
+
424
+
425
+
426
+
427
+
428
+ <span class="summary_desc"><div class='inline'>
429
+ <p>`$$()` in JavaScript.</p>
430
+ </div></span>
431
+
432
+ </li>
433
+
434
+
435
+ <li class="public ">
436
+ <span class="summary_signature">
437
+
438
+ <a href="#SSeval-instance_method" title="#SSeval (instance method)">#<strong>SSeval</strong>(selector, page_function, *args) &#x21d2; Object </a>
439
+
440
+
441
+
442
+ </span>
443
+
444
+
445
+
446
+
447
+
448
+
449
+
450
+
451
+
452
+ <span class="summary_desc"><div class='inline'>
453
+ <p>`$$eval()` in JavaScript.</p>
454
+ </div></span>
455
+
456
+ </li>
457
+
458
+
459
+ <li class="public ">
460
+ <span class="summary_signature">
461
+
462
+ <a href="#type_text-instance_method" title="#type_text (instance method)">#<strong>type_text</strong>(text, delay: nil) &#x21d2; Object </a>
463
+
464
+
465
+
466
+ </span>
467
+
468
+
469
+
470
+
471
+
472
+
473
+
474
+
475
+
476
+ <span class="summary_desc"><div class='inline'></div></span>
477
+
478
+ </li>
479
+
480
+
481
+ </ul>
482
+
483
+
484
+
485
+
486
+
487
+
488
+
489
+
490
+
491
+
492
+
493
+ <h3 class="inherited">Methods included from <span class='object_link'><a href="IfPresent.html" title="Puppeteer::IfPresent (module)">IfPresent</a></span></h3>
494
+ <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>
495
+
496
+
497
+
498
+
499
+
500
+
501
+
502
+
503
+
504
+ <h3 class="inherited">Methods inherited from <span class='object_link'><a href="JSHandle.html" title="Puppeteer::JSHandle (class)">JSHandle</a></span></h3>
505
+ <p class="inherited"><span class='object_link'><a href="JSHandle.html#async_evaluate-instance_method" title="Puppeteer::JSHandle#async_evaluate (method)">#async_evaluate</a></span>, <span class='object_link'><a href="JSHandle.html#async_evaluate_handle-instance_method" title="Puppeteer::JSHandle#async_evaluate_handle (method)">#async_evaluate_handle</a></span>, <span class='object_link'><a href="JSHandle.html#create-class_method" title="Puppeteer::JSHandle.create (method)">create</a></span>, <span class='object_link'><a href="JSHandle.html#dispose-instance_method" title="Puppeteer::JSHandle#dispose (method)">#dispose</a></span>, <span class='object_link'><a href="JSHandle.html#disposed%3F-instance_method" title="Puppeteer::JSHandle#disposed? (method)">#disposed?</a></span>, <span class='object_link'><a href="JSHandle.html#evaluate-instance_method" title="Puppeteer::JSHandle#evaluate (method)">#evaluate</a></span>, <span class='object_link'><a href="JSHandle.html#evaluate_handle-instance_method" title="Puppeteer::JSHandle#evaluate_handle (method)">#evaluate_handle</a></span>, <span class='object_link'><a href="JSHandle.html#execution_context-instance_method" title="Puppeteer::JSHandle#execution_context (method)">#execution_context</a></span>, <span class='object_link'><a href="JSHandle.html#json_value-instance_method" title="Puppeteer::JSHandle#json_value (method)">#json_value</a></span>, <span class='object_link'><a href="JSHandle.html#properties-instance_method" title="Puppeteer::JSHandle#properties (method)">#properties</a></span></p>
506
+ <div id="constructor_details" class="method_details_list">
507
+ <h2>Constructor Details</h2>
508
+
509
+ <div class="method_details first">
510
+ <h3 class="signature first" id="initialize-instance_method">
511
+
512
+ #<strong>initialize</strong>(context:, client:, remote_object:, page:, frame_manager:) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::ElementHandle (class)">ElementHandle</a></span></tt>
513
+
514
+
515
+
516
+
517
+
518
+ </h3><div class="docstring">
519
+ <div class="discussion">
520
+
521
+ <p>Returns a new instance of ElementHandle.</p>
522
+
523
+
524
+ </div>
525
+ </div>
526
+ <div class="tags">
527
+ <p class="tag_title">Parameters:</p>
528
+ <ul class="param">
529
+
530
+ <li>
531
+
532
+ <span class='name'>context</span>
533
+
534
+
535
+ <span class='type'>(<tt><span class='object_link'><a href="ExecutionContext.html" title="Puppeteer::ExecutionContext (class)">Puppeteer::ExecutionContext</a></span></tt>)</span>
536
+
537
+
538
+
539
+ </li>
540
+
541
+ <li>
542
+
543
+ <span class='name'>client</span>
544
+
545
+
546
+ <span class='type'>(<tt><span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">Puppeteer::CDPSession</a></span></tt>)</span>
547
+
548
+
549
+
550
+ </li>
551
+
552
+ <li>
553
+
554
+ <span class='name'>remote_object</span>
555
+
556
+
557
+ <span class='type'>(<tt><span class='object_link'><a href="RemoteObject.html" title="Puppeteer::RemoteObject (class)">Puppeteer::RemoteObject</a></span></tt>)</span>
558
+
559
+
560
+
561
+ </li>
562
+
563
+ <li>
564
+
565
+ <span class='name'>page</span>
566
+
567
+
568
+ <span class='type'>(<tt><span class='object_link'><a href="Page.html" title="Puppeteer::Page (class)">Puppeteer::Page</a></span></tt>)</span>
569
+
570
+
571
+
572
+ </li>
573
+
574
+ <li>
575
+
576
+ <span class='name'>frame_manager</span>
577
+
578
+
579
+ <span class='type'>(<tt><span class='object_link'><a href="FrameManager.html" title="Puppeteer::FrameManager (class)">Puppeteer::FrameManager</a></span></tt>)</span>
580
+
581
+
582
+
583
+ </li>
584
+
585
+ </ul>
586
+
587
+
588
+ </div><table class="source_code">
589
+ <tr>
590
+ <td>
591
+ <pre class="lines">
592
+
593
+
594
+ 10
595
+ 11
596
+ 12
597
+ 13
598
+ 14
599
+ 15</pre>
600
+ </td>
601
+ <td>
602
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 10</span>
603
+
604
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>context:</span><span class='comma'>,</span> <span class='label'>client:</span><span class='comma'>,</span> <span class='label'>remote_object:</span><span class='comma'>,</span> <span class='label'>page:</span><span class='comma'>,</span> <span class='label'>frame_manager:</span><span class='rparen'>)</span>
605
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='label'>context:</span> <span class='id identifier rubyid_context'>context</span><span class='comma'>,</span> <span class='label'>client:</span> <span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='label'>remote_object:</span> <span class='id identifier rubyid_remote_object'>remote_object</span><span class='rparen'>)</span>
606
+ <span class='ivar'>@page</span> <span class='op'>=</span> <span class='id identifier rubyid_page'>page</span>
607
+ <span class='ivar'>@frame_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span>
608
+ <span class='ivar'>@disposed</span> <span class='op'>=</span> <span class='kw'>false</span>
609
+ <span class='kw'>end</span></pre>
610
+ </td>
611
+ </tr>
612
+ </table>
613
+ </div>
614
+
615
+ </div>
616
+
617
+
618
+ <div id="instance_method_details" class="method_details_list">
619
+ <h2>Instance Method Details</h2>
620
+
621
+
622
+ <div class="method_details first">
623
+ <h3 class="signature first" id="as_element-instance_method">
624
+
625
+ #<strong>as_element</strong> &#x21d2; <tt>Object</tt>
626
+
627
+
628
+
629
+
630
+
631
+ </h3><table class="source_code">
632
+ <tr>
633
+ <td>
634
+ <pre class="lines">
635
+
636
+
637
+ 17
638
+ 18
639
+ 19</pre>
640
+ </td>
641
+ <td>
642
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 17</span>
643
+
644
+ <span class='kw'>def</span> <span class='id identifier rubyid_as_element'>as_element</span>
645
+ <span class='kw'>self</span>
646
+ <span class='kw'>end</span></pre>
647
+ </td>
648
+ </tr>
649
+ </table>
650
+ </div>
651
+
652
+ <div class="method_details ">
653
+ <h3 class="signature " id="async_press-instance_method">
654
+
655
+ #<strong>async_press</strong> &#x21d2; <tt>Future</tt>
656
+
657
+
658
+
659
+
660
+
661
+ </h3><div class="docstring">
662
+ <div class="discussion">
663
+
664
+
665
+ </div>
666
+ </div>
667
+ <div class="tags">
668
+ <p class="tag_title">Parameters:</p>
669
+ <ul class="param">
670
+
671
+ <li>
672
+
673
+ <span class='name'>key</span>
674
+
675
+
676
+ <span class='type'>(<tt>String</tt>)</span>
677
+
678
+
679
+
680
+ </li>
681
+
682
+ <li>
683
+
684
+ <span class='name'>delay</span>
685
+
686
+
687
+ <span class='type'>(<tt>number|nil</tt>)</span>
688
+
689
+
690
+
691
+ </li>
692
+
693
+ </ul>
694
+
695
+ <p class="tag_title">Returns:</p>
696
+ <ul class="return">
697
+
698
+ <li>
699
+
700
+
701
+ <span class='type'>(<tt>Future</tt>)</span>
702
+
703
+
704
+
705
+ </li>
706
+
707
+ </ul>
708
+
709
+ </div><table class="source_code">
710
+ <tr>
711
+ <td>
712
+ <pre class="lines">
713
+
714
+
715
+ 270
716
+ 271
717
+ 272</pre>
718
+ </td>
719
+ <td>
720
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 270</span>
721
+
722
+ <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_press'>async_press</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
723
+ <span class='id identifier rubyid_press'>press</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='id identifier rubyid_delay'>delay</span><span class='rparen'>)</span>
724
+ <span class='kw'>end</span></pre>
725
+ </td>
726
+ </tr>
727
+ </table>
728
+ </div>
729
+
730
+ <div class="method_details ">
731
+ <h3 class="signature " id="async_type_text-instance_method">
732
+
733
+ #<strong>async_type_text</strong> &#x21d2; <tt>Future</tt>
734
+
735
+
736
+
737
+
738
+
739
+ </h3><div class="docstring">
740
+ <div class="discussion">
741
+
742
+
743
+ </div>
744
+ </div>
745
+ <div class="tags">
746
+ <p class="tag_title">Parameters:</p>
747
+ <ul class="param">
748
+
749
+ <li>
750
+
751
+ <span class='name'>text</span>
752
+
753
+
754
+ <span class='type'>(<tt>String</tt>)</span>
755
+
756
+
757
+
758
+ </li>
759
+
760
+ <li>
761
+
762
+ <span class='name'>delay</span>
763
+
764
+
765
+ <span class='type'>(<tt>number|nil</tt>)</span>
766
+
767
+
768
+
769
+ </li>
770
+
771
+ </ul>
772
+
773
+ <p class="tag_title">Returns:</p>
774
+ <ul class="return">
775
+
776
+ <li>
777
+
778
+
779
+ <span class='type'>(<tt>Future</tt>)</span>
780
+
781
+
782
+
783
+ </li>
784
+
785
+ </ul>
786
+
787
+ </div><table class="source_code">
788
+ <tr>
789
+ <td>
790
+ <pre class="lines">
791
+
792
+
793
+ 256
794
+ 257
795
+ 258</pre>
796
+ </td>
797
+ <td>
798
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 256</span>
799
+
800
+ <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_type_text'>async_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='kw'>nil</span><span class='rparen'>)</span>
801
+ <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>
802
+ <span class='kw'>end</span></pre>
803
+ </td>
804
+ </tr>
805
+ </table>
806
+ </div>
807
+
808
+ <div class="method_details ">
809
+ <h3 class="signature " id="click-instance_method">
810
+
811
+ #<strong>click</strong>(delay: nil, button: nil, click_count: nil) &#x21d2; <tt>Object</tt>
812
+
813
+
814
+
815
+
816
+
817
+ </h3><div class="docstring">
818
+ <div class="discussion">
819
+
820
+
821
+ </div>
822
+ </div>
823
+ <div class="tags">
824
+ <p class="tag_title">Parameters:</p>
825
+ <ul class="param">
826
+
827
+ <li>
828
+
829
+ <span class='name'>delay</span>
830
+
831
+
832
+ <span class='type'>(<tt>Number</tt>)</span>
833
+
834
+
835
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
836
+
837
+
838
+ </li>
839
+
840
+ <li>
841
+
842
+ <span class='name'>button</span>
843
+
844
+
845
+ <span class='type'>(<tt>String</tt>)</span>
846
+
847
+
848
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
849
+
850
+
851
+ &mdash;
852
+ <div class='inline'>
853
+ <p>“left”|“right”|“middle”</p>
854
+ </div>
855
+
856
+ </li>
857
+
858
+ <li>
859
+
860
+ <span class='name'>click_count</span>
861
+
862
+
863
+ <span class='type'>(<tt>Number</tt>)</span>
864
+
865
+
866
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
867
+
868
+
869
+ </li>
870
+
871
+ </ul>
872
+
873
+
874
+ </div><table class="source_code">
875
+ <tr>
876
+ <td>
877
+ <pre class="lines">
878
+
879
+
880
+ 154
881
+ 155
882
+ 156
883
+ 157
884
+ 158</pre>
885
+ </td>
886
+ <td>
887
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 154</span>
888
+
889
+ <span class='kw'>def</span> <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</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>
890
+ <span class='id identifier rubyid_scroll_into_view_if_needed'>scroll_into_view_if_needed</span>
891
+ <span class='id identifier rubyid_point'>point</span> <span class='op'>=</span> <span class='id identifier rubyid_clickable_point'>clickable_point</span>
892
+ <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_mouse'>mouse</span><span class='period'>.</span><span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_point'>point</span><span class='period'>.</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_point'>point</span><span class='period'>.</span><span class='id identifier rubyid_y'>y</span><span class='comma'>,</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>
893
+ <span class='kw'>end</span></pre>
894
+ </td>
895
+ </tr>
896
+ </table>
897
+ </div>
898
+
899
+ <div class="method_details ">
900
+ <h3 class="signature " id="clickable_point-instance_method">
901
+
902
+ #<strong>clickable_point</strong> &#x21d2; <tt>Object</tt>
903
+
904
+
905
+
906
+
907
+
908
+ </h3><table class="source_code">
909
+ <tr>
910
+ <td>
911
+ <pre class="lines">
912
+
913
+
914
+ 92
915
+ 93
916
+ 94
917
+ 95
918
+ 96
919
+ 97
920
+ 98
921
+ 99
922
+ 100
923
+ 101
924
+ 102
925
+ 103
926
+ 104
927
+ 105
928
+ 106
929
+ 107
930
+ 108
931
+ 109
932
+ 110
933
+ 111
934
+ 112
935
+ 113</pre>
936
+ </td>
937
+ <td>
938
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 92</span>
939
+
940
+ <span class='kw'>def</span> <span class='id identifier rubyid_clickable_point'>clickable_point</span>
941
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@remote_object</span><span class='period'>.</span><span class='id identifier rubyid_content_quads'>content_quads</span><span class='lparen'>(</span><span class='ivar'>@client</span><span class='rparen'>)</span>
942
+ <span class='kw'>if</span> <span class='op'>!</span><span class='id identifier rubyid_result'>result</span> <span class='op'>||</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>quads</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
943
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ElementHandle/ElementNotVisibleError.html" title="Puppeteer::ElementHandle::ElementNotVisibleError (class)">ElementNotVisibleError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ElementHandle/ElementNotVisibleError.html#initialize-instance_method" title="Puppeteer::ElementHandle::ElementNotVisibleError#initialize (method)">new</a></span></span>
944
+ <span class='kw'>end</span>
945
+
946
+ <span class='comment'># Filter out quads that have too small area to click into.
947
+ </span> <span class='id identifier rubyid_layout_metrics'>layout_metrics</span> <span class='op'>=</span> <span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>Page.getLayoutMetrics</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
948
+ <span class='id identifier rubyid_client_width'>client_width</span> <span class='op'>=</span> <span class='id identifier rubyid_layout_metrics'>layout_metrics</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>layoutViewport</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>clientWidth</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
949
+ <span class='id identifier rubyid_client_height'>client_height</span> <span class='op'>=</span> <span class='id identifier rubyid_layout_metrics'>layout_metrics</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>layoutViewport</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>clientHeight</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span>
950
+
951
+ <span class='id identifier rubyid_quads'>quads</span> <span class='op'>=</span> <span class='id identifier rubyid_result'>result</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>quads</span><span class='tstring_end'>&quot;</span></span><span class='rbracket'>]</span><span class='period'>.</span>
952
+ <span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_quad'>quad</span><span class='op'>|</span> <span class='id identifier rubyid_from_protocol_quad'>from_protocol_quad</span><span class='lparen'>(</span><span class='id identifier rubyid_quad'>quad</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span>
953
+ <span class='id identifier rubyid_map'>map</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_quad'>quad</span><span class='op'>|</span> <span class='id identifier rubyid_intersect_quad_with_viewport'>intersect_quad_with_viewport</span><span class='lparen'>(</span><span class='id identifier rubyid_quad'>quad</span><span class='comma'>,</span> <span class='id identifier rubyid_client_width'>client_width</span><span class='comma'>,</span> <span class='id identifier rubyid_client_height'>client_height</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span>
954
+ <span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_quad'>quad</span><span class='op'>|</span> <span class='id identifier rubyid_compute_quad_area'>compute_quad_area</span><span class='lparen'>(</span><span class='id identifier rubyid_quad'>quad</span><span class='rparen'>)</span> <span class='op'>&gt;</span> <span class='int'>1</span> <span class='rbrace'>}</span>
955
+ <span class='kw'>if</span> <span class='id identifier rubyid_quads'>quads</span><span class='period'>.</span><span class='id identifier rubyid_empty?'>empty?</span>
956
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ElementHandle/ElementNotVisibleError.html" title="Puppeteer::ElementHandle::ElementNotVisibleError (class)">ElementNotVisibleError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ElementHandle/ElementNotVisibleError.html#initialize-instance_method" title="Puppeteer::ElementHandle::ElementNotVisibleError#initialize (method)">new</a></span></span>
957
+ <span class='kw'>end</span>
958
+
959
+ <span class='comment'># Return the middle point of the first quad.
960
+ </span> <span class='id identifier rubyid_quads'>quads</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span><span class='period'>.</span><span class='id identifier rubyid_reduce'>reduce</span><span class='lparen'>(</span><span class='symbol'>:+</span><span class='rparen'>)</span> <span class='op'>/</span> <span class='int'>4</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="content_frame-instance_method">
969
+
970
+ #<strong>content_frame</strong> &#x21d2; <tt>Object</tt>
971
+
972
+
973
+
974
+
975
+
976
+ </h3><table class="source_code">
977
+ <tr>
978
+ <td>
979
+ <pre class="lines">
980
+
981
+
982
+ 21
983
+ 22
984
+ 23
985
+ 24
986
+ 25
987
+ 26
988
+ 27
989
+ 28
990
+ 29</pre>
991
+ </td>
992
+ <td>
993
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 21</span>
994
+
995
+ <span class='kw'>def</span> <span class='id identifier rubyid_content_frame'>content_frame</span>
996
+ <span class='id identifier rubyid_node_info'>node_info</span> <span class='op'>=</span> <span class='ivar'>@remote_object</span><span class='period'>.</span><span class='id identifier rubyid_node_info'>node_info</span>
997
+ <span class='id identifier rubyid_frame_id'>frame_id</span> <span class='op'>=</span> <span class='id identifier rubyid_node_info'>node_info</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>node</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>frameId</span><span class='tstring_end'>&#39;</span></span><span class='rbracket'>]</span>
998
+ <span class='kw'>if</span> <span class='id identifier rubyid_frame_id'>frame_id</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
999
+ <span class='ivar'>@frame_manager</span><span class='period'>.</span><span class='id identifier rubyid_frame'>frame</span><span class='lparen'>(</span><span class='id identifier rubyid_frame_id'>frame_id</span><span class='rparen'>)</span>
1000
+ <span class='kw'>else</span>
1001
+ <span class='kw'>nil</span>
1002
+ <span class='kw'>end</span>
1003
+ <span class='kw'>end</span></pre>
1004
+ </td>
1005
+ </tr>
1006
+ </table>
1007
+ </div>
1008
+
1009
+ <div class="method_details ">
1010
+ <h3 class="signature " id="focus-instance_method">
1011
+
1012
+ #<strong>focus</strong> &#x21d2; <tt>Object</tt>
1013
+
1014
+
1015
+
1016
+
1017
+
1018
+ </h3><table class="source_code">
1019
+ <tr>
1020
+ <td>
1021
+ <pre class="lines">
1022
+
1023
+
1024
+ 238
1025
+ 239
1026
+ 240</pre>
1027
+ </td>
1028
+ <td>
1029
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 238</span>
1030
+
1031
+ <span class='kw'>def</span> <span class='id identifier rubyid_focus'>focus</span>
1032
+ <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>element =&gt; element.focus()</span><span class='tstring_end'>&#39;</span></span><span class='rparen'>)</span>
1033
+ <span class='kw'>end</span></pre>
1034
+ </td>
1035
+ </tr>
1036
+ </table>
1037
+ </div>
1038
+
1039
+ <div class="method_details ">
1040
+ <h3 class="signature " id="press-instance_method">
1041
+
1042
+ #<strong>press</strong>(key, delay: nil) &#x21d2; <tt>Object</tt>
1043
+
1044
+
1045
+
1046
+
1047
+
1048
+ </h3><div class="docstring">
1049
+ <div class="discussion">
1050
+
1051
+
1052
+ </div>
1053
+ </div>
1054
+ <div class="tags">
1055
+ <p class="tag_title">Parameters:</p>
1056
+ <ul class="param">
1057
+
1058
+ <li>
1059
+
1060
+ <span class='name'>key</span>
1061
+
1062
+
1063
+ <span class='type'>(<tt>String</tt>)</span>
1064
+
1065
+
1066
+
1067
+ </li>
1068
+
1069
+ <li>
1070
+
1071
+ <span class='name'>delay</span>
1072
+
1073
+
1074
+ <span class='type'>(<tt>number|nil</tt>)</span>
1075
+
1076
+
1077
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1078
+
1079
+
1080
+ </li>
1081
+
1082
+ </ul>
1083
+
1084
+
1085
+ </div><table class="source_code">
1086
+ <tr>
1087
+ <td>
1088
+ <pre class="lines">
1089
+
1090
+
1091
+ 262
1092
+ 263
1093
+ 264
1094
+ 265</pre>
1095
+ </td>
1096
+ <td>
1097
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 262</span>
1098
+
1099
+ <span class='kw'>def</span> <span class='id identifier rubyid_press'>press</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
1100
+ <span class='id identifier rubyid_focus'>focus</span>
1101
+ <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_keyboard'>keyboard</span><span class='period'>.</span><span class='id identifier rubyid_press'>press</span><span class='lparen'>(</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='id identifier rubyid_delay'>delay</span><span class='rparen'>)</span>
1102
+ <span class='kw'>end</span></pre>
1103
+ </td>
1104
+ </tr>
1105
+ </table>
1106
+ </div>
1107
+
1108
+ <div class="method_details ">
1109
+ <h3 class="signature " id="S-instance_method">
1110
+
1111
+ #<strong>S</strong>(selector) &#x21d2; <tt>Object</tt>
1112
+
1113
+
1114
+
1115
+
1116
+
1117
+ </h3><div class="docstring">
1118
+ <div class="discussion">
1119
+
1120
+ <p>`$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1121
+
1122
+
1123
+ </div>
1124
+ </div>
1125
+ <div class="tags">
1126
+ <p class="tag_title">Parameters:</p>
1127
+ <ul class="param">
1128
+
1129
+ <li>
1130
+
1131
+ <span class='name'>selector</span>
1132
+
1133
+
1134
+ <span class='type'>(<tt>String</tt>)</span>
1135
+
1136
+
1137
+
1138
+ </li>
1139
+
1140
+ </ul>
1141
+
1142
+
1143
+ </div><table class="source_code">
1144
+ <tr>
1145
+ <td>
1146
+ <pre class="lines">
1147
+
1148
+
1149
+ 360
1150
+ 361
1151
+ 362
1152
+ 363
1153
+ 364
1154
+ 365
1155
+ 366
1156
+ 367
1157
+ 368
1158
+ 369
1159
+ 370
1160
+ 371
1161
+ 372</pre>
1162
+ </td>
1163
+ <td>
1164
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 360</span>
1165
+
1166
+ <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>
1167
+ <span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span>
1168
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(element, selector) =&gt; element.querySelector(selector)</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1169
+ <span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span>
1170
+ <span class='rparen'>)</span>
1171
+ <span class='id identifier rubyid_element'>element</span> <span class='op'>=</span> <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_as_element'>as_element</span>
1172
+
1173
+ <span class='kw'>if</span> <span class='id identifier rubyid_element'>element</span>
1174
+ <span class='kw'>return</span> <span class='id identifier rubyid_element'>element</span>
1175
+ <span class='kw'>end</span>
1176
+ <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1177
+ <span class='kw'>nil</span>
1178
+ <span class='kw'>end</span></pre>
1179
+ </td>
1180
+ </tr>
1181
+ </table>
1182
+ </div>
1183
+
1184
+ <div class="method_details ">
1185
+ <h3 class="signature " id="scroll_into_view_if_needed-instance_method">
1186
+
1187
+ #<strong>scroll_into_view_if_needed</strong> &#x21d2; <tt>Object</tt>
1188
+
1189
+
1190
+
1191
+
1192
+
1193
+ </h3><table class="source_code">
1194
+ <tr>
1195
+ <td>
1196
+ <pre class="lines">
1197
+
1198
+
1199
+ 33
1200
+ 34
1201
+ 35
1202
+ 36
1203
+ 37
1204
+ 38
1205
+ 39
1206
+ 40
1207
+ 41
1208
+ 42
1209
+ 43
1210
+ 44
1211
+ 45
1212
+ 46
1213
+ 47
1214
+ 48
1215
+ 49
1216
+ 50
1217
+ 51
1218
+ 52
1219
+ 53
1220
+ 54
1221
+ 55
1222
+ 56
1223
+ 57
1224
+ 58
1225
+ 59
1226
+ 60
1227
+ 61</pre>
1228
+ </td>
1229
+ <td>
1230
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 33</span>
1231
+
1232
+ <span class='kw'>def</span> <span class='id identifier rubyid_scroll_into_view_if_needed'>scroll_into_view_if_needed</span>
1233
+ <span class='id identifier rubyid_js'>js</span> <span class='op'>=</span> <span class='heredoc_beg'>&lt;&lt;~JAVASCRIPT</span>
1234
+ <span class='tstring_content'> async(element, pageJavascriptEnabled) =&gt; {
1235
+ </span><span class='tstring_content'> if (!element.isConnected)
1236
+ </span><span class='tstring_content'> return &#39;Node is detached from document&#39;;
1237
+ </span><span class='tstring_content'> if (element.nodeType !== Node.ELEMENT_NODE)
1238
+ </span><span class='tstring_content'> return &#39;Node is not of type HTMLElement&#39;;
1239
+ </span><span class='tstring_content'> // force-scroll if page&#39;s javascript is disabled.
1240
+ </span><span class='tstring_content'> if (!pageJavascriptEnabled) {
1241
+ </span><span class='tstring_content'> element.scrollIntoView({block: &#39;center&#39;, inline: &#39;center&#39;, behavior: &#39;instant&#39;});
1242
+ </span><span class='tstring_content'> return false;
1243
+ </span><span class='tstring_content'> }
1244
+ </span><span class='tstring_content'> const visibleRatio = await new Promise(resolve =&gt; {
1245
+ </span><span class='tstring_content'> const observer = new IntersectionObserver(entries =&gt; {
1246
+ </span><span class='tstring_content'> resolve(entries[0].intersectionRatio);
1247
+ </span><span class='tstring_content'> observer.disconnect();
1248
+ </span><span class='tstring_content'> });
1249
+ </span><span class='tstring_content'> observer.observe(element);
1250
+ </span><span class='tstring_content'> });
1251
+ </span><span class='tstring_content'> if (visibleRatio !== 1.0)
1252
+ </span><span class='tstring_content'> element.scrollIntoView({block: &#39;center&#39;, inline: &#39;center&#39;, behavior: &#39;instant&#39;});
1253
+ </span><span class='tstring_content'> return false;
1254
+ </span><span class='tstring_content'> }
1255
+ </span><span class='heredoc_end'> JAVASCRIPT
1256
+ </span> <span class='id identifier rubyid_error'>error</span> <span class='op'>=</span> <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_js'>js</span><span class='comma'>,</span> <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_javascript_enabled'>javascript_enabled</span><span class='rparen'>)</span> <span class='comment'># returns String or false
1257
+ </span> <span class='kw'>if</span> <span class='id identifier rubyid_error'>error</span>
1258
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ElementHandle/ScrollIntoViewError.html" title="Puppeteer::ElementHandle::ScrollIntoViewError (class)">ScrollIntoViewError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="#initialize-instance_method" title="Puppeteer::ElementHandle#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_error'>error</span><span class='rparen'>)</span>
1259
+ <span class='kw'>end</span>
1260
+ <span class='kw'>end</span></pre>
1261
+ </td>
1262
+ </tr>
1263
+ </table>
1264
+ </div>
1265
+
1266
+ <div class="method_details ">
1267
+ <h3 class="signature " id="Seval-instance_method">
1268
+
1269
+ #<strong>Seval</strong>(selector, page_function, *args) &#x21d2; <tt>Object</tt>
1270
+
1271
+
1272
+
1273
+
1274
+
1275
+ </h3><div class="docstring">
1276
+ <div class="discussion">
1277
+
1278
+ <p>`$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1279
+
1280
+
1281
+ </div>
1282
+ </div>
1283
+ <div class="tags">
1284
+ <p class="tag_title">Parameters:</p>
1285
+ <ul class="param">
1286
+
1287
+ <li>
1288
+
1289
+ <span class='name'>selector</span>
1290
+
1291
+
1292
+ <span class='type'>(<tt>String</tt>)</span>
1293
+
1294
+
1295
+
1296
+ </li>
1297
+
1298
+ <li>
1299
+
1300
+ <span class='name'>page_function</span>
1301
+
1302
+
1303
+ <span class='type'>(<tt>String</tt>)</span>
1304
+
1305
+
1306
+
1307
+ </li>
1308
+
1309
+ </ul>
1310
+
1311
+ <p class="tag_title">Returns:</p>
1312
+ <ul class="return">
1313
+
1314
+ <li>
1315
+
1316
+
1317
+ <span class='type'>(<tt>Object</tt>)</span>
1318
+
1319
+
1320
+
1321
+ </li>
1322
+
1323
+ </ul>
1324
+
1325
+ </div><table class="source_code">
1326
+ <tr>
1327
+ <td>
1328
+ <pre class="lines">
1329
+
1330
+
1331
+ 396
1332
+ 397
1333
+ 398
1334
+ 399
1335
+ 400
1336
+ 401
1337
+ 402
1338
+ 403
1339
+ 404
1340
+ 405</pre>
1341
+ </td>
1342
+ <td>
1343
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 396</span>
1344
+
1345
+ <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>
1346
+ <span class='id identifier rubyid_element_handle'>element_handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::ElementHandle#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
1347
+ <span class='kw'>unless</span> <span class='id identifier rubyid_element_handle'>element_handle</span>
1348
+ <span class='id identifier rubyid_raise'>raise</span> <span class='const'><span class='object_link'><a href="ElementHandle/ElementNotFoundError.html" title="Puppeteer::ElementHandle::ElementNotFoundError (class)">ElementNotFoundError</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="ElementHandle/ElementNotFoundError.html#initialize-instance_method" title="Puppeteer::ElementHandle::ElementNotFoundError#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
1349
+ <span class='kw'>end</span>
1350
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_element_handle'>element_handle</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>
1351
+ <span class='id identifier rubyid_element_handle'>element_handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1352
+
1353
+ <span class='id identifier rubyid_result'>result</span>
1354
+ <span class='kw'>end</span></pre>
1355
+ </td>
1356
+ </tr>
1357
+ </table>
1358
+ </div>
1359
+
1360
+ <div class="method_details ">
1361
+ <h3 class="signature " id="SS-instance_method">
1362
+
1363
+ #<strong>SS</strong>(selector) &#x21d2; <tt>Object</tt>
1364
+
1365
+
1366
+
1367
+
1368
+
1369
+ </h3><div class="docstring">
1370
+ <div class="discussion">
1371
+
1372
+ <p>`$$()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1373
+
1374
+
1375
+ </div>
1376
+ </div>
1377
+ <div class="tags">
1378
+ <p class="tag_title">Parameters:</p>
1379
+ <ul class="param">
1380
+
1381
+ <li>
1382
+
1383
+ <span class='name'>selector</span>
1384
+
1385
+
1386
+ <span class='type'>(<tt>String</tt>)</span>
1387
+
1388
+
1389
+
1390
+ </li>
1391
+
1392
+ </ul>
1393
+
1394
+
1395
+ </div><table class="source_code">
1396
+ <tr>
1397
+ <td>
1398
+ <pre class="lines">
1399
+
1400
+
1401
+ 376
1402
+ 377
1403
+ 378
1404
+ 379
1405
+ 380
1406
+ 381
1407
+ 382
1408
+ 383
1409
+ 384</pre>
1410
+ </td>
1411
+ <td>
1412
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 376</span>
1413
+
1414
+ <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>
1415
+ <span class='id identifier rubyid_handles'>handles</span> <span class='op'>=</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span>
1416
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(element, selector) =&gt; element.querySelectorAll(selector)</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1417
+ <span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span>
1418
+ <span class='rparen'>)</span>
1419
+ <span class='id identifier rubyid_properties'>properties</span> <span class='op'>=</span> <span class='id identifier rubyid_handles'>handles</span><span class='period'>.</span><span class='id identifier rubyid_properties'>properties</span>
1420
+ <span class='id identifier rubyid_handles'>handles</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1421
+ <span class='id identifier rubyid_properties'>properties</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_map'>map</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='symbol'>:as_element</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_compact'>compact</span>
1422
+ <span class='kw'>end</span></pre>
1423
+ </td>
1424
+ </tr>
1425
+ </table>
1426
+ </div>
1427
+
1428
+ <div class="method_details ">
1429
+ <h3 class="signature " id="SSeval-instance_method">
1430
+
1431
+ #<strong>SSeval</strong>(selector, page_function, *args) &#x21d2; <tt>Object</tt>
1432
+
1433
+
1434
+
1435
+
1436
+
1437
+ </h3><div class="docstring">
1438
+ <div class="discussion">
1439
+
1440
+ <p>`$$eval()` in JavaScript. $ is not allowed to use as a method name in Ruby.</p>
1441
+
1442
+
1443
+ </div>
1444
+ </div>
1445
+ <div class="tags">
1446
+ <p class="tag_title">Parameters:</p>
1447
+ <ul class="param">
1448
+
1449
+ <li>
1450
+
1451
+ <span class='name'>selector</span>
1452
+
1453
+
1454
+ <span class='type'>(<tt>String</tt>)</span>
1455
+
1456
+
1457
+
1458
+ </li>
1459
+
1460
+ <li>
1461
+
1462
+ <span class='name'>page_function</span>
1463
+
1464
+
1465
+ <span class='type'>(<tt>String</tt>)</span>
1466
+
1467
+
1468
+
1469
+ </li>
1470
+
1471
+ </ul>
1472
+
1473
+ <p class="tag_title">Returns:</p>
1474
+ <ul class="return">
1475
+
1476
+ <li>
1477
+
1478
+
1479
+ <span class='type'>(<tt>Object</tt>)</span>
1480
+
1481
+
1482
+
1483
+ </li>
1484
+
1485
+ </ul>
1486
+
1487
+ </div><table class="source_code">
1488
+ <tr>
1489
+ <td>
1490
+ <pre class="lines">
1491
+
1492
+
1493
+ 411
1494
+ 412
1495
+ 413
1496
+ 414
1497
+ 415
1498
+ 416
1499
+ 417
1500
+ 418
1501
+ 419
1502
+ 420</pre>
1503
+ </td>
1504
+ <td>
1505
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 411</span>
1506
+
1507
+ <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>
1508
+ <span class='id identifier rubyid_handles'>handles</span> <span class='op'>=</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span>
1509
+ <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>(element, selector) =&gt; Array.from(element.querySelectorAll(selector))</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1510
+ <span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span>
1511
+ <span class='rparen'>)</span>
1512
+ <span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_handles'>handles</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>
1513
+ <span class='id identifier rubyid_handles'>handles</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
1514
+
1515
+ <span class='id identifier rubyid_result'>result</span>
1516
+ <span class='kw'>end</span></pre>
1517
+ </td>
1518
+ </tr>
1519
+ </table>
1520
+ </div>
1521
+
1522
+ <div class="method_details ">
1523
+ <h3 class="signature " id="type_text-instance_method">
1524
+
1525
+ #<strong>type_text</strong>(text, delay: nil) &#x21d2; <tt>Object</tt>
1526
+
1527
+
1528
+
1529
+
1530
+
1531
+ </h3><div class="docstring">
1532
+ <div class="discussion">
1533
+
1534
+
1535
+ </div>
1536
+ </div>
1537
+ <div class="tags">
1538
+ <p class="tag_title">Parameters:</p>
1539
+ <ul class="param">
1540
+
1541
+ <li>
1542
+
1543
+ <span class='name'>text</span>
1544
+
1545
+
1546
+ <span class='type'>(<tt>String</tt>)</span>
1547
+
1548
+
1549
+
1550
+ </li>
1551
+
1552
+ <li>
1553
+
1554
+ <span class='name'>delay</span>
1555
+
1556
+
1557
+ <span class='type'>(<tt>number|nil</tt>)</span>
1558
+
1559
+
1560
+ <em class="default">(defaults to: <tt>nil</tt>)</em>
1561
+
1562
+
1563
+ </li>
1564
+
1565
+ </ul>
1566
+
1567
+
1568
+ </div><table class="source_code">
1569
+ <tr>
1570
+ <td>
1571
+ <pre class="lines">
1572
+
1573
+
1574
+ 248
1575
+ 249
1576
+ 250
1577
+ 251</pre>
1578
+ </td>
1579
+ <td>
1580
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/element_handle.rb', line 248</span>
1581
+
1582
+ <span class='kw'>def</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='kw'>nil</span><span class='rparen'>)</span>
1583
+ <span class='id identifier rubyid_focus'>focus</span>
1584
+ <span class='ivar'>@page</span><span class='period'>.</span><span class='id identifier rubyid_keyboard'>keyboard</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>
1585
+ <span class='kw'>end</span></pre>
1586
+ </td>
1587
+ </tr>
1588
+ </table>
1589
+ </div>
1590
+
1591
+ </div>
1592
+
1593
+ </div>
1594
+
1595
+ <div id="footer">
1596
+ Generated on Sun Apr 26 15:52:57 2020 by
1597
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1598
+ 0.9.24 (ruby-2.6.3).
1599
+ </div>
1600
+
1601
+ </div>
1602
+ </body>
1603
+ </html>