puppeteer-ruby 0.0.10 → 0.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/docs/Puppeteer.html +2 -2
- data/docs/Puppeteer/AsyncAwaitBehavior.html +1 -1
- data/docs/Puppeteer/Browser.html +254 -144
- 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 +1 -1
- 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 +32 -32
- data/docs/Puppeteer/DOMWorld/DetachedError.html +1 -1
- data/docs/Puppeteer/DebugPrint.html +1 -1
- data/docs/Puppeteer/Device.html +1 -1
- data/docs/Puppeteer/Devices.html +1 -1
- data/docs/Puppeteer/ElementHandle.html +1 -1
- data/docs/Puppeteer/ElementHandle/BoundingBox.html +507 -0
- data/docs/Puppeteer/ElementHandle/BoxModel.html +404 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +1 -1
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +1 -1
- data/docs/Puppeteer/ElementHandle/Point.html +1 -1
- 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 +1 -1
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +1 -1
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +1 -1
- data/docs/Puppeteer/FileChooser.html +1 -1
- data/docs/Puppeteer/Frame.html +425 -289
- data/docs/Puppeteer/FrameManager.html +1 -1
- 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 +1 -1
- 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 +1 -1
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +1 -1
- data/docs/Puppeteer/Page/ScreenshotOptions.html +1 -1
- data/docs/Puppeteer/Page/ScriptTag.html +1 -1
- data/docs/Puppeteer/Page/StyleTag.html +1 -1
- data/docs/Puppeteer/Page/TargetCrashedError.html +1 -1
- data/docs/Puppeteer/RemoteObject.html +1 -1
- data/docs/Puppeteer/Target.html +1 -1
- data/docs/Puppeteer/Target/InitializeFailure.html +1 -1
- data/docs/Puppeteer/Target/TargetInfo.html +1 -1
- data/docs/Puppeteer/TimeoutError.html +1 -1
- data/docs/Puppeteer/TimeoutSettings.html +1 -1
- data/docs/Puppeteer/TouchScreen.html +1 -1
- data/docs/Puppeteer/Viewport.html +1 -1
- data/docs/Puppeteer/WaitTask.html +1 -1
- data/docs/Puppeteer/WaitTask/TerminatedError.html +1 -1
- data/docs/Puppeteer/WaitTask/TimeoutError.html +1 -1
- data/docs/Puppeteer/WebSocket.html +1 -1
- data/docs/Puppeteer/WebSocket/DriverImpl.html +1 -1
- data/docs/Puppeteer/WebSocket/TransportError.html +124 -0
- data/docs/Puppeteer/WebSocketTransport.html +1 -1
- data/docs/_index.html +5 -12
- data/docs/class_list.html +1 -1
- data/docs/file.README.html +1 -1
- data/docs/index.html +1 -1
- data/docs/method_list.html +402 -386
- data/docs/top-level-namespace.html +1 -1
- data/lib/puppeteer/browser.rb +17 -1
- data/lib/puppeteer/connection.rb +13 -1
- data/lib/puppeteer/dom_world.rb +7 -6
- data/lib/puppeteer/frame.rb +19 -1
- data/lib/puppeteer/mouse.rb +3 -8
- data/lib/puppeteer/page.rb +1 -1
- data/lib/puppeteer/version.rb +1 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a07fd2c57e3c62d4707af33800a1b8c4470324c1b42e4a30646799d773008919
|
4
|
+
data.tar.gz: ebef1b4801f825d61227e802009dc0ba265f9a934713aee77378da04e8b00788
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d953d0f11e1c764bbd046d8124306231f3f735a7cf39566d15c357694d96f8305319eddd914e6e53232fc860d1b64b7e4389700311e917f1117de310a2c76a99
|
7
|
+
data.tar.gz: 8f87363c9b82ff27c8747423c74d25f98a19a9b288a77fbb46cd5336a65ad2555d13d58778734a1a4c47589e0c956da4385879e988b29b444a90261f3b6fb94e
|
data/docs/Puppeteer.html
CHANGED
@@ -1012,7 +1012,7 @@
|
|
1012
1012
|
<dt id="VERSION-constant" class="">VERSION =
|
1013
1013
|
|
1014
1014
|
</dt>
|
1015
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.
|
1015
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>0.0.11</span><span class='tstring_end'>'</span></span></pre></dd>
|
1016
1016
|
|
1017
1017
|
</dl>
|
1018
1018
|
|
@@ -2010,7 +2010,7 @@
|
|
2010
2010
|
</div>
|
2011
2011
|
|
2012
2012
|
<div id="footer">
|
2013
|
-
Generated on
|
2013
|
+
Generated on Sat Jun 20 17:15:06 2020 by
|
2014
2014
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2015
2015
|
0.9.24 (ruby-2.6.3).
|
2016
2016
|
</div>
|
data/docs/Puppeteer/Browser.html
CHANGED
@@ -105,6 +105,27 @@
|
|
105
105
|
</div>
|
106
106
|
|
107
107
|
|
108
|
+
|
109
|
+
<h2>
|
110
|
+
Constant Summary
|
111
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
112
|
+
</h2>
|
113
|
+
|
114
|
+
<dl class="constants">
|
115
|
+
|
116
|
+
<dt id="EVENT_MAPPINGS-constant" class="">EVENT_MAPPINGS =
|
117
|
+
|
118
|
+
</dt>
|
119
|
+
<dd><pre class="code"><span class='lbrace'>{</span>
|
120
|
+
<span class='label'>disconnected:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Browser.Disconnected</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
121
|
+
<span class='label'>targetcreated:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Browser.TargetCreated</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
122
|
+
<span class='label'>targetchanged:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Browser.TargetChanged</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
123
|
+
<span class='label'>targetdestroyed:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Browser.TargetDestroyed</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
124
|
+
<span class='rbrace'>}</span></pre></dd>
|
125
|
+
|
126
|
+
</dl>
|
127
|
+
|
128
|
+
|
108
129
|
|
109
130
|
|
110
131
|
|
@@ -435,6 +456,28 @@
|
|
435
456
|
|
436
457
|
|
437
458
|
|
459
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
460
|
+
|
461
|
+
</li>
|
462
|
+
|
463
|
+
|
464
|
+
<li class="public ">
|
465
|
+
<span class="summary_signature">
|
466
|
+
|
467
|
+
<a href="#on-instance_method" title="#on (instance method)">#<strong>on</strong>(event_name, &block) ⇒ Object </a>
|
468
|
+
|
469
|
+
|
470
|
+
|
471
|
+
</span>
|
472
|
+
|
473
|
+
|
474
|
+
|
475
|
+
|
476
|
+
|
477
|
+
|
478
|
+
|
479
|
+
|
480
|
+
|
438
481
|
<span class="summary_desc"><div class='inline'></div></span>
|
439
482
|
|
440
483
|
</li>
|
@@ -790,7 +833,7 @@
|
|
790
833
|
<span class='ivar'>@contexts</span><span class='lbracket'>[</span><span class='id identifier rubyid_context_id'>context_id</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="BrowserContext.html" title="Puppeteer::BrowserContext (class)">BrowserContext</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="BrowserContext.html#initialize-instance_method" title="Puppeteer::BrowserContext#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='ivar'>@connection</span><span class='comma'>,</span> <span class='kw'>self</span><span class='period'>.</span> <span class='id identifier rubyid_context_id'>context_id</span><span class='rparen'>)</span>
|
791
834
|
<span class='kw'>end</span>
|
792
835
|
<span class='ivar'>@targets</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
793
|
-
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_on_event'>on_event</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.
|
836
|
+
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_on_event'>on_event</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Connection.Disconnected</span><span class='tstring_end'>'</span></span> <span class='kw'>do</span>
|
794
837
|
<span class='id identifier rubyid_emit_event'>emit_event</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Events.Browser.Disconnected</span><span class='tstring_end'>'</span></span>
|
795
838
|
<span class='kw'>end</span>
|
796
839
|
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_on_event'>on_event</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Target.targetCreated</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_method'>method</span><span class='lparen'>(</span><span class='symbol'>:handle_target_created</span><span class='rparen'>)</span>
|
@@ -957,12 +1000,12 @@
|
|
957
1000
|
<pre class="lines">
|
958
1001
|
|
959
1002
|
|
960
|
-
|
961
|
-
|
962
|
-
|
1003
|
+
85
|
1004
|
+
86
|
1005
|
+
87</pre>
|
963
1006
|
</td>
|
964
1007
|
<td>
|
965
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1008
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 85</span>
|
966
1009
|
|
967
1010
|
<span class='kw'>def</span> <span class='id identifier rubyid_browser_contexts'>browser_contexts</span>
|
968
1011
|
<span class='lbracket'>[</span><span class='ivar'>@default_context</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id identifier rubyid_concat'>concat</span><span class='lparen'>(</span><span class='ivar'>@contexts</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='rparen'>)</span>
|
@@ -987,13 +1030,13 @@
|
|
987
1030
|
<pre class="lines">
|
988
1031
|
|
989
1032
|
|
990
|
-
|
991
|
-
|
992
|
-
|
993
|
-
|
1033
|
+
259
|
1034
|
+
260
|
1035
|
+
261
|
1036
|
+
262</pre>
|
994
1037
|
</td>
|
995
1038
|
<td>
|
996
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1039
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 259</span>
|
997
1040
|
|
998
1041
|
<span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span>
|
999
1042
|
<span class='ivar'>@close_callback</span><span class='period'>.</span><span class='id identifier rubyid_call'>call</span>
|
@@ -1041,12 +1084,12 @@
|
|
1041
1084
|
<pre class="lines">
|
1042
1085
|
|
1043
1086
|
|
1044
|
-
|
1045
|
-
|
1046
|
-
|
1087
|
+
268
|
1088
|
+
269
|
1089
|
+
270</pre>
|
1047
1090
|
</td>
|
1048
1091
|
<td>
|
1049
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1092
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 268</span>
|
1050
1093
|
|
1051
1094
|
<span class='kw'>def</span> <span class='id identifier rubyid_connected?'>connected?</span>
|
1052
1095
|
<span class='op'>!</span><span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_closed?'>closed?</span>
|
@@ -1093,14 +1136,14 @@
|
|
1093
1136
|
<pre class="lines">
|
1094
1137
|
|
1095
1138
|
|
1096
|
-
|
1097
|
-
|
1098
|
-
|
1099
|
-
|
1100
|
-
|
1139
|
+
79
|
1140
|
+
80
|
1141
|
+
81
|
1142
|
+
82
|
1143
|
+
83</pre>
|
1101
1144
|
</td>
|
1102
1145
|
<td>
|
1103
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1146
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 79</span>
|
1104
1147
|
|
1105
1148
|
<span class='kw'>def</span> <span class='id identifier rubyid_create_incognito_browser_context'>create_incognito_browser_context</span>
|
1106
1149
|
<span class='id identifier rubyid_result'>result</span> <span class='op'>=</span> <span class='ivar'>@connection</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'>'</span><span class='tstring_content'>Target.createBrowserContext</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
@@ -1164,20 +1207,20 @@
|
|
1164
1207
|
<pre class="lines">
|
1165
1208
|
|
1166
1209
|
|
1167
|
-
|
1168
|
-
|
1169
|
-
|
1170
|
-
|
1171
|
-
|
1172
|
-
|
1173
|
-
|
1174
|
-
|
1175
|
-
|
1176
|
-
|
1177
|
-
|
1210
|
+
187
|
1211
|
+
188
|
1212
|
+
189
|
1213
|
+
190
|
1214
|
+
191
|
1215
|
+
192
|
1216
|
+
193
|
1217
|
+
194
|
1218
|
+
195
|
1219
|
+
196
|
1220
|
+
197</pre>
|
1178
1221
|
</td>
|
1179
1222
|
<td>
|
1180
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1223
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 187</span>
|
1181
1224
|
|
1182
1225
|
<span class='kw'>def</span> <span class='id identifier rubyid_create_page_in_context'>create_page_in_context</span><span class='lparen'>(</span><span class='id identifier rubyid_context_id'>context_id</span><span class='rparen'>)</span>
|
1183
1226
|
<span class='id identifier rubyid_create_target_params'>create_target_params</span> <span class='op'>=</span> <span class='lbrace'>{</span> <span class='label'>url:</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>about:blank</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
@@ -1232,12 +1275,12 @@
|
|
1232
1275
|
<pre class="lines">
|
1233
1276
|
|
1234
1277
|
|
1235
|
-
|
1236
|
-
|
1237
|
-
|
1278
|
+
90
|
1279
|
+
91
|
1280
|
+
92</pre>
|
1238
1281
|
</td>
|
1239
1282
|
<td>
|
1240
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1283
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 90</span>
|
1241
1284
|
|
1242
1285
|
<span class='kw'>def</span> <span class='id identifier rubyid_default_browser_context'>default_browser_context</span>
|
1243
1286
|
<span class='ivar'>@default_context</span>
|
@@ -1262,12 +1305,12 @@
|
|
1262
1305
|
<pre class="lines">
|
1263
1306
|
|
1264
1307
|
|
1265
|
-
|
1266
|
-
|
1267
|
-
|
1308
|
+
264
|
1309
|
+
265
|
1310
|
+
266</pre>
|
1268
1311
|
</td>
|
1269
1312
|
<td>
|
1270
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1313
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 264</span>
|
1271
1314
|
|
1272
1315
|
<span class='kw'>def</span> <span class='id identifier rubyid_disconnect'>disconnect</span>
|
1273
1316
|
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_dispose'>dispose</span>
|
@@ -1316,13 +1359,13 @@
|
|
1316
1359
|
<pre class="lines">
|
1317
1360
|
|
1318
1361
|
|
1319
|
-
|
1320
|
-
|
1321
|
-
|
1322
|
-
|
1362
|
+
95
|
1363
|
+
96
|
1364
|
+
97
|
1365
|
+
98</pre>
|
1323
1366
|
</td>
|
1324
1367
|
<td>
|
1325
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1368
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 95</span>
|
1326
1369
|
|
1327
1370
|
<span class='kw'>def</span> <span class='id identifier rubyid_dispose_context'>dispose_context</span><span class='lparen'>(</span><span class='id identifier rubyid_context_id'>context_id</span><span class='rparen'>)</span>
|
1328
1371
|
<span class='ivar'>@connection</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'>'</span><span class='tstring_content'>Target.disposeBrowserContext</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>browserContextId:</span> <span class='id identifier rubyid_context_id'>context_id</span><span class='rparen'>)</span>
|
@@ -1372,22 +1415,6 @@
|
|
1372
1415
|
<pre class="lines">
|
1373
1416
|
|
1374
1417
|
|
1375
|
-
85
|
1376
|
-
86
|
1377
|
-
87
|
1378
|
-
88
|
1379
|
-
89
|
1380
|
-
90
|
1381
|
-
91
|
1382
|
-
92
|
1383
|
-
93
|
1384
|
-
94
|
1385
|
-
95
|
1386
|
-
96
|
1387
|
-
97
|
1388
|
-
98
|
1389
|
-
99
|
1390
|
-
100
|
1391
1418
|
101
|
1392
1419
|
102
|
1393
1420
|
103
|
@@ -1400,10 +1427,26 @@
|
|
1400
1427
|
110
|
1401
1428
|
111
|
1402
1429
|
112
|
1403
|
-
113
|
1430
|
+
113
|
1431
|
+
114
|
1432
|
+
115
|
1433
|
+
116
|
1434
|
+
117
|
1435
|
+
118
|
1436
|
+
119
|
1437
|
+
120
|
1438
|
+
121
|
1439
|
+
122
|
1440
|
+
123
|
1441
|
+
124
|
1442
|
+
125
|
1443
|
+
126
|
1444
|
+
127
|
1445
|
+
128
|
1446
|
+
129</pre>
|
1404
1447
|
</td>
|
1405
1448
|
<td>
|
1406
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1449
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 101</span>
|
1407
1450
|
|
1408
1451
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_target_created'>handle_target_created</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
|
1409
1452
|
<span class='id identifier rubyid_target_info'>target_info</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Target/TargetInfo.html#initialize-instance_method" title="Puppeteer::Target::TargetInfo#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>targetInfo</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
@@ -1478,20 +1521,20 @@
|
|
1478
1521
|
<pre class="lines">
|
1479
1522
|
|
1480
1523
|
|
1481
|
-
|
1482
|
-
|
1483
|
-
|
1484
|
-
|
1485
|
-
|
1486
|
-
|
1487
|
-
|
1488
|
-
|
1489
|
-
|
1490
|
-
|
1491
|
-
|
1524
|
+
133
|
1525
|
+
134
|
1526
|
+
135
|
1527
|
+
136
|
1528
|
+
137
|
1529
|
+
138
|
1530
|
+
139
|
1531
|
+
140
|
1532
|
+
141
|
1533
|
+
142
|
1534
|
+
143</pre>
|
1492
1535
|
</td>
|
1493
1536
|
<td>
|
1494
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1537
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 133</span>
|
1495
1538
|
|
1496
1539
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_target_destroyed'>handle_target_destroyed</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
|
1497
1540
|
<span class='id identifier rubyid_target_id'>target_id</span> <span class='op'>=</span> <span class='id identifier rubyid_event'>event</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>targetId</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span>
|
@@ -1548,22 +1591,6 @@
|
|
1548
1591
|
<pre class="lines">
|
1549
1592
|
|
1550
1593
|
|
1551
|
-
130
|
1552
|
-
131
|
1553
|
-
132
|
1554
|
-
133
|
1555
|
-
134
|
1556
|
-
135
|
1557
|
-
136
|
1558
|
-
137
|
1559
|
-
138
|
1560
|
-
139
|
1561
|
-
140
|
1562
|
-
141
|
1563
|
-
142
|
1564
|
-
143
|
1565
|
-
144
|
1566
|
-
145
|
1567
1594
|
146
|
1568
1595
|
147
|
1569
1596
|
148
|
@@ -1572,10 +1599,26 @@
|
|
1572
1599
|
151
|
1573
1600
|
152
|
1574
1601
|
153
|
1575
|
-
154
|
1602
|
+
154
|
1603
|
+
155
|
1604
|
+
156
|
1605
|
+
157
|
1606
|
+
158
|
1607
|
+
159
|
1608
|
+
160
|
1609
|
+
161
|
1610
|
+
162
|
1611
|
+
163
|
1612
|
+
164
|
1613
|
+
165
|
1614
|
+
166
|
1615
|
+
167
|
1616
|
+
168
|
1617
|
+
169
|
1618
|
+
170</pre>
|
1576
1619
|
</td>
|
1577
1620
|
<td>
|
1578
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1621
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 146</span>
|
1579
1622
|
|
1580
1623
|
<span class='kw'>def</span> <span class='id identifier rubyid_handle_target_info_changed'>handle_target_info_changed</span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='rparen'>)</span>
|
1581
1624
|
<span class='id identifier rubyid_target_info'>target_info</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Target.html" title="Puppeteer::Target (class)">Target</a></span></span><span class='op'>::</span><span class='const'><span class='object_link'><a href="Target/TargetInfo.html" title="Puppeteer::Target::TargetInfo (class)">TargetInfo</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="Target/TargetInfo.html#initialize-instance_method" title="Puppeteer::Target::TargetInfo#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_event'>event</span><span class='lbracket'>[</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>targetInfo</span><span class='tstring_end'>'</span></span><span class='rbracket'>]</span><span class='rparen'>)</span>
|
@@ -1622,12 +1665,12 @@
|
|
1622
1665
|
<pre class="lines">
|
1623
1666
|
|
1624
1667
|
|
1625
|
-
|
1626
|
-
|
1627
|
-
|
1668
|
+
181
|
1669
|
+
182
|
1670
|
+
183</pre>
|
1628
1671
|
</td>
|
1629
1672
|
<td>
|
1630
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1673
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 181</span>
|
1631
1674
|
|
1632
1675
|
<span class='kw'>def</span> <span class='id identifier rubyid_new_page'>new_page</span>
|
1633
1676
|
<span class='ivar'>@default_context</span><span class='period'>.</span><span class='id identifier rubyid_new_page'>new_page</span>
|
@@ -1635,6 +1678,73 @@
|
|
1635
1678
|
</td>
|
1636
1679
|
</tr>
|
1637
1680
|
</table>
|
1681
|
+
</div>
|
1682
|
+
|
1683
|
+
<div class="method_details ">
|
1684
|
+
<h3 class="signature " id="on-instance_method">
|
1685
|
+
|
1686
|
+
#<strong>on</strong>(event_name, &block) ⇒ <tt>Object</tt>
|
1687
|
+
|
1688
|
+
|
1689
|
+
|
1690
|
+
|
1691
|
+
|
1692
|
+
</h3><div class="docstring">
|
1693
|
+
<div class="discussion">
|
1694
|
+
|
1695
|
+
|
1696
|
+
</div>
|
1697
|
+
</div>
|
1698
|
+
<div class="tags">
|
1699
|
+
<p class="tag_title">Parameters:</p>
|
1700
|
+
<ul class="param">
|
1701
|
+
|
1702
|
+
<li>
|
1703
|
+
|
1704
|
+
<span class='name'>event_name</span>
|
1705
|
+
|
1706
|
+
|
1707
|
+
<span class='type'>(<tt>Symbol</tt>)</span>
|
1708
|
+
|
1709
|
+
|
1710
|
+
|
1711
|
+
—
|
1712
|
+
<div class='inline'>
|
1713
|
+
<p>either of :disconnected, :targetcreated, :targetchanged, :targetdestroyed</p>
|
1714
|
+
</div>
|
1715
|
+
|
1716
|
+
</li>
|
1717
|
+
|
1718
|
+
</ul>
|
1719
|
+
|
1720
|
+
|
1721
|
+
</div><table class="source_code">
|
1722
|
+
<tr>
|
1723
|
+
<td>
|
1724
|
+
<pre class="lines">
|
1725
|
+
|
1726
|
+
|
1727
|
+
65
|
1728
|
+
66
|
1729
|
+
67
|
1730
|
+
68
|
1731
|
+
69
|
1732
|
+
70
|
1733
|
+
71</pre>
|
1734
|
+
</td>
|
1735
|
+
<td>
|
1736
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 65</span>
|
1737
|
+
|
1738
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_on'>on</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1739
|
+
<span class='kw'>unless</span> <span class='const'><span class='object_link'><a href="#EVENT_MAPPINGS-constant" title="Puppeteer::Browser::EVENT_MAPPINGS (constant)">EVENT_MAPPINGS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_has_key?'>has_key?</span><span class='lparen'>(</span><span class='id identifier rubyid_event_name'>event_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rparen'>)</span>
|
1740
|
+
<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'>Unknown event name: </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_event_name'>event_name</span><span class='embexpr_end'>}</span><span class='tstring_content'>. Known events are </span><span class='embexpr_beg'>#{</span><span class='const'><span class='object_link'><a href="#EVENT_MAPPINGS-constant" title="Puppeteer::Browser::EVENT_MAPPINGS (constant)">EVENT_MAPPINGS</a></span></span><span class='period'>.</span><span class='id identifier rubyid_keys'>keys</span><span class='period'>.</span><span class='id identifier rubyid_join'>join</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>, </span><span class='tstring_end'>"</span></span><span class='rparen'>)</span><span class='embexpr_end'>}</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
1741
|
+
<span class='kw'>end</span>
|
1742
|
+
|
1743
|
+
<span class='id identifier rubyid_add_event_listener'>add_event_listener</span><span class='lparen'>(</span><span class='const'><span class='object_link'><a href="#EVENT_MAPPINGS-constant" title="Puppeteer::Browser::EVENT_MAPPINGS (constant)">EVENT_MAPPINGS</a></span></span><span class='lbracket'>[</span><span class='id identifier rubyid_event_name'>event_name</span><span class='period'>.</span><span class='id identifier rubyid_to_sym'>to_sym</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='op'>&</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
|
1744
|
+
<span class='kw'>end</span></pre>
|
1745
|
+
</td>
|
1746
|
+
</tr>
|
1747
|
+
</table>
|
1638
1748
|
</div>
|
1639
1749
|
|
1640
1750
|
<div class="method_details ">
|
@@ -1674,12 +1784,12 @@
|
|
1674
1784
|
<pre class="lines">
|
1675
1785
|
|
1676
1786
|
|
1677
|
-
|
1678
|
-
|
1679
|
-
|
1787
|
+
245
|
1788
|
+
246
|
1789
|
+
247</pre>
|
1680
1790
|
</td>
|
1681
1791
|
<td>
|
1682
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1792
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 245</span>
|
1683
1793
|
|
1684
1794
|
<span class='kw'>def</span> <span class='id identifier rubyid_pages'>pages</span>
|
1685
1795
|
<span class='id identifier rubyid_browser_contexts'>browser_contexts</span><span class='period'>.</span><span class='id identifier rubyid_flat_map'>flat_map</span><span class='lparen'>(</span><span class='op'>&</span><span class='symbol'>:pages</span><span class='rparen'>)</span>
|
@@ -1726,12 +1836,12 @@
|
|
1726
1836
|
<pre class="lines">
|
1727
1837
|
|
1728
1838
|
|
1729
|
-
|
1730
|
-
|
1731
|
-
|
1839
|
+
74
|
1840
|
+
75
|
1841
|
+
76</pre>
|
1732
1842
|
</td>
|
1733
1843
|
<td>
|
1734
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1844
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 74</span>
|
1735
1845
|
|
1736
1846
|
<span class='kw'>def</span> <span class='id identifier rubyid_process'>process</span>
|
1737
1847
|
<span class='ivar'>@process</span>
|
@@ -1778,12 +1888,12 @@
|
|
1778
1888
|
<pre class="lines">
|
1779
1889
|
|
1780
1890
|
|
1781
|
-
|
1782
|
-
|
1783
|
-
|
1891
|
+
206
|
1892
|
+
207
|
1893
|
+
208</pre>
|
1784
1894
|
</td>
|
1785
1895
|
<td>
|
1786
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1896
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 206</span>
|
1787
1897
|
|
1788
1898
|
<span class='kw'>def</span> <span class='id identifier rubyid_target'>target</span>
|
1789
1899
|
<span class='id identifier rubyid_targets'>targets</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_target'>target</span><span class='op'>|</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_type'>type</span> <span class='op'>==</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>browser</span><span class='tstring_end'>'</span></span> <span class='rbrace'>}</span>
|
@@ -1830,12 +1940,12 @@
|
|
1830
1940
|
<pre class="lines">
|
1831
1941
|
|
1832
1942
|
|
1833
|
-
|
1834
|
-
|
1835
|
-
|
1943
|
+
200
|
1944
|
+
201
|
1945
|
+
202</pre>
|
1836
1946
|
</td>
|
1837
1947
|
<td>
|
1838
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
1948
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 200</span>
|
1839
1949
|
|
1840
1950
|
<span class='kw'>def</span> <span class='id identifier rubyid_targets'>targets</span>
|
1841
1951
|
<span class='ivar'>@targets</span><span class='period'>.</span><span class='id identifier rubyid_values'>values</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_target'>target</span><span class='op'>|</span> <span class='id identifier rubyid_target'>target</span><span class='period'>.</span><span class='id identifier rubyid_initialized?'>initialized?</span> <span class='rbrace'>}</span>
|
@@ -1882,12 +1992,12 @@
|
|
1882
1992
|
<pre class="lines">
|
1883
1993
|
|
1884
1994
|
|
1885
|
-
|
1886
|
-
|
1887
|
-
|
1995
|
+
255
|
1996
|
+
256
|
1997
|
+
257</pre>
|
1888
1998
|
</td>
|
1889
1999
|
<td>
|
1890
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
2000
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 255</span>
|
1891
2001
|
|
1892
2002
|
<span class='kw'>def</span> <span class='id identifier rubyid_user_agent'>user_agent</span>
|
1893
2003
|
<span class='id identifier rubyid_get_version'>get_version</span><span class='period'>.</span><span class='id identifier rubyid_user_agent'>user_agent</span>
|
@@ -1934,12 +2044,12 @@
|
|
1934
2044
|
<pre class="lines">
|
1935
2045
|
|
1936
2046
|
|
1937
|
-
|
1938
|
-
|
1939
|
-
|
2047
|
+
250
|
2048
|
+
251
|
2049
|
+
252</pre>
|
1940
2050
|
</td>
|
1941
2051
|
<td>
|
1942
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
2052
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 250</span>
|
1943
2053
|
|
1944
2054
|
<span class='kw'>def</span> <span class='id identifier rubyid_version'>version</span>
|
1945
2055
|
<span class='id identifier rubyid_get_version'>get_version</span><span class='period'>.</span><span class='id identifier rubyid_product'>product</span>
|
@@ -2012,22 +2122,6 @@
|
|
2012
2122
|
<pre class="lines">
|
2013
2123
|
|
2014
2124
|
|
2015
|
-
197
|
2016
|
-
198
|
2017
|
-
199
|
2018
|
-
200
|
2019
|
-
201
|
2020
|
-
202
|
2021
|
-
203
|
2022
|
-
204
|
2023
|
-
205
|
2024
|
-
206
|
2025
|
-
207
|
2026
|
-
208
|
2027
|
-
209
|
2028
|
-
210
|
2029
|
-
211
|
2030
|
-
212
|
2031
2125
|
213
|
2032
2126
|
214
|
2033
2127
|
215
|
@@ -2041,10 +2135,26 @@
|
|
2041
2135
|
223
|
2042
2136
|
224
|
2043
2137
|
225
|
2044
|
-
226
|
2138
|
+
226
|
2139
|
+
227
|
2140
|
+
228
|
2141
|
+
229
|
2142
|
+
230
|
2143
|
+
231
|
2144
|
+
232
|
2145
|
+
233
|
2146
|
+
234
|
2147
|
+
235
|
2148
|
+
236
|
2149
|
+
237
|
2150
|
+
238
|
2151
|
+
239
|
2152
|
+
240
|
2153
|
+
241
|
2154
|
+
242</pre>
|
2045
2155
|
</td>
|
2046
2156
|
<td>
|
2047
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
2157
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 213</span>
|
2048
2158
|
|
2049
2159
|
<span class='kw'>def</span> <span class='id identifier rubyid_wait_for_target'>wait_for_target</span><span class='lparen'>(</span><span class='label'>predicate:</span><span class='comma'>,</span> <span class='label'>timeout:</span> <span class='kw'>nil</span><span class='rparen'>)</span>
|
2050
2160
|
<span class='id identifier rubyid_timeout_in_sec'>timeout_in_sec</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id identifier rubyid_timeout'>timeout</span> <span class='op'>||</span> <span class='int'>30000</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_to_i'>to_i</span> <span class='op'>/</span> <span class='float'>1000.0</span>
|
@@ -2118,12 +2228,12 @@
|
|
2118
2228
|
<pre class="lines">
|
2119
2229
|
|
2120
2230
|
|
2121
|
-
|
2122
|
-
|
2123
|
-
|
2231
|
+
177
|
2232
|
+
178
|
2233
|
+
179</pre>
|
2124
2234
|
</td>
|
2125
2235
|
<td>
|
2126
|
-
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line
|
2236
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/browser.rb', line 177</span>
|
2127
2237
|
|
2128
2238
|
<span class='kw'>def</span> <span class='id identifier rubyid_websocket_endpoint'>websocket_endpoint</span>
|
2129
2239
|
<span class='ivar'>@connection</span><span class='period'>.</span><span class='id identifier rubyid_url'>url</span>
|
@@ -2138,7 +2248,7 @@
|
|
2138
2248
|
</div>
|
2139
2249
|
|
2140
2250
|
<div id="footer">
|
2141
|
-
Generated on
|
2251
|
+
Generated on Sat Jun 20 17:15:06 2020 by
|
2142
2252
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
2143
2253
|
0.9.24 (ruby-2.6.3).
|
2144
2254
|
</div>
|