puppeteer-ruby 0.0.12 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (135) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +2 -14
  3. data/.github/workflows/docs.yml +45 -0
  4. data/.github/workflows/reviewdog.yml +15 -0
  5. data/README.md +52 -1
  6. data/lib/puppeteer.rb +10 -2
  7. data/lib/puppeteer/browser.rb +53 -34
  8. data/lib/puppeteer/browser_context.rb +35 -5
  9. data/lib/puppeteer/cdp_session.rb +3 -19
  10. data/lib/puppeteer/concurrent_ruby_utils.rb +6 -0
  11. data/lib/puppeteer/connection.rb +9 -16
  12. data/lib/puppeteer/debug_print.rb +1 -1
  13. data/lib/puppeteer/define_async_method.rb +23 -0
  14. data/lib/puppeteer/dom_world.rb +67 -78
  15. data/lib/puppeteer/element_handle.rb +19 -47
  16. data/lib/puppeteer/emulation_manager.rb +2 -6
  17. data/lib/puppeteer/env.rb +18 -0
  18. data/lib/puppeteer/execution_context.rb +1 -6
  19. data/lib/puppeteer/frame.rb +34 -39
  20. data/lib/puppeteer/frame_manager.rb +7 -25
  21. data/lib/puppeteer/js_handle.rb +3 -12
  22. data/lib/puppeteer/keyboard.rb +9 -29
  23. data/lib/puppeteer/launcher/chrome.rb +9 -7
  24. data/lib/puppeteer/mouse.rb +20 -24
  25. data/lib/puppeteer/network_manager.rb +163 -5
  26. data/lib/puppeteer/page.rb +213 -179
  27. data/lib/puppeteer/page/pdf_options.rb +166 -0
  28. data/lib/puppeteer/remote_object.rb +2 -5
  29. data/lib/puppeteer/request.rb +330 -0
  30. data/lib/puppeteer/response.rb +113 -0
  31. data/lib/puppeteer/touch_screen.rb +2 -7
  32. data/lib/puppeteer/version.rb +1 -1
  33. data/lib/puppeteer/wait_task.rb +2 -4
  34. data/lib/puppeteer/web_socket.rb +7 -0
  35. data/puppeteer-ruby.gemspec +2 -1
  36. metadata +25 -103
  37. data/docs/Puppeteer.html +0 -2338
  38. data/docs/Puppeteer/AsyncAwaitBehavior.html +0 -105
  39. data/docs/Puppeteer/Browser.html +0 -2258
  40. data/docs/Puppeteer/BrowserContext.html +0 -809
  41. data/docs/Puppeteer/BrowserFetcher.html +0 -214
  42. data/docs/Puppeteer/BrowserRunner.html +0 -914
  43. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +0 -477
  44. data/docs/Puppeteer/CDPSession.html +0 -813
  45. data/docs/Puppeteer/CDPSession/Error.html +0 -124
  46. data/docs/Puppeteer/ConcurrentRubyUtils.html +0 -438
  47. data/docs/Puppeteer/Connection.html +0 -964
  48. data/docs/Puppeteer/Connection/MessageCallback.html +0 -434
  49. data/docs/Puppeteer/Connection/ProtocolError.html +0 -216
  50. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +0 -217
  51. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +0 -244
  52. data/docs/Puppeteer/ConsoleMessage.html +0 -565
  53. data/docs/Puppeteer/ConsoleMessage/Location.html +0 -433
  54. data/docs/Puppeteer/DOMWorld.html +0 -2219
  55. data/docs/Puppeteer/DOMWorld/DetachedError.html +0 -124
  56. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +0 -124
  57. data/docs/Puppeteer/DebugPrint.html +0 -233
  58. data/docs/Puppeteer/Device.html +0 -470
  59. data/docs/Puppeteer/Devices.html +0 -139
  60. data/docs/Puppeteer/ElementHandle.html +0 -2542
  61. data/docs/Puppeteer/ElementHandle/BoundingBox.html +0 -507
  62. data/docs/Puppeteer/ElementHandle/BoxModel.html +0 -404
  63. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +0 -206
  64. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +0 -206
  65. data/docs/Puppeteer/ElementHandle/Point.html +0 -492
  66. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +0 -124
  67. data/docs/Puppeteer/EmulationManager.html +0 -454
  68. data/docs/Puppeteer/EventCallbackable.html +0 -499
  69. data/docs/Puppeteer/EventCallbackable/EventListeners.html +0 -435
  70. data/docs/Puppeteer/ExecutionContext.html +0 -998
  71. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +0 -124
  72. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +0 -357
  73. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +0 -389
  74. data/docs/Puppeteer/FileChooser.html +0 -455
  75. data/docs/Puppeteer/Frame.html +0 -3813
  76. data/docs/Puppeteer/FrameManager.html +0 -2410
  77. data/docs/Puppeteer/FrameManager/NavigationError.html +0 -124
  78. data/docs/Puppeteer/IfPresent.html +0 -222
  79. data/docs/Puppeteer/JSHandle.html +0 -1352
  80. data/docs/Puppeteer/Keyboard.html +0 -1557
  81. data/docs/Puppeteer/Keyboard/KeyDefinition.html +0 -831
  82. data/docs/Puppeteer/Keyboard/KeyDescription.html +0 -603
  83. data/docs/Puppeteer/Launcher.html +0 -237
  84. data/docs/Puppeteer/Launcher/Base.html +0 -385
  85. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +0 -124
  86. data/docs/Puppeteer/Launcher/BrowserOptions.html +0 -441
  87. data/docs/Puppeteer/Launcher/Chrome.html +0 -669
  88. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +0 -382
  89. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +0 -531
  90. data/docs/Puppeteer/Launcher/LaunchOptions.html +0 -893
  91. data/docs/Puppeteer/LifecycleWatcher.html +0 -834
  92. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +0 -363
  93. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +0 -206
  94. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +0 -124
  95. data/docs/Puppeteer/Mouse.html +0 -1095
  96. data/docs/Puppeteer/Mouse/Button.html +0 -136
  97. data/docs/Puppeteer/NetworkManager.html +0 -901
  98. data/docs/Puppeteer/NetworkManager/Credentials.html +0 -385
  99. data/docs/Puppeteer/Page.html +0 -6173
  100. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +0 -206
  101. data/docs/Puppeteer/Page/ScreenshotOptions.html +0 -845
  102. data/docs/Puppeteer/Page/ScriptTag.html +0 -555
  103. data/docs/Puppeteer/Page/StyleTag.html +0 -448
  104. data/docs/Puppeteer/Page/TargetCrashedError.html +0 -124
  105. data/docs/Puppeteer/RemoteObject.html +0 -1087
  106. data/docs/Puppeteer/Target.html +0 -1336
  107. data/docs/Puppeteer/Target/InitializeFailure.html +0 -124
  108. data/docs/Puppeteer/Target/TargetInfo.html +0 -729
  109. data/docs/Puppeteer/TimeoutError.html +0 -135
  110. data/docs/Puppeteer/TimeoutSettings.html +0 -496
  111. data/docs/Puppeteer/TouchScreen.html +0 -464
  112. data/docs/Puppeteer/Viewport.html +0 -837
  113. data/docs/Puppeteer/WaitTask.html +0 -637
  114. data/docs/Puppeteer/WaitTask/TerminatedError.html +0 -124
  115. data/docs/Puppeteer/WaitTask/TimeoutError.html +0 -206
  116. data/docs/Puppeteer/WebSocket.html +0 -673
  117. data/docs/Puppeteer/WebSocket/DriverImpl.html +0 -412
  118. data/docs/Puppeteer/WebSocket/TransportError.html +0 -124
  119. data/docs/Puppeteer/WebSocketTransport.html +0 -600
  120. data/docs/Puppeteer/WebSocktTransportError.html +0 -124
  121. data/docs/_index.html +0 -816
  122. data/docs/class_list.html +0 -51
  123. data/docs/css/common.css +0 -1
  124. data/docs/css/full_list.css +0 -58
  125. data/docs/css/style.css +0 -496
  126. data/docs/file.README.html +0 -125
  127. data/docs/file_list.html +0 -56
  128. data/docs/frames.html +0 -17
  129. data/docs/index.html +0 -125
  130. data/docs/js/app.js +0 -314
  131. data/docs/js/full_list.js +0 -216
  132. data/docs/js/jquery.js +0 -4
  133. data/docs/method_list.html +0 -4115
  134. data/docs/top-level-namespace.html +0 -126
  135. data/lib/puppeteer/async_await_behavior.rb +0 -38
@@ -1,124 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Exception: Puppeteer::LifecycleWatcher::TerminatedError
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::LifecycleWatcher::TerminatedError";
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 (T)</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="../LifecycleWatcher.html" title="Puppeteer::LifecycleWatcher (class)">LifecycleWatcher</a></span></span>
41
- &raquo;
42
- <span class="title">TerminatedError</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>Exception: Puppeteer::LifecycleWatcher::TerminatedError
63
-
64
-
65
-
66
- </h1>
67
- <div class="box_info">
68
-
69
- <dl>
70
- <dt>Inherits:</dt>
71
- <dd>
72
- <span class="inheritName">StandardError</span>
73
-
74
- <ul class="fullTree">
75
- <li>Object</li>
76
-
77
- <li class="next">StandardError</li>
78
-
79
- <li class="next">Puppeteer::LifecycleWatcher::TerminatedError</li>
80
-
81
- </ul>
82
- <a href="#" class="inheritanceTree">show all</a>
83
-
84
- </dd>
85
- </dl>
86
-
87
-
88
-
89
-
90
-
91
-
92
-
93
-
94
-
95
-
96
-
97
- <dl>
98
- <dt>Defined in:</dt>
99
- <dd>lib/puppeteer/lifecycle_watcher.rb</dd>
100
- </dl>
101
-
102
- </div>
103
-
104
-
105
-
106
-
107
-
108
-
109
-
110
-
111
-
112
-
113
-
114
- </div>
115
-
116
- <div id="footer">
117
- Generated on Tue Jun 23 10:25:01 2020 by
118
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
119
- 0.9.24 (ruby-2.6.3).
120
- </div>
121
-
122
- </div>
123
- </body>
124
- </html>
@@ -1,1095 +0,0 @@
1
- <!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
- <title>
7
- Class: Puppeteer::Mouse
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::Mouse";
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 (M)</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">Mouse</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::Mouse
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::Mouse</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/mouse.rb</dd>
98
- </dl>
99
-
100
- </div>
101
-
102
- <h2>Defined Under Namespace</h2>
103
- <p class="children">
104
-
105
-
106
- <strong class="modules">Modules:</strong> <span class='object_link'><a href="Mouse/Button.html" title="Puppeteer::Mouse::Button (module)">Button</a></span>
107
-
108
-
109
-
110
-
111
- </p>
112
-
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
- <h2>
121
- Instance Method Summary
122
- <small><a href="#" class="summary_toggle">collapse</a></small>
123
- </h2>
124
-
125
- <ul class="summary">
126
-
127
- <li class="public ">
128
- <span class="summary_signature">
129
-
130
- <a href="#async_click-instance_method" title="#async_click (instance method)">#<strong>async_click</strong> &#x21d2; Future </a>
131
-
132
-
133
-
134
- </span>
135
-
136
-
137
-
138
-
139
-
140
-
141
-
142
-
143
-
144
- <span class="summary_desc"><div class='inline'></div></span>
145
-
146
- </li>
147
-
148
-
149
- <li class="public ">
150
- <span class="summary_signature">
151
-
152
- <a href="#async_down-instance_method" title="#async_down (instance method)">#<strong>async_down</strong> &#x21d2; Future </a>
153
-
154
-
155
-
156
- </span>
157
-
158
-
159
-
160
-
161
-
162
-
163
-
164
-
165
-
166
- <span class="summary_desc"><div class='inline'></div></span>
167
-
168
- </li>
169
-
170
-
171
- <li class="public ">
172
- <span class="summary_signature">
173
-
174
- <a href="#async_move-instance_method" title="#async_move (instance method)">#<strong>async_move</strong> &#x21d2; Future </a>
175
-
176
-
177
-
178
- </span>
179
-
180
-
181
-
182
-
183
-
184
-
185
-
186
-
187
-
188
- <span class="summary_desc"><div class='inline'></div></span>
189
-
190
- </li>
191
-
192
-
193
- <li class="public ">
194
- <span class="summary_signature">
195
-
196
- <a href="#async_up-instance_method" title="#async_up (instance method)">#<strong>async_up</strong> &#x21d2; Future </a>
197
-
198
-
199
-
200
- </span>
201
-
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'></div></span>
211
-
212
- </li>
213
-
214
-
215
- <li class="public ">
216
- <span class="summary_signature">
217
-
218
- <a href="#click-instance_method" title="#click (instance method)">#<strong>click</strong>(x, y, delay: nil, button: nil, click_count: nil) &#x21d2; Object </a>
219
-
220
-
221
-
222
- </span>
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
-
232
- <span class="summary_desc"><div class='inline'></div></span>
233
-
234
- </li>
235
-
236
-
237
- <li class="public ">
238
- <span class="summary_signature">
239
-
240
- <a href="#down-instance_method" title="#down (instance method)">#<strong>down</strong>(button: nil, click_count: nil) &#x21d2; Object </a>
241
-
242
-
243
-
244
- </span>
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
-
253
-
254
- <span class="summary_desc"><div class='inline'></div></span>
255
-
256
- </li>
257
-
258
-
259
- <li class="public ">
260
- <span class="summary_signature">
261
-
262
- <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client, keyboard) &#x21d2; Mouse </a>
263
-
264
-
265
-
266
- </span>
267
-
268
-
269
- <span class="note title constructor">constructor</span>
270
-
271
-
272
-
273
-
274
-
275
-
276
-
277
-
278
- <span class="summary_desc"><div class='inline'>
279
- <p>A new instance of Mouse.</p>
280
- </div></span>
281
-
282
- </li>
283
-
284
-
285
- <li class="public ">
286
- <span class="summary_signature">
287
-
288
- <a href="#move-instance_method" title="#move (instance method)">#<strong>move</strong>(x, y, steps: nil) &#x21d2; Object </a>
289
-
290
-
291
-
292
- </span>
293
-
294
-
295
-
296
-
297
-
298
-
299
-
300
-
301
-
302
- <span class="summary_desc"><div class='inline'></div></span>
303
-
304
- </li>
305
-
306
-
307
- <li class="public ">
308
- <span class="summary_signature">
309
-
310
- <a href="#up-instance_method" title="#up (instance method)">#<strong>up</strong>(button: nil, click_count: nil) &#x21d2; Object </a>
311
-
312
-
313
-
314
- </span>
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
-
324
- <span class="summary_desc"><div class='inline'></div></span>
325
-
326
- </li>
327
-
328
-
329
- </ul>
330
-
331
-
332
- <div id="constructor_details" class="method_details_list">
333
- <h2>Constructor Details</h2>
334
-
335
- <div class="method_details first">
336
- <h3 class="signature first" id="initialize-instance_method">
337
-
338
- #<strong>initialize</strong>(client, keyboard) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::Mouse (class)">Mouse</a></span></tt>
339
-
340
-
341
-
342
-
343
-
344
- </h3><div class="docstring">
345
- <div class="discussion">
346
-
347
- <p>Returns a new instance of Mouse.</p>
348
-
349
-
350
- </div>
351
- </div>
352
- <div class="tags">
353
- <p class="tag_title">Parameters:</p>
354
- <ul class="param">
355
-
356
- <li>
357
-
358
- <span class='name'>client</span>
359
-
360
-
361
- <span class='type'>(<tt><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span></tt>)</span>
362
-
363
-
364
-
365
- </li>
366
-
367
- <li>
368
-
369
- <span class='name'>keyboard</span>
370
-
371
-
372
- <span class='type'>(<tt><span class='object_link'><a href="Keyboard.html" title="Puppeteer::Keyboard (class)">Puppeteer::Keyboard</a></span></tt>)</span>
373
-
374
-
375
-
376
- </li>
377
-
378
- </ul>
379
-
380
-
381
- </div><table class="source_code">
382
- <tr>
383
- <td>
384
- <pre class="lines">
385
-
386
-
387
- 13
388
- 14
389
- 15
390
- 16
391
- 17
392
- 18
393
- 19
394
- 20</pre>
395
- </td>
396
- <td>
397
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 13</span>
398
-
399
- <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_keyboard'>keyboard</span><span class='rparen'>)</span>
400
- <span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
401
- <span class='ivar'>@keyboard</span> <span class='op'>=</span> <span class='id identifier rubyid_keyboard'>keyboard</span>
402
-
403
- <span class='ivar'>@x</span> <span class='op'>=</span> <span class='int'>0</span>
404
- <span class='ivar'>@y</span> <span class='op'>=</span> <span class='int'>0</span>
405
- <span class='ivar'>@button</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Mouse/Button.html" title="Puppeteer::Mouse::Button (module)">Button</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Mouse/Button.html#NONE-constant" title="Puppeteer::Mouse::Button::NONE (constant)">NONE</a></span></span>
406
- <span class='kw'>end</span></pre>
407
- </td>
408
- </tr>
409
- </table>
410
- </div>
411
-
412
- </div>
413
-
414
-
415
- <div id="instance_method_details" class="method_details_list">
416
- <h2>Instance Method Details</h2>
417
-
418
-
419
- <div class="method_details first">
420
- <h3 class="signature first" id="async_click-instance_method">
421
-
422
- #<strong>async_click</strong> &#x21d2; <tt>Future</tt>
423
-
424
-
425
-
426
-
427
-
428
- </h3><div class="docstring">
429
- <div class="discussion">
430
-
431
-
432
- </div>
433
- </div>
434
- <div class="tags">
435
- <p class="tag_title">Parameters:</p>
436
- <ul class="param">
437
-
438
- <li>
439
-
440
- <span class='name'>x</span>
441
-
442
-
443
- <span class='type'>(<tt>number</tt>)</span>
444
-
445
-
446
-
447
- </li>
448
-
449
- <li>
450
-
451
- <span class='name'>y</span>
452
-
453
-
454
- <span class='type'>(<tt>number</tt>)</span>
455
-
456
-
457
-
458
- </li>
459
-
460
- <li>
461
-
462
- <span class='name'>options</span>
463
-
464
-
465
- <span class='type'>(<tt>!{delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
466
-
467
-
468
-
469
- </li>
470
-
471
- </ul>
472
-
473
- <p class="tag_title">Returns:</p>
474
- <ul class="return">
475
-
476
- <li>
477
-
478
-
479
- <span class='type'>(<tt>Future</tt>)</span>
480
-
481
-
482
-
483
- </li>
484
-
485
- </ul>
486
-
487
- </div><table class="source_code">
488
- <tr>
489
- <td>
490
- <pre class="lines">
491
-
492
-
493
- 77
494
- 78
495
- 79</pre>
496
- </td>
497
- <td>
498
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 77</span>
499
-
500
- <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_click'>async_click</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>click_count:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
501
- <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</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>
502
- <span class='kw'>end</span></pre>
503
- </td>
504
- </tr>
505
- </table>
506
- </div>
507
-
508
- <div class="method_details ">
509
- <h3 class="signature " id="async_down-instance_method">
510
-
511
- #<strong>async_down</strong> &#x21d2; <tt>Future</tt>
512
-
513
-
514
-
515
-
516
-
517
- </h3><div class="docstring">
518
- <div class="discussion">
519
-
520
-
521
- </div>
522
- </div>
523
- <div class="tags">
524
- <p class="tag_title">Parameters:</p>
525
- <ul class="param">
526
-
527
- <li>
528
-
529
- <span class='name'>options</span>
530
-
531
-
532
- <span class='type'>(<tt>!{button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
533
-
534
-
535
-
536
- </li>
537
-
538
- </ul>
539
-
540
- <p class="tag_title">Returns:</p>
541
- <ul class="return">
542
-
543
- <li>
544
-
545
-
546
- <span class='type'>(<tt>Future</tt>)</span>
547
-
548
-
549
-
550
- </li>
551
-
552
- </ul>
553
-
554
- </div><table class="source_code">
555
- <tr>
556
- <td>
557
- <pre class="lines">
558
-
559
-
560
- 96
561
- 97
562
- 98</pre>
563
- </td>
564
- <td>
565
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 96</span>
566
-
567
- <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_down'>async_down</span><span class='lparen'>(</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>
568
- <span class='id identifier rubyid_down'>down</span><span class='lparen'>(</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>
569
- <span class='kw'>end</span></pre>
570
- </td>
571
- </tr>
572
- </table>
573
- </div>
574
-
575
- <div class="method_details ">
576
- <h3 class="signature " id="async_move-instance_method">
577
-
578
- #<strong>async_move</strong> &#x21d2; <tt>Future</tt>
579
-
580
-
581
-
582
-
583
-
584
- </h3><div class="docstring">
585
- <div class="discussion">
586
-
587
-
588
- </div>
589
- </div>
590
- <div class="tags">
591
- <p class="tag_title">Parameters:</p>
592
- <ul class="param">
593
-
594
- <li>
595
-
596
- <span class='name'>x</span>
597
-
598
-
599
- <span class='type'>(<tt>number</tt>)</span>
600
-
601
-
602
-
603
- </li>
604
-
605
- <li>
606
-
607
- <span class='name'>y</span>
608
-
609
-
610
- <span class='type'>(<tt>number</tt>)</span>
611
-
612
-
613
-
614
- </li>
615
-
616
- <li>
617
-
618
- <span class='name'>steps</span>
619
-
620
-
621
- <span class='type'>(<tt>number</tt>)</span>
622
-
623
-
624
-
625
- </li>
626
-
627
- </ul>
628
-
629
- <p class="tag_title">Returns:</p>
630
- <ul class="return">
631
-
632
- <li>
633
-
634
-
635
- <span class='type'>(<tt>Future</tt>)</span>
636
-
637
-
638
-
639
- </li>
640
-
641
- </ul>
642
-
643
- </div><table class="source_code">
644
- <tr>
645
- <td>
646
- <pre class="lines">
647
-
648
-
649
- 51
650
- 52
651
- 53</pre>
652
- </td>
653
- <td>
654
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 51</span>
655
-
656
- <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_move'>async_move</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='label'>steps:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
657
- <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='label'>steps:</span> <span class='id identifier rubyid_steps'>steps</span><span class='rparen'>)</span>
658
- <span class='kw'>end</span></pre>
659
- </td>
660
- </tr>
661
- </table>
662
- </div>
663
-
664
- <div class="method_details ">
665
- <h3 class="signature " id="async_up-instance_method">
666
-
667
- #<strong>async_up</strong> &#x21d2; <tt>Future</tt>
668
-
669
-
670
-
671
-
672
-
673
- </h3><div class="docstring">
674
- <div class="discussion">
675
-
676
-
677
- </div>
678
- </div>
679
- <div class="tags">
680
- <p class="tag_title">Parameters:</p>
681
- <ul class="param">
682
-
683
- <li>
684
-
685
- <span class='name'>options</span>
686
-
687
-
688
- <span class='type'>(<tt>!{button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
689
-
690
-
691
-
692
- </li>
693
-
694
- </ul>
695
-
696
- <p class="tag_title">Returns:</p>
697
- <ul class="return">
698
-
699
- <li>
700
-
701
-
702
- <span class='type'>(<tt>Future</tt>)</span>
703
-
704
-
705
-
706
- </li>
707
-
708
- </ul>
709
-
710
- </div><table class="source_code">
711
- <tr>
712
- <td>
713
- <pre class="lines">
714
-
715
-
716
- 115
717
- 116
718
- 117</pre>
719
- </td>
720
- <td>
721
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 115</span>
722
-
723
- <span class='id identifier rubyid_async'>async</span> <span class='kw'>def</span> <span class='id identifier rubyid_async_up'>async_up</span><span class='lparen'>(</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>
724
- <span class='id identifier rubyid_up'>up</span><span class='lparen'>(</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>
725
- <span class='kw'>end</span></pre>
726
- </td>
727
- </tr>
728
- </table>
729
- </div>
730
-
731
- <div class="method_details ">
732
- <h3 class="signature " id="click-instance_method">
733
-
734
- #<strong>click</strong>(x, y, delay: nil, button: nil, click_count: nil) &#x21d2; <tt>Object</tt>
735
-
736
-
737
-
738
-
739
-
740
- </h3><div class="docstring">
741
- <div class="discussion">
742
-
743
-
744
- </div>
745
- </div>
746
- <div class="tags">
747
- <p class="tag_title">Parameters:</p>
748
- <ul class="param">
749
-
750
- <li>
751
-
752
- <span class='name'>x</span>
753
-
754
-
755
- <span class='type'>(<tt>number</tt>)</span>
756
-
757
-
758
-
759
- </li>
760
-
761
- <li>
762
-
763
- <span class='name'>y</span>
764
-
765
-
766
- <span class='type'>(<tt>number</tt>)</span>
767
-
768
-
769
-
770
- </li>
771
-
772
- <li>
773
-
774
- <span class='name'>options</span>
775
-
776
-
777
- <span class='type'>(<tt>!{delay?: number, button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
778
-
779
-
780
-
781
- </li>
782
-
783
- </ul>
784
-
785
-
786
- </div><table class="source_code">
787
- <tr>
788
- <td>
789
- <pre class="lines">
790
-
791
-
792
- 58
793
- 59
794
- 60
795
- 61
796
- 62
797
- 63
798
- 64
799
- 65
800
- 66
801
- 67
802
- 68
803
- 69
804
- 70
805
- 71</pre>
806
- </td>
807
- <td>
808
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 58</span>
809
-
810
- <span class='kw'>def</span> <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>click_count:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
811
- <span class='comment'># await_all(async_move, async_down, async_up) often breaks the order of CDP commands.
812
- </span> <span class='comment'># D, [2020-04-15T17:09:47.895895 #88683] DEBUG -- : RECV &lt;&lt; {&quot;id&quot;=&gt;23, &quot;result&quot;=&gt;{&quot;layoutViewport&quot;=&gt;{&quot;pageX&quot;=&gt;0, &quot;pageY&quot;=&gt;1, &quot;clientWidth&quot;=&gt;375, &quot;clientHeight&quot;=&gt;667}, &quot;visualViewport&quot;=&gt;{&quot;offsetX&quot;=&gt;0, &quot;offsetY&quot;=&gt;0, &quot;pageX&quot;=&gt;0, &quot;pageY&quot;=&gt;1, &quot;clientWidth&quot;=&gt;375, &quot;clientHeight&quot;=&gt;667, &quot;scale&quot;=&gt;1, &quot;zoom&quot;=&gt;1}, &quot;contentSize&quot;=&gt;{&quot;x&quot;=&gt;0, &quot;y&quot;=&gt;0, &quot;width&quot;=&gt;375, &quot;height&quot;=&gt;2007}}, &quot;sessionId&quot;=&gt;&quot;0B09EA5E18DEE403E525B3E7FCD7E225&quot;}
813
- </span> <span class='comment'># D, [2020-04-15T17:09:47.898422 #88683] DEBUG -- : SEND &gt;&gt; {&quot;sessionId&quot;:&quot;0B09EA5E18DEE403E525B3E7FCD7E225&quot;,&quot;method&quot;:&quot;Input.dispatchMouseEvent&quot;,&quot;params&quot;:{&quot;type&quot;:&quot;mouseReleased&quot;,&quot;button&quot;:&quot;left&quot;,&quot;x&quot;:0,&quot;y&quot;:0,&quot;modifiers&quot;:0,&quot;clickCount&quot;:1},&quot;id&quot;:24}
814
- </span> <span class='comment'># D, [2020-04-15T17:09:47.899711 #88683] DEBUG -- : SEND &gt;&gt; {&quot;sessionId&quot;:&quot;0B09EA5E18DEE403E525B3E7FCD7E225&quot;,&quot;method&quot;:&quot;Input.dispatchMouseEvent&quot;,&quot;params&quot;:{&quot;type&quot;:&quot;mousePressed&quot;,&quot;button&quot;:&quot;left&quot;,&quot;x&quot;:0,&quot;y&quot;:0,&quot;modifiers&quot;:0,&quot;clickCount&quot;:1},&quot;id&quot;:25}
815
- </span> <span class='comment'># D, [2020-04-15T17:09:47.900237 #88683] DEBUG -- : SEND &gt;&gt; {&quot;sessionId&quot;:&quot;0B09EA5E18DEE403E525B3E7FCD7E225&quot;,&quot;method&quot;:&quot;Input.dispatchMouseEvent&quot;,&quot;params&quot;:{&quot;type&quot;:&quot;mouseMoved&quot;,&quot;button&quot;:&quot;left&quot;,&quot;x&quot;:187,&quot;y&quot;:283,&quot;modifiers&quot;:0},&quot;id&quot;:26}
816
- </span> <span class='comment'># So we execute them sequential
817
- </span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='rparen'>)</span>
818
- <span class='id identifier rubyid_down'>down</span><span class='lparen'>(</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>
819
- <span class='kw'>if</span> <span class='id identifier rubyid_delay'>delay</span>
820
- <span class='id identifier rubyid_sleep'>sleep</span><span class='lparen'>(</span><span class='id identifier rubyid_delay'>delay</span> <span class='op'>/</span> <span class='float'>1000.0</span><span class='rparen'>)</span>
821
- <span class='kw'>end</span>
822
- <span class='id identifier rubyid_up'>up</span><span class='lparen'>(</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>
823
- <span class='kw'>end</span></pre>
824
- </td>
825
- </tr>
826
- </table>
827
- </div>
828
-
829
- <div class="method_details ">
830
- <h3 class="signature " id="down-instance_method">
831
-
832
- #<strong>down</strong>(button: nil, click_count: nil) &#x21d2; <tt>Object</tt>
833
-
834
-
835
-
836
-
837
-
838
- </h3><div class="docstring">
839
- <div class="discussion">
840
-
841
-
842
- </div>
843
- </div>
844
- <div class="tags">
845
- <p class="tag_title">Parameters:</p>
846
- <ul class="param">
847
-
848
- <li>
849
-
850
- <span class='name'>options</span>
851
-
852
-
853
- <span class='type'>(<tt>!{button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
854
-
855
-
856
-
857
- </li>
858
-
859
- </ul>
860
-
861
-
862
- </div><table class="source_code">
863
- <tr>
864
- <td>
865
- <pre class="lines">
866
-
867
-
868
- 82
869
- 83
870
- 84
871
- 85
872
- 86
873
- 87
874
- 88
875
- 89
876
- 90
877
- 91
878
- 92</pre>
879
- </td>
880
- <td>
881
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 82</span>
882
-
883
- <span class='kw'>def</span> <span class='id identifier rubyid_down'>down</span><span class='lparen'>(</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>
884
- <span class='ivar'>@button</span> <span class='op'>=</span> <span class='id identifier rubyid_button'>button</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="Mouse/Button.html" title="Puppeteer::Mouse::Button (module)">Button</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Mouse/Button.html#LEFT-constant" title="Puppeteer::Mouse::Button::LEFT (constant)">LEFT</a></span></span>
885
- <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'>Input.dispatchMouseEvent</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
886
- <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mousePressed</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
887
- <span class='label'>button:</span> <span class='ivar'>@button</span><span class='comma'>,</span>
888
- <span class='label'>x:</span> <span class='ivar'>@x</span><span class='comma'>,</span>
889
- <span class='label'>y:</span> <span class='ivar'>@y</span><span class='comma'>,</span>
890
- <span class='label'>modifiers:</span> <span class='ivar'>@keyboard</span><span class='period'>.</span><span class='id identifier rubyid_modifiers'>modifiers</span><span class='comma'>,</span>
891
- <span class='label'>clickCount:</span> <span class='id identifier rubyid_click_count'>click_count</span> <span class='op'>||</span> <span class='int'>1</span><span class='comma'>,</span>
892
- <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="move-instance_method">
901
-
902
- #<strong>move</strong>(x, y, steps: nil) &#x21d2; <tt>Object</tt>
903
-
904
-
905
-
906
-
907
-
908
- </h3><div class="docstring">
909
- <div class="discussion">
910
-
911
-
912
- </div>
913
- </div>
914
- <div class="tags">
915
- <p class="tag_title">Parameters:</p>
916
- <ul class="param">
917
-
918
- <li>
919
-
920
- <span class='name'>x</span>
921
-
922
-
923
- <span class='type'>(<tt>number</tt>)</span>
924
-
925
-
926
-
927
- </li>
928
-
929
- <li>
930
-
931
- <span class='name'>y</span>
932
-
933
-
934
- <span class='type'>(<tt>number</tt>)</span>
935
-
936
-
937
-
938
- </li>
939
-
940
- <li>
941
-
942
- <span class='name'>steps</span>
943
-
944
-
945
- <span class='type'>(<tt>number</tt>)</span>
946
-
947
-
948
- <em class="default">(defaults to: <tt>nil</tt>)</em>
949
-
950
-
951
- </li>
952
-
953
- </ul>
954
-
955
-
956
- </div><table class="source_code">
957
- <tr>
958
- <td>
959
- <pre class="lines">
960
-
961
-
962
- 25
963
- 26
964
- 27
965
- 28
966
- 29
967
- 30
968
- 31
969
- 32
970
- 33
971
- 34
972
- 35
973
- 36
974
- 37
975
- 38
976
- 39
977
- 40
978
- 41
979
- 42
980
- 43
981
- 44
982
- 45</pre>
983
- </td>
984
- <td>
985
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 25</span>
986
-
987
- <span class='kw'>def</span> <span class='id identifier rubyid_move'>move</span><span class='lparen'>(</span><span class='id identifier rubyid_x'>x</span><span class='comma'>,</span> <span class='id identifier rubyid_y'>y</span><span class='comma'>,</span> <span class='label'>steps:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
988
- <span class='id identifier rubyid_move_steps'>move_steps</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_steps'>steps</span> <span class='op'>||</span> <span class='int'>1</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span>
989
-
990
- <span class='id identifier rubyid_from_x'>from_x</span> <span class='op'>=</span> <span class='ivar'>@x</span>
991
- <span class='id identifier rubyid_from_y'>from_y</span> <span class='op'>=</span> <span class='ivar'>@y</span>
992
- <span class='ivar'>@x</span> <span class='op'>=</span> <span class='id identifier rubyid_x'>x</span>
993
- <span class='ivar'>@y</span> <span class='op'>=</span> <span class='id identifier rubyid_y'>y</span>
994
-
995
- <span class='kw'>return</span> <span class='kw'>if</span> <span class='id identifier rubyid_move_steps'>move_steps</span> <span class='op'>&lt;=</span> <span class='int'>0</span>
996
-
997
- <span class='id identifier rubyid_move_steps'>move_steps</span><span class='period'>.</span><span class='id identifier rubyid_times'>times</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_i'>i</span><span class='op'>|</span>
998
- <span class='id identifier rubyid_n'>n</span> <span class='op'>=</span> <span class='id identifier rubyid_i'>i</span> <span class='op'>+</span> <span class='int'>1</span>
999
- <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'>Input.dispatchMouseEvent</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1000
- <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mouseMoved</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1001
- <span class='label'>button:</span> <span class='ivar'>@button</span><span class='comma'>,</span>
1002
- <span class='label'>x:</span> <span class='id identifier rubyid_from_x'>from_x</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='ivar'>@x</span> <span class='op'>-</span> <span class='id identifier rubyid_from_x'>from_x</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='id identifier rubyid_n'>n</span> <span class='op'>/</span> <span class='id identifier rubyid_move_steps'>move_steps</span><span class='comma'>,</span>
1003
- <span class='label'>y:</span> <span class='id identifier rubyid_from_y'>from_y</span> <span class='op'>+</span> <span class='lparen'>(</span><span class='ivar'>@y</span> <span class='op'>-</span> <span class='id identifier rubyid_from_y'>from_y</span><span class='rparen'>)</span> <span class='op'>*</span> <span class='id identifier rubyid_n'>n</span> <span class='op'>/</span> <span class='id identifier rubyid_move_steps'>move_steps</span><span class='comma'>,</span>
1004
- <span class='label'>modifiers:</span> <span class='ivar'>@keyboard</span><span class='period'>.</span><span class='id identifier rubyid_modifiers'>modifiers</span><span class='comma'>,</span>
1005
- <span class='rparen'>)</span>
1006
- <span class='kw'>end</span>
1007
- <span class='kw'>end</span></pre>
1008
- </td>
1009
- </tr>
1010
- </table>
1011
- </div>
1012
-
1013
- <div class="method_details ">
1014
- <h3 class="signature " id="up-instance_method">
1015
-
1016
- #<strong>up</strong>(button: nil, click_count: nil) &#x21d2; <tt>Object</tt>
1017
-
1018
-
1019
-
1020
-
1021
-
1022
- </h3><div class="docstring">
1023
- <div class="discussion">
1024
-
1025
-
1026
- </div>
1027
- </div>
1028
- <div class="tags">
1029
- <p class="tag_title">Parameters:</p>
1030
- <ul class="param">
1031
-
1032
- <li>
1033
-
1034
- <span class='name'>options</span>
1035
-
1036
-
1037
- <span class='type'>(<tt>!{button?: "left"|"right"|"middle", clickCount?: number}=</tt>)</span>
1038
-
1039
-
1040
-
1041
- </li>
1042
-
1043
- </ul>
1044
-
1045
-
1046
- </div><table class="source_code">
1047
- <tr>
1048
- <td>
1049
- <pre class="lines">
1050
-
1051
-
1052
- 101
1053
- 102
1054
- 103
1055
- 104
1056
- 105
1057
- 106
1058
- 107
1059
- 108
1060
- 109
1061
- 110
1062
- 111</pre>
1063
- </td>
1064
- <td>
1065
- <pre class="code"><span class="info file"># File 'lib/puppeteer/mouse.rb', line 101</span>
1066
-
1067
- <span class='kw'>def</span> <span class='id identifier rubyid_up'>up</span><span class='lparen'>(</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>
1068
- <span class='ivar'>@button</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="Mouse/Button.html" title="Puppeteer::Mouse::Button (module)">Button</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Mouse/Button.html#NONE-constant" title="Puppeteer::Mouse::Button::NONE (constant)">NONE</a></span></span>
1069
- <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'>Input.dispatchMouseEvent</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1070
- <span class='label'>type:</span> <span class='tstring'><span class='tstring_beg'>&#39;</span><span class='tstring_content'>mouseReleased</span><span class='tstring_end'>&#39;</span></span><span class='comma'>,</span>
1071
- <span class='label'>button:</span> <span class='id identifier rubyid_button'>button</span> <span class='op'>||</span> <span class='const'><span class='object_link'><a href="Mouse/Button.html" title="Puppeteer::Mouse::Button (module)">Button</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Mouse/Button.html#LEFT-constant" title="Puppeteer::Mouse::Button::LEFT (constant)">LEFT</a></span></span><span class='comma'>,</span>
1072
- <span class='label'>x:</span> <span class='ivar'>@x</span><span class='comma'>,</span>
1073
- <span class='label'>y:</span> <span class='ivar'>@y</span><span class='comma'>,</span>
1074
- <span class='label'>modifiers:</span> <span class='ivar'>@keyboard</span><span class='period'>.</span><span class='id identifier rubyid_modifiers'>modifiers</span><span class='comma'>,</span>
1075
- <span class='label'>clickCount:</span> <span class='id identifier rubyid_click_count'>click_count</span> <span class='op'>||</span> <span class='int'>1</span><span class='comma'>,</span>
1076
- <span class='rparen'>)</span>
1077
- <span class='kw'>end</span></pre>
1078
- </td>
1079
- </tr>
1080
- </table>
1081
- </div>
1082
-
1083
- </div>
1084
-
1085
- </div>
1086
-
1087
- <div id="footer">
1088
- Generated on Tue Jun 23 10:24:59 2020 by
1089
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1090
- 0.9.24 (ruby-2.6.3).
1091
- </div>
1092
-
1093
- </div>
1094
- </body>
1095
- </html>