puppeteer-ruby 0.0.5 → 0.0.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -2
- data/docs/Puppeteer.html +53 -43
- data/docs/Puppeteer/AsyncAwaitBehavior.html +1 -1
- data/docs/Puppeteer/Browser.html +255 -147
- data/docs/Puppeteer/BrowserContext.html +1 -1
- data/docs/Puppeteer/BrowserFetcher.html +1 -1
- data/docs/Puppeteer/BrowserRunner.html +1 -1
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +1 -1
- data/docs/Puppeteer/CDPSession.html +86 -57
- data/docs/Puppeteer/CDPSession/Error.html +1 -1
- data/docs/Puppeteer/ConcurrentRubyUtils.html +1 -1
- data/docs/Puppeteer/Connection.html +65 -61
- data/docs/Puppeteer/Connection/MessageCallback.html +1 -1
- data/docs/Puppeteer/Connection/ProtocolError.html +1 -1
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +5 -5
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +12 -12
- data/docs/Puppeteer/ConsoleMessage.html +1 -1
- data/docs/Puppeteer/ConsoleMessage/Location.html +1 -1
- data/docs/Puppeteer/DOMWorld.html +708 -69
- data/docs/Puppeteer/DOMWorld/DetachedError.html +1 -1
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +1 -1
- data/docs/Puppeteer/DebugPrint.html +2 -2
- data/docs/Puppeteer/Device.html +1 -1
- data/docs/Puppeteer/Devices.html +1 -1
- data/docs/Puppeteer/ElementHandle.html +1120 -181
- data/docs/Puppeteer/ElementHandle/BoundingBox.html +507 -0
- data/docs/Puppeteer/ElementHandle/BoxModel.html +404 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +5 -5
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +5 -5
- data/docs/Puppeteer/ElementHandle/Point.html +40 -29
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +1 -1
- data/docs/Puppeteer/EmulationManager.html +1 -1
- data/docs/Puppeteer/EventCallbackable.html +1 -1
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +1 -1
- data/docs/Puppeteer/ExecutionContext.html +227 -1
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +2 -2
- data/docs/Puppeteer/FileChooser.html +455 -0
- data/docs/Puppeteer/Frame.html +492 -304
- data/docs/Puppeteer/FrameManager.html +22 -26
- data/docs/Puppeteer/FrameManager/NavigationError.html +1 -1
- data/docs/Puppeteer/IfPresent.html +1 -1
- data/docs/Puppeteer/JSHandle.html +1 -1
- data/docs/Puppeteer/Keyboard.html +1 -1
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +1 -1
- data/docs/Puppeteer/Keyboard/KeyDescription.html +1 -1
- data/docs/Puppeteer/Launcher.html +1 -1
- data/docs/Puppeteer/Launcher/Base.html +1 -1
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +1 -1
- data/docs/Puppeteer/Launcher/BrowserOptions.html +1 -1
- data/docs/Puppeteer/Launcher/Chrome.html +64 -23
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +1 -1
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +1 -1
- data/docs/Puppeteer/Launcher/LaunchOptions.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +1 -1
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +1 -1
- data/docs/Puppeteer/Mouse.html +31 -41
- data/docs/Puppeteer/Mouse/Button.html +1 -1
- data/docs/Puppeteer/NetworkManager.html +1 -1
- data/docs/Puppeteer/NetworkManager/Credentials.html +1 -1
- data/docs/Puppeteer/Page.html +980 -436
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
- data/docs/Puppeteer/Page/ScreenshotOptions.html +1 -1
- data/docs/Puppeteer/Page/ScriptTag.html +24 -24
- data/docs/Puppeteer/Page/StyleTag.html +19 -19
- data/docs/Puppeteer/Page/TargetCrashedError.html +1 -1
- data/docs/Puppeteer/RemoteObject.html +173 -37
- data/docs/Puppeteer/Target.html +149 -197
- data/docs/Puppeteer/Target/InitializeFailure.html +1 -1
- data/docs/Puppeteer/Target/TargetInfo.html +1 -1
- data/docs/Puppeteer/TimeoutError.html +2 -2
- data/docs/Puppeteer/TimeoutSettings.html +1 -1
- data/docs/Puppeteer/TouchScreen.html +1 -1
- data/docs/Puppeteer/Viewport.html +81 -1
- data/docs/Puppeteer/WaitTask.html +434 -8
- data/docs/Puppeteer/WaitTask/TerminatedError.html +1 -1
- data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
- data/docs/Puppeteer/WebSocket.html +26 -26
- data/docs/Puppeteer/WebSocket/DriverImpl.html +1 -1
- data/docs/Puppeteer/WebSocket/TransportError.html +124 -0
- data/docs/Puppeteer/WebSocketTransport.html +2 -2
- data/docs/Puppeteer/WebSocktTransportError.html +1 -1
- data/docs/_index.html +47 -19
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +5 -3
- data/docs/index.html +5 -3
- data/docs/method_list.html +788 -444
- data/docs/top-level-namespace.html +1 -1
- data/lib/puppeteer.rb +7 -1
- data/lib/puppeteer/browser.rb +21 -6
- data/lib/puppeteer/browser_runner.rb +1 -1
- data/lib/puppeteer/cdp_session.rb +33 -11
- data/lib/puppeteer/connection.rb +13 -1
- data/lib/puppeteer/dom_world.rb +113 -108
- data/lib/puppeteer/element_handle.rb +183 -222
- data/lib/puppeteer/element_handle/bounding_box.rb +12 -0
- data/lib/puppeteer/element_handle/box_model.rb +19 -0
- data/lib/puppeteer/element_handle/point.rb +26 -0
- data/lib/puppeteer/errors.rb +1 -3
- data/lib/puppeteer/execution_context.rb +36 -17
- data/lib/puppeteer/file_chooser.rb +29 -0
- data/lib/puppeteer/frame.rb +32 -12
- data/lib/puppeteer/frame_manager.rb +0 -2
- data/lib/puppeteer/launcher/chrome.rb +48 -2
- data/lib/puppeteer/mouse.rb +3 -8
- data/lib/puppeteer/page.rb +116 -65
- data/lib/puppeteer/remote_object.rb +15 -1
- data/lib/puppeteer/target.rb +24 -24
- data/lib/puppeteer/version.rb +1 -1
- data/lib/puppeteer/viewport.rb +18 -0
- data/lib/puppeteer/wait_task.rb +183 -1
- data/lib/puppeteer/web_socket.rb +3 -1
- data/lib/puppeteer/web_socket_transport.rb +1 -1
- metadata +12 -2
@@ -424,7 +424,7 @@
|
|
424
424
|
</div>
|
425
425
|
|
426
426
|
<div id="footer">
|
427
|
-
Generated on
|
427
|
+
Generated on Sat Jun 20 17:15:07 2020 by
|
428
428
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
429
429
|
0.9.24 (ruby-2.6.3).
|
430
430
|
</div>
|
@@ -206,7 +206,7 @@
|
|
206
206
|
</div>
|
207
207
|
|
208
208
|
<div id="footer">
|
209
|
-
Generated on
|
209
|
+
Generated on Sat Jun 20 17:15:07 2020 by
|
210
210
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
211
211
|
0.9.24 (ruby-2.6.3).
|
212
212
|
</div>
|
@@ -187,12 +187,12 @@
|
|
187
187
|
<pre class="lines">
|
188
188
|
|
189
189
|
|
190
|
-
|
191
|
-
|
192
|
-
|
190
|
+
112
|
191
|
+
113
|
192
|
+
114</pre>
|
193
193
|
</td>
|
194
194
|
<td>
|
195
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/connection.rb', line
|
195
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/connection.rb', line 112</span>
|
196
196
|
|
197
197
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_payload'>handle_payload</span><span class='lparen'>(</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span>
|
198
198
|
<span class='id identifier rubyid_debug_puts'>debug_puts</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>SEND >> </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_decorate'>decorate</span><span class='lparen'>(</span><span class='id identifier rubyid_payload'>payload</span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span>
|
@@ -207,7 +207,7 @@
|
|
207
207
|
</div>
|
208
208
|
|
209
209
|
<div id="footer">
|
210
|
-
Generated on
|
210
|
+
Generated on Sat Jun 20 17:15:07 2020 by
|
211
211
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
212
212
|
0.9.24 (ruby-2.6.3).
|
213
213
|
</div>
|
@@ -200,19 +200,19 @@
|
|
200
200
|
<pre class="lines">
|
201
201
|
|
202
202
|
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
203
|
+
134
|
204
|
+
135
|
205
|
+
136
|
206
|
+
137
|
207
|
+
138
|
208
|
+
139
|
209
|
+
140
|
210
|
+
141
|
211
|
+
142
|
212
|
+
143</pre>
|
213
213
|
</td>
|
214
214
|
<td>
|
215
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/connection.rb', line
|
215
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/connection.rb', line 134</span>
|
216
216
|
|
217
217
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_message'>handle_message</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
|
218
218
|
<span class='kw'>if</span> <span class='id identifier rubyid_skip_debug_print?'>skip_debug_print?</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>method</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
@@ -234,7 +234,7 @@
|
|
234
234
|
</div>
|
235
235
|
|
236
236
|
<div id="footer">
|
237
|
-
Generated on
|
237
|
+
Generated on Sat Jun 20 17:15:07 2020 by
|
238
238
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
239
239
|
0.9.24 (ruby-2.6.3).
|
240
240
|
</div>
|
@@ -555,7 +555,7 @@
|
|
555
555
|
</div>
|
556
556
|
|
557
557
|
<div id="footer">
|
558
|
-
Generated on
|
558
|
+
Generated on Sat Jun 20 17:15:08 2020 by
|
559
559
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
560
560
|
0.9.24 (ruby-2.6.3).
|
561
561
|
</div>
|
@@ -423,7 +423,7 @@
|
|
423
423
|
</div>
|
424
424
|
|
425
425
|
<div id="footer">
|
426
|
-
Generated on
|
426
|
+
Generated on Sat Jun 20 17:15:08 2020 by
|
427
427
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
428
428
|
0.9.24 (ruby-2.6.3).
|
429
429
|
</div>
|
@@ -116,11 +116,56 @@
|
|
116
116
|
|
117
117
|
|
118
118
|
|
119
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="DOMWorld/DetachedError.html" title="Puppeteer::DOMWorld::DetachedError (class)">DetachedError</a></span
|
119
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="DOMWorld/DetachedError.html" title="Puppeteer::DOMWorld::DetachedError (class)">DetachedError</a></span>
|
120
120
|
|
121
121
|
|
122
122
|
</p>
|
123
123
|
|
124
|
+
|
125
|
+
<h2>
|
126
|
+
Constant Summary
|
127
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
128
|
+
</h2>
|
129
|
+
|
130
|
+
<dl class="constants">
|
131
|
+
|
132
|
+
<dt id="PREDICATE-constant" class="">PREDICATE =
|
133
|
+
|
134
|
+
</dt>
|
135
|
+
<dd><pre class="code"><span class='heredoc_beg'><<~JAVASCRIPT</span>
|
136
|
+
<span class='tstring_content'>/**
|
137
|
+
* @param {string} selectorOrXPath
|
138
|
+
* @param {boolean} isXPath
|
139
|
+
* @param {boolean} waitForVisible
|
140
|
+
* @param {boolean} waitForHidden
|
141
|
+
* @return {?Node|boolean}
|
142
|
+
*/
|
143
|
+
function _(selectorOrXPath, isXPath, waitForVisible, waitForHidden) {
|
144
|
+
const node = isXPath
|
145
|
+
? document.evaluate(selectorOrXPath, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null).singleNodeValue
|
146
|
+
: document.querySelector(selectorOrXPath);
|
147
|
+
if (!node)
|
148
|
+
return waitForHidden;
|
149
|
+
if (!waitForVisible && !waitForHidden)
|
150
|
+
return node;
|
151
|
+
const element = /** @type {Element} */ (node.nodeType === Node.TEXT_NODE ? node.parentElement : node);
|
152
|
+
const style = window.getComputedStyle(element);
|
153
|
+
const isVisible = style && style.visibility !== 'hidden' && hasVisibleBoundingBox();
|
154
|
+
const success = (waitForVisible === isVisible || waitForHidden === !isVisible);
|
155
|
+
return success ? node : null;
|
156
|
+
/**
|
157
|
+
* @return {boolean}
|
158
|
+
*/
|
159
|
+
function hasVisibleBoundingBox() {
|
160
|
+
const rect = element.getBoundingClientRect();
|
161
|
+
return !!(rect.top || rect.bottom || rect.width || rect.height);
|
162
|
+
}
|
163
|
+
}
|
164
|
+
</span><span class='heredoc_end'>JAVASCRIPT</span></pre></dd>
|
165
|
+
|
166
|
+
</dl>
|
167
|
+
|
168
|
+
|
124
169
|
|
125
170
|
|
126
171
|
|
@@ -172,6 +217,30 @@
|
|
172
217
|
<li class="public ">
|
173
218
|
<span class="summary_signature">
|
174
219
|
|
220
|
+
<a href="#_wait_tasks-instance_method" title="#_wait_tasks (instance method)">#<strong>_wait_tasks</strong> ⇒ Object </a>
|
221
|
+
|
222
|
+
|
223
|
+
|
224
|
+
</span>
|
225
|
+
|
226
|
+
|
227
|
+
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
<span class="summary_desc"><div class='inline'>
|
235
|
+
<p>only used in Puppeteer::WaitTask#initialize.</p>
|
236
|
+
</div></span>
|
237
|
+
|
238
|
+
</li>
|
239
|
+
|
240
|
+
|
241
|
+
<li class="public ">
|
242
|
+
<span class="summary_signature">
|
243
|
+
|
175
244
|
<a href="#click-instance_method" title="#click (instance method)">#<strong>click</strong>(selector, delay: nil, button: nil, click_count: nil) ⇒ Object </a>
|
176
245
|
|
177
246
|
|
@@ -392,6 +461,28 @@
|
|
392
461
|
<p>`$()` in JavaScript.</p>
|
393
462
|
</div></span>
|
394
463
|
|
464
|
+
</li>
|
465
|
+
|
466
|
+
|
467
|
+
<li class="public ">
|
468
|
+
<span class="summary_signature">
|
469
|
+
|
470
|
+
<a href="#select-instance_method" title="#select (instance method)">#<strong>select</strong>(selector, *values) ⇒ Array<String> </a>
|
471
|
+
|
472
|
+
|
473
|
+
|
474
|
+
</span>
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
485
|
+
|
395
486
|
</li>
|
396
487
|
|
397
488
|
|
@@ -488,6 +579,94 @@
|
|
488
579
|
<p>`$x()` in JavaScript.</p>
|
489
580
|
</div></span>
|
490
581
|
|
582
|
+
</li>
|
583
|
+
|
584
|
+
|
585
|
+
<li class="public ">
|
586
|
+
<span class="summary_signature">
|
587
|
+
|
588
|
+
<a href="#tap-instance_method" title="#tap (instance method)">#<strong>tap</strong>(selector) ⇒ Object </a>
|
589
|
+
|
590
|
+
|
591
|
+
|
592
|
+
</span>
|
593
|
+
|
594
|
+
|
595
|
+
|
596
|
+
|
597
|
+
|
598
|
+
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
603
|
+
|
604
|
+
</li>
|
605
|
+
|
606
|
+
|
607
|
+
<li class="public ">
|
608
|
+
<span class="summary_signature">
|
609
|
+
|
610
|
+
<a href="#type_text-instance_method" title="#type_text (instance method)">#<strong>type_text</strong>(selector, text, delay: nil) ⇒ Object </a>
|
611
|
+
|
612
|
+
|
613
|
+
|
614
|
+
</span>
|
615
|
+
|
616
|
+
|
617
|
+
|
618
|
+
|
619
|
+
|
620
|
+
|
621
|
+
|
622
|
+
|
623
|
+
|
624
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
625
|
+
|
626
|
+
</li>
|
627
|
+
|
628
|
+
|
629
|
+
<li class="public ">
|
630
|
+
<span class="summary_signature">
|
631
|
+
|
632
|
+
<a href="#wait_for_selector-instance_method" title="#wait_for_selector (instance method)">#<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) ⇒ Object </a>
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
</span>
|
637
|
+
|
638
|
+
|
639
|
+
|
640
|
+
|
641
|
+
|
642
|
+
|
643
|
+
|
644
|
+
|
645
|
+
|
646
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
647
|
+
|
648
|
+
</li>
|
649
|
+
|
650
|
+
|
651
|
+
<li class="public ">
|
652
|
+
<span class="summary_signature">
|
653
|
+
|
654
|
+
<a href="#wait_for_xpath-instance_method" title="#wait_for_xpath (instance method)">#<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) ⇒ Object </a>
|
655
|
+
|
656
|
+
|
657
|
+
|
658
|
+
</span>
|
659
|
+
|
660
|
+
|
661
|
+
|
662
|
+
|
663
|
+
|
664
|
+
|
665
|
+
|
666
|
+
|
667
|
+
|
668
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
669
|
+
|
491
670
|
</li>
|
492
671
|
|
493
672
|
|
@@ -643,7 +822,48 @@
|
|
643
822
|
|
644
823
|
|
645
824
|
<div class="method_details first">
|
646
|
-
<h3 class="signature first" id="
|
825
|
+
<h3 class="signature first" id="_wait_tasks-instance_method">
|
826
|
+
|
827
|
+
#<strong>_wait_tasks</strong> ⇒ <tt>Object</tt>
|
828
|
+
|
829
|
+
|
830
|
+
|
831
|
+
|
832
|
+
|
833
|
+
</h3><div class="docstring">
|
834
|
+
<div class="discussion">
|
835
|
+
|
836
|
+
<p>only used in Puppeteer::WaitTask#initialize</p>
|
837
|
+
|
838
|
+
|
839
|
+
</div>
|
840
|
+
</div>
|
841
|
+
<div class="tags">
|
842
|
+
|
843
|
+
|
844
|
+
</div><table class="source_code">
|
845
|
+
<tr>
|
846
|
+
<td>
|
847
|
+
<pre class="lines">
|
848
|
+
|
849
|
+
|
850
|
+
23
|
851
|
+
24
|
852
|
+
25</pre>
|
853
|
+
</td>
|
854
|
+
<td>
|
855
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 23</span>
|
856
|
+
|
857
|
+
<span class='kw'>def</span> <span class='id identifier rubyid__wait_tasks'>_wait_tasks</span>
|
858
|
+
<span class='ivar'>@wait_tasks</span>
|
859
|
+
<span class='kw'>end</span></pre>
|
860
|
+
</td>
|
861
|
+
</tr>
|
862
|
+
</table>
|
863
|
+
</div>
|
864
|
+
|
865
|
+
<div class="method_details ">
|
866
|
+
<h3 class="signature " id="click-instance_method">
|
647
867
|
|
648
868
|
#<strong>click</strong>(selector, delay: nil, button: nil, click_count: nil) ⇒ <tt>Object</tt>
|
649
869
|
|
@@ -725,14 +945,14 @@
|
|
725
945
|
<pre class="lines">
|
726
946
|
|
727
947
|
|
728
|
-
|
729
|
-
|
730
|
-
|
731
|
-
|
732
|
-
|
948
|
+
333
|
949
|
+
334
|
950
|
+
335
|
951
|
+
336
|
952
|
+
337</pre>
|
733
953
|
</td>
|
734
954
|
<td>
|
735
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
955
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 333</span>
|
736
956
|
|
737
957
|
<span class='kw'>def</span> <span class='id identifier rubyid_click'>click</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>button:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>click_count:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
738
958
|
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
@@ -783,11 +1003,6 @@
|
|
783
1003
|
<pre class="lines">
|
784
1004
|
|
785
1005
|
|
786
|
-
23
|
787
|
-
24
|
788
|
-
25
|
789
|
-
26
|
790
|
-
27
|
791
1006
|
28
|
792
1007
|
29
|
793
1008
|
30
|
@@ -803,10 +1018,14 @@
|
|
803
1018
|
40
|
804
1019
|
41
|
805
1020
|
42
|
806
|
-
43
|
1021
|
+
43
|
1022
|
+
44
|
1023
|
+
45
|
1024
|
+
46
|
1025
|
+
47</pre>
|
807
1026
|
</td>
|
808
1027
|
<td>
|
809
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1028
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 28</span>
|
810
1029
|
|
811
1030
|
<span class='kw'>def</span> <span class='id identifier rubyid_context='>context=</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
812
1031
|
<span class='comment'># D, [2020-04-12T22:45:03.938754 #46154] DEBUG -- : RECV << {"method"=>"Runtime.executionContextCreated", "params"=>{"context"=>{"id"=>3, "origin"=>"https://github.com", "name"=>"", "auxData"=>{"isDefault"=>true, "type"=>"default", "frameId"=>"3AD7F1E82BCBA88BFE31D03BC49FF6CB"}}}, "sessionId"=>"636CEF0C4FEAFC4FE815E9E7B5F7BA68"}
|
@@ -823,9 +1042,8 @@
|
|
823
1042
|
<span class='ivar'>@context_promise</span> <span class='op'>=</span> <span class='id identifier rubyid_resolvable_future'><span class='object_link'><a href="ConcurrentRubyUtils.html#resolvable_future-instance_method" title="Puppeteer::ConcurrentRubyUtils#resolvable_future (method)">resolvable_future</a></span></span>
|
824
1043
|
<span class='kw'>end</span>
|
825
1044
|
<span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_fulfill'>fulfill</span><span class='lparen'>(</span><span class='id identifier rubyid_context'>context</span><span class='rparen'>)</span>
|
826
|
-
|
827
|
-
|
828
|
-
</span> <span class='kw'>else</span>
|
1045
|
+
<span class='ivar'>@wait_tasks</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:async_rerun</span><span class='rparen'>)</span>
|
1046
|
+
<span class='kw'>else</span>
|
829
1047
|
<span class='id identifier rubyid_raise'>raise</span> <span class='const'>ArgumentError</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>context should now be nil. Use #delete_context for clearing document.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
830
1048
|
<span class='kw'>end</span>
|
831
1049
|
<span class='kw'>end</span></pre>
|
@@ -849,17 +1067,17 @@
|
|
849
1067
|
<pre class="lines">
|
850
1068
|
|
851
1069
|
|
852
|
-
45
|
853
|
-
46
|
854
|
-
47
|
855
|
-
48
|
856
1070
|
49
|
857
1071
|
50
|
858
1072
|
51
|
859
|
-
52
|
1073
|
+
52
|
1074
|
+
53
|
1075
|
+
54
|
1076
|
+
55
|
1077
|
+
56</pre>
|
860
1078
|
</td>
|
861
1079
|
<td>
|
862
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1080
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 49</span>
|
863
1081
|
|
864
1082
|
<span class='kw'>def</span> <span class='id identifier rubyid_delete_context'>delete_context</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context_id'>execution_context_id</span><span class='rparen'>)</span>
|
865
1083
|
<span class='kw'>if</span> <span class='ivar'>@pending_destroy</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_execution_context_id'>execution_context_id</span><span class='rparen'>)</span>
|
@@ -889,15 +1107,15 @@
|
|
889
1107
|
<pre class="lines">
|
890
1108
|
|
891
1109
|
|
892
|
-
58
|
893
|
-
59
|
894
|
-
60
|
895
|
-
61
|
896
1110
|
62
|
897
|
-
63
|
1111
|
+
63
|
1112
|
+
64
|
1113
|
+
65
|
1114
|
+
66
|
1115
|
+
67</pre>
|
898
1116
|
</td>
|
899
1117
|
<td>
|
900
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1118
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 62</span>
|
901
1119
|
|
902
1120
|
<span class='kw'>def</span> <span class='id identifier rubyid_detach'>detach</span>
|
903
1121
|
<span class='ivar'>@detached</span> <span class='op'>=</span> <span class='kw'>true</span>
|
@@ -973,12 +1191,12 @@
|
|
973
1191
|
<pre class="lines">
|
974
1192
|
|
975
1193
|
|
976
|
-
|
977
|
-
|
978
|
-
|
1194
|
+
89
|
1195
|
+
90
|
1196
|
+
91</pre>
|
979
1197
|
</td>
|
980
1198
|
<td>
|
981
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1199
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 89</span>
|
982
1200
|
|
983
1201
|
<span class='kw'>def</span> <span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
984
1202
|
<span class='id identifier rubyid_execution_context'>execution_context</span><span class='period'>.</span><span class='id identifier rubyid_evaluate'>evaluate</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1051,12 +1269,12 @@
|
|
1051
1269
|
<pre class="lines">
|
1052
1270
|
|
1053
1271
|
|
1054
|
-
|
1055
|
-
|
1056
|
-
|
1272
|
+
82
|
1273
|
+
83
|
1274
|
+
84</pre>
|
1057
1275
|
</td>
|
1058
1276
|
<td>
|
1059
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1277
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 82</span>
|
1060
1278
|
|
1061
1279
|
<span class='kw'>def</span> <span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1062
1280
|
<span class='id identifier rubyid_execution_context'>execution_context</span><span class='period'>.</span><span class='id identifier rubyid_evaluate_handle'>evaluate_handle</span><span class='lparen'>(</span><span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1103,15 +1321,15 @@
|
|
1103
1321
|
<pre class="lines">
|
1104
1322
|
|
1105
1323
|
|
1106
|
-
68
|
1107
|
-
69
|
1108
|
-
70
|
1109
|
-
71
|
1110
1324
|
72
|
1111
|
-
73
|
1325
|
+
73
|
1326
|
+
74
|
1327
|
+
75
|
1328
|
+
76
|
1329
|
+
77</pre>
|
1112
1330
|
</td>
|
1113
1331
|
<td>
|
1114
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1332
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 72</span>
|
1115
1333
|
|
1116
1334
|
<span class='kw'>def</span> <span class='id identifier rubyid_execution_context'>execution_context</span>
|
1117
1335
|
<span class='kw'>if</span> <span class='ivar'>@detached</span>
|
@@ -1161,12 +1379,12 @@
|
|
1161
1379
|
<pre class="lines">
|
1162
1380
|
|
1163
1381
|
|
1164
|
-
|
1165
|
-
|
1166
|
-
|
1382
|
+
58
|
1383
|
+
59
|
1384
|
+
60</pre>
|
1167
1385
|
</td>
|
1168
1386
|
<td>
|
1169
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1387
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 58</span>
|
1170
1388
|
|
1171
1389
|
<span class='kw'>def</span> <span class='id identifier rubyid_has_context?'>has_context?</span>
|
1172
1390
|
<span class='ivar'>@context_promise</span><span class='period'>.</span><span class='id identifier rubyid_resolved?'>resolved?</span>
|
@@ -1230,12 +1448,12 @@
|
|
1230
1448
|
<pre class="lines">
|
1231
1449
|
|
1232
1450
|
|
1233
|
-
|
1234
|
-
|
1235
|
-
|
1451
|
+
96
|
1452
|
+
97
|
1453
|
+
98</pre>
|
1236
1454
|
</td>
|
1237
1455
|
<td>
|
1238
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1456
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 96</span>
|
1239
1457
|
|
1240
1458
|
<span class='kw'>def</span> <span class='const'>S</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1241
1459
|
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>S</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
@@ -1243,6 +1461,81 @@
|
|
1243
1461
|
</td>
|
1244
1462
|
</tr>
|
1245
1463
|
</table>
|
1464
|
+
</div>
|
1465
|
+
|
1466
|
+
<div class="method_details ">
|
1467
|
+
<h3 class="signature " id="select-instance_method">
|
1468
|
+
|
1469
|
+
#<strong>select</strong>(selector, *values) ⇒ <tt>Array<String></tt>
|
1470
|
+
|
1471
|
+
|
1472
|
+
|
1473
|
+
|
1474
|
+
|
1475
|
+
</h3><div class="docstring">
|
1476
|
+
<div class="discussion">
|
1477
|
+
|
1478
|
+
|
1479
|
+
</div>
|
1480
|
+
</div>
|
1481
|
+
<div class="tags">
|
1482
|
+
<p class="tag_title">Parameters:</p>
|
1483
|
+
<ul class="param">
|
1484
|
+
|
1485
|
+
<li>
|
1486
|
+
|
1487
|
+
<span class='name'>selector</span>
|
1488
|
+
|
1489
|
+
|
1490
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1491
|
+
|
1492
|
+
|
1493
|
+
|
1494
|
+
</li>
|
1495
|
+
|
1496
|
+
</ul>
|
1497
|
+
|
1498
|
+
<p class="tag_title">Returns:</p>
|
1499
|
+
<ul class="return">
|
1500
|
+
|
1501
|
+
<li>
|
1502
|
+
|
1503
|
+
|
1504
|
+
<span class='type'>(<tt>Array<String></tt>)</span>
|
1505
|
+
|
1506
|
+
|
1507
|
+
|
1508
|
+
</li>
|
1509
|
+
|
1510
|
+
</ul>
|
1511
|
+
|
1512
|
+
</div><table class="source_code">
|
1513
|
+
<tr>
|
1514
|
+
<td>
|
1515
|
+
<pre class="lines">
|
1516
|
+
|
1517
|
+
|
1518
|
+
361
|
1519
|
+
362
|
1520
|
+
363
|
1521
|
+
364
|
1522
|
+
365
|
1523
|
+
366
|
1524
|
+
367</pre>
|
1525
|
+
</td>
|
1526
|
+
<td>
|
1527
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 361</span>
|
1528
|
+
|
1529
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1530
|
+
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1531
|
+
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lparen'>(</span><span class='op'>*</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
1532
|
+
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
1533
|
+
|
1534
|
+
<span class='id identifier rubyid_result'>result</span>
|
1535
|
+
<span class='kw'>end</span></pre>
|
1536
|
+
</td>
|
1537
|
+
</tr>
|
1538
|
+
</table>
|
1246
1539
|
</div>
|
1247
1540
|
|
1248
1541
|
<div class="method_details ">
|
@@ -1321,12 +1614,12 @@
|
|
1321
1614
|
<pre class="lines">
|
1322
1615
|
|
1323
1616
|
|
1324
|
-
|
1325
|
-
|
1326
|
-
|
1617
|
+
130
|
1618
|
+
131
|
1619
|
+
132</pre>
|
1327
1620
|
</td>
|
1328
1621
|
<td>
|
1329
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1622
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 130</span>
|
1330
1623
|
|
1331
1624
|
<span class='kw'>def</span> <span class='const'>Seval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1332
1625
|
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>Seval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1390,12 +1683,12 @@
|
|
1390
1683
|
<pre class="lines">
|
1391
1684
|
|
1392
1685
|
|
1393
|
-
|
1394
|
-
|
1395
|
-
|
1686
|
+
146
|
1687
|
+
147
|
1688
|
+
148</pre>
|
1396
1689
|
</td>
|
1397
1690
|
<td>
|
1398
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1691
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 146</span>
|
1399
1692
|
|
1400
1693
|
<span class='kw'>def</span> <span class='const'>SS</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1401
1694
|
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>SS</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
@@ -1481,12 +1774,12 @@
|
|
1481
1774
|
<pre class="lines">
|
1482
1775
|
|
1483
1776
|
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1777
|
+
139
|
1778
|
+
140
|
1779
|
+
141</pre>
|
1487
1780
|
</td>
|
1488
1781
|
<td>
|
1489
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1782
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 139</span>
|
1490
1783
|
|
1491
1784
|
<span class='kw'>def</span> <span class='const'>SSeval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
1492
1785
|
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>SSeval</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_page_function'>page_function</span><span class='comma'>,</span> <span class='op'>*</span><span class='id identifier rubyid_args'>args</span><span class='rparen'>)</span>
|
@@ -1550,12 +1843,12 @@
|
|
1550
1843
|
<pre class="lines">
|
1551
1844
|
|
1552
1845
|
|
1553
|
-
|
1554
|
-
|
1555
|
-
|
1846
|
+
121
|
1847
|
+
122
|
1848
|
+
123</pre>
|
1556
1849
|
</td>
|
1557
1850
|
<td>
|
1558
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line
|
1851
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 121</span>
|
1559
1852
|
|
1560
1853
|
<span class='kw'>def</span> <span class='const'>Sx</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
1561
1854
|
<span class='id identifier rubyid_document'>document</span><span class='period'>.</span><span class='const'>Sx</span><span class='lparen'>(</span><span class='id identifier rubyid_expression'>expression</span><span class='rparen'>)</span>
|
@@ -1563,6 +1856,352 @@
|
|
1563
1856
|
</td>
|
1564
1857
|
</tr>
|
1565
1858
|
</table>
|
1859
|
+
</div>
|
1860
|
+
|
1861
|
+
<div class="method_details ">
|
1862
|
+
<h3 class="signature " id="tap-instance_method">
|
1863
|
+
|
1864
|
+
#<strong>tap</strong>(selector) ⇒ <tt>Object</tt>
|
1865
|
+
|
1866
|
+
|
1867
|
+
|
1868
|
+
|
1869
|
+
|
1870
|
+
</h3><div class="docstring">
|
1871
|
+
<div class="discussion">
|
1872
|
+
|
1873
|
+
|
1874
|
+
</div>
|
1875
|
+
</div>
|
1876
|
+
<div class="tags">
|
1877
|
+
<p class="tag_title">Parameters:</p>
|
1878
|
+
<ul class="param">
|
1879
|
+
|
1880
|
+
<li>
|
1881
|
+
|
1882
|
+
<span class='name'>selector</span>
|
1883
|
+
|
1884
|
+
|
1885
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1886
|
+
|
1887
|
+
|
1888
|
+
|
1889
|
+
</li>
|
1890
|
+
|
1891
|
+
</ul>
|
1892
|
+
|
1893
|
+
|
1894
|
+
</div><table class="source_code">
|
1895
|
+
<tr>
|
1896
|
+
<td>
|
1897
|
+
<pre class="lines">
|
1898
|
+
|
1899
|
+
|
1900
|
+
370
|
1901
|
+
371
|
1902
|
+
372
|
1903
|
+
373
|
1904
|
+
374</pre>
|
1905
|
+
</td>
|
1906
|
+
<td>
|
1907
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 370</span>
|
1908
|
+
|
1909
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_tap'>tap</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1910
|
+
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1911
|
+
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_tap'>tap</span>
|
1912
|
+
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
1913
|
+
<span class='kw'>end</span></pre>
|
1914
|
+
</td>
|
1915
|
+
</tr>
|
1916
|
+
</table>
|
1917
|
+
</div>
|
1918
|
+
|
1919
|
+
<div class="method_details ">
|
1920
|
+
<h3 class="signature " id="type_text-instance_method">
|
1921
|
+
|
1922
|
+
#<strong>type_text</strong>(selector, text, delay: nil) ⇒ <tt>Object</tt>
|
1923
|
+
|
1924
|
+
|
1925
|
+
|
1926
|
+
|
1927
|
+
|
1928
|
+
</h3><div class="docstring">
|
1929
|
+
<div class="discussion">
|
1930
|
+
|
1931
|
+
|
1932
|
+
</div>
|
1933
|
+
</div>
|
1934
|
+
<div class="tags">
|
1935
|
+
<p class="tag_title">Parameters:</p>
|
1936
|
+
<ul class="param">
|
1937
|
+
|
1938
|
+
<li>
|
1939
|
+
|
1940
|
+
<span class='name'>selector</span>
|
1941
|
+
|
1942
|
+
|
1943
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1944
|
+
|
1945
|
+
|
1946
|
+
|
1947
|
+
</li>
|
1948
|
+
|
1949
|
+
<li>
|
1950
|
+
|
1951
|
+
<span class='name'>text</span>
|
1952
|
+
|
1953
|
+
|
1954
|
+
<span class='type'>(<tt>String</tt>)</span>
|
1955
|
+
|
1956
|
+
|
1957
|
+
|
1958
|
+
</li>
|
1959
|
+
|
1960
|
+
<li>
|
1961
|
+
|
1962
|
+
<span class='name'>delay</span>
|
1963
|
+
|
1964
|
+
|
1965
|
+
<span class='type'>(<tt>Number</tt>)</span>
|
1966
|
+
|
1967
|
+
|
1968
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
1969
|
+
|
1970
|
+
|
1971
|
+
</li>
|
1972
|
+
|
1973
|
+
</ul>
|
1974
|
+
|
1975
|
+
|
1976
|
+
</div><table class="source_code">
|
1977
|
+
<tr>
|
1978
|
+
<td>
|
1979
|
+
<pre class="lines">
|
1980
|
+
|
1981
|
+
|
1982
|
+
379
|
1983
|
+
380
|
1984
|
+
381
|
1985
|
+
382
|
1986
|
+
383</pre>
|
1987
|
+
</td>
|
1988
|
+
<td>
|
1989
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 379</span>
|
1990
|
+
|
1991
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_type_text'>type_text</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
1992
|
+
<span class='id identifier rubyid_handle'>handle</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#S-instance_method" title="Puppeteer::DOMWorld#S (method)">S</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='rparen'>)</span>
|
1993
|
+
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_type_text'>type_text</span><span class='lparen'>(</span><span class='id identifier rubyid_text'>text</span><span class='comma'>,</span> <span class='label'>delay:</span> <span class='id identifier rubyid_delay'>delay</span><span class='rparen'>)</span>
|
1994
|
+
<span class='id identifier rubyid_handle'>handle</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
1995
|
+
<span class='kw'>end</span></pre>
|
1996
|
+
</td>
|
1997
|
+
</tr>
|
1998
|
+
</table>
|
1999
|
+
</div>
|
2000
|
+
|
2001
|
+
<div class="method_details ">
|
2002
|
+
<h3 class="signature " id="wait_for_selector-instance_method">
|
2003
|
+
|
2004
|
+
#<strong>wait_for_selector</strong>(selector, visible: nil, hidden: nil, timeout: nil) ⇒ <tt>Object</tt>
|
2005
|
+
|
2006
|
+
|
2007
|
+
|
2008
|
+
|
2009
|
+
|
2010
|
+
</h3><div class="docstring">
|
2011
|
+
<div class="discussion">
|
2012
|
+
|
2013
|
+
|
2014
|
+
</div>
|
2015
|
+
</div>
|
2016
|
+
<div class="tags">
|
2017
|
+
<p class="tag_title">Parameters:</p>
|
2018
|
+
<ul class="param">
|
2019
|
+
|
2020
|
+
<li>
|
2021
|
+
|
2022
|
+
<span class='name'>selector</span>
|
2023
|
+
|
2024
|
+
|
2025
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2026
|
+
|
2027
|
+
|
2028
|
+
|
2029
|
+
</li>
|
2030
|
+
|
2031
|
+
<li>
|
2032
|
+
|
2033
|
+
<span class='name'>visible</span>
|
2034
|
+
|
2035
|
+
|
2036
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2037
|
+
|
2038
|
+
|
2039
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2040
|
+
|
2041
|
+
|
2042
|
+
—
|
2043
|
+
<div class='inline'>
|
2044
|
+
<p>Wait for element visible (not 'display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2045
|
+
</div>
|
2046
|
+
|
2047
|
+
</li>
|
2048
|
+
|
2049
|
+
<li>
|
2050
|
+
|
2051
|
+
<span class='name'>hidden</span>
|
2052
|
+
|
2053
|
+
|
2054
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2055
|
+
|
2056
|
+
|
2057
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2058
|
+
|
2059
|
+
|
2060
|
+
—
|
2061
|
+
<div class='inline'>
|
2062
|
+
<p>Wait for element invisible ('display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2063
|
+
</div>
|
2064
|
+
|
2065
|
+
</li>
|
2066
|
+
|
2067
|
+
<li>
|
2068
|
+
|
2069
|
+
<span class='name'>timeout</span>
|
2070
|
+
|
2071
|
+
|
2072
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
2073
|
+
|
2074
|
+
|
2075
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2076
|
+
|
2077
|
+
|
2078
|
+
</li>
|
2079
|
+
|
2080
|
+
</ul>
|
2081
|
+
|
2082
|
+
|
2083
|
+
</div><table class="source_code">
|
2084
|
+
<tr>
|
2085
|
+
<td>
|
2086
|
+
<pre class="lines">
|
2087
|
+
|
2088
|
+
|
2089
|
+
389
|
2090
|
+
390
|
2091
|
+
391</pre>
|
2092
|
+
</td>
|
2093
|
+
<td>
|
2094
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 389</span>
|
2095
|
+
|
2096
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_selector'>wait_for_selector</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2097
|
+
<span class='id identifier rubyid_wait_for_selector_or_xpath'>wait_for_selector_or_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_selector'>selector</span><span class='comma'>,</span> <span class='kw'>false</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='id identifier rubyid_visible'>visible</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='id identifier rubyid_hidden'>hidden</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
|
2098
|
+
<span class='kw'>end</span></pre>
|
2099
|
+
</td>
|
2100
|
+
</tr>
|
2101
|
+
</table>
|
2102
|
+
</div>
|
2103
|
+
|
2104
|
+
<div class="method_details ">
|
2105
|
+
<h3 class="signature " id="wait_for_xpath-instance_method">
|
2106
|
+
|
2107
|
+
#<strong>wait_for_xpath</strong>(xpath, visible: nil, hidden: nil, timeout: nil) ⇒ <tt>Object</tt>
|
2108
|
+
|
2109
|
+
|
2110
|
+
|
2111
|
+
|
2112
|
+
|
2113
|
+
</h3><div class="docstring">
|
2114
|
+
<div class="discussion">
|
2115
|
+
|
2116
|
+
|
2117
|
+
</div>
|
2118
|
+
</div>
|
2119
|
+
<div class="tags">
|
2120
|
+
<p class="tag_title">Parameters:</p>
|
2121
|
+
<ul class="param">
|
2122
|
+
|
2123
|
+
<li>
|
2124
|
+
|
2125
|
+
<span class='name'>xpath</span>
|
2126
|
+
|
2127
|
+
|
2128
|
+
<span class='type'>(<tt>String</tt>)</span>
|
2129
|
+
|
2130
|
+
|
2131
|
+
|
2132
|
+
</li>
|
2133
|
+
|
2134
|
+
<li>
|
2135
|
+
|
2136
|
+
<span class='name'>visible</span>
|
2137
|
+
|
2138
|
+
|
2139
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2140
|
+
|
2141
|
+
|
2142
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2143
|
+
|
2144
|
+
|
2145
|
+
—
|
2146
|
+
<div class='inline'>
|
2147
|
+
<p>Wait for element visible (not 'display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2148
|
+
</div>
|
2149
|
+
|
2150
|
+
</li>
|
2151
|
+
|
2152
|
+
<li>
|
2153
|
+
|
2154
|
+
<span class='name'>hidden</span>
|
2155
|
+
|
2156
|
+
|
2157
|
+
<span class='type'>(<tt>Boolean</tt>)</span>
|
2158
|
+
|
2159
|
+
|
2160
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2161
|
+
|
2162
|
+
|
2163
|
+
—
|
2164
|
+
<div class='inline'>
|
2165
|
+
<p>Wait for element invisible ('display: none' nor 'visibility: hidden') on true. default to false.</p>
|
2166
|
+
</div>
|
2167
|
+
|
2168
|
+
</li>
|
2169
|
+
|
2170
|
+
<li>
|
2171
|
+
|
2172
|
+
<span class='name'>timeout</span>
|
2173
|
+
|
2174
|
+
|
2175
|
+
<span class='type'>(<tt>Integer</tt>)</span>
|
2176
|
+
|
2177
|
+
|
2178
|
+
<em class="default">(defaults to: <tt>nil</tt>)</em>
|
2179
|
+
|
2180
|
+
|
2181
|
+
</li>
|
2182
|
+
|
2183
|
+
</ul>
|
2184
|
+
|
2185
|
+
|
2186
|
+
</div><table class="source_code">
|
2187
|
+
<tr>
|
2188
|
+
<td>
|
2189
|
+
<pre class="lines">
|
2190
|
+
|
2191
|
+
|
2192
|
+
397
|
2193
|
+
398
|
2194
|
+
399</pre>
|
2195
|
+
</td>
|
2196
|
+
<td>
|
2197
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/dom_world.rb', line 397</span>
|
2198
|
+
|
2199
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_xpath'>wait_for_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_xpath'>xpath</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='kw'>nil</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2200
|
+
<span class='id identifier rubyid_wait_for_selector_or_xpath'>wait_for_selector_or_xpath</span><span class='lparen'>(</span><span class='id identifier rubyid_xpath'>xpath</span><span class='comma'>,</span> <span class='kw'>true</span><span class='comma'>,</span> <span class='label'>visible:</span> <span class='id identifier rubyid_visible'>visible</span><span class='comma'>,</span> <span class='label'>hidden:</span> <span class='id identifier rubyid_hidden'>hidden</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='id identifier rubyid_timeout'>timeout</span><span class='rparen'>)</span>
|
2201
|
+
<span class='kw'>end</span></pre>
|
2202
|
+
</td>
|
2203
|
+
</tr>
|
2204
|
+
</table>
|
1566
2205
|
</div>
|
1567
2206
|
|
1568
2207
|
</div>
|
@@ -1570,7 +2209,7 @@
|
|
1570
2209
|
</div>
|
1571
2210
|
|
1572
2211
|
<div id="footer">
|
1573
|
-
Generated on
|
2212
|
+
Generated on Sat Jun 20 17:15:07 2020 by
|
1574
2213
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
1575
2214
|
0.9.24 (ruby-2.6.3).
|
1576
2215
|
</div>
|