puppeteer-ruby 0.0.3 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +30 -0
  3. data/.github/stale.yml +16 -0
  4. data/.rubocop.yml +4 -5
  5. data/README.md +4 -1
  6. data/docs/Puppeteer.html +2020 -0
  7. data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
  8. data/docs/Puppeteer/Browser.html +2148 -0
  9. data/docs/Puppeteer/BrowserContext.html +809 -0
  10. data/docs/Puppeteer/BrowserFetcher.html +214 -0
  11. data/docs/Puppeteer/BrowserRunner.html +914 -0
  12. data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
  13. data/docs/Puppeteer/CDPSession.html +813 -0
  14. data/docs/Puppeteer/CDPSession/Error.html +124 -0
  15. data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
  16. data/docs/Puppeteer/Connection.html +960 -0
  17. data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
  18. data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
  19. data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
  20. data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
  21. data/docs/Puppeteer/ConsoleMessage.html +565 -0
  22. data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
  23. data/docs/Puppeteer/DOMWorld.html +2219 -0
  24. data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
  25. data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
  26. data/docs/Puppeteer/DebugPrint.html +233 -0
  27. data/docs/Puppeteer/Device.html +470 -0
  28. data/docs/Puppeteer/Devices.html +139 -0
  29. data/docs/Puppeteer/ElementHandle.html +2224 -0
  30. data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
  31. data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
  32. data/docs/Puppeteer/ElementHandle/Point.html +481 -0
  33. data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
  34. data/docs/Puppeteer/EmulationManager.html +454 -0
  35. data/docs/Puppeteer/EventCallbackable.html +433 -0
  36. data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
  37. data/docs/Puppeteer/ExecutionContext.html +998 -0
  38. data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
  39. data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
  40. data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
  41. data/docs/Puppeteer/FileChooser.html +455 -0
  42. data/docs/Puppeteer/Frame.html +3677 -0
  43. data/docs/Puppeteer/FrameManager.html +2410 -0
  44. data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
  45. data/docs/Puppeteer/IfPresent.html +222 -0
  46. data/docs/Puppeteer/JSHandle.html +1352 -0
  47. data/docs/Puppeteer/Keyboard.html +1557 -0
  48. data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
  49. data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
  50. data/docs/Puppeteer/Launcher.html +237 -0
  51. data/docs/Puppeteer/Launcher/Base.html +385 -0
  52. data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
  53. data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
  54. data/docs/Puppeteer/Launcher/Chrome.html +669 -0
  55. data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
  56. data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
  57. data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
  58. data/docs/Puppeteer/LifecycleWatcher.html +834 -0
  59. data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
  60. data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
  61. data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
  62. data/docs/Puppeteer/Mouse.html +1105 -0
  63. data/docs/Puppeteer/Mouse/Button.html +136 -0
  64. data/docs/Puppeteer/NetworkManager.html +901 -0
  65. data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
  66. data/docs/Puppeteer/Page.html +5970 -0
  67. data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
  68. data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
  69. data/docs/Puppeteer/Page/ScriptTag.html +555 -0
  70. data/docs/Puppeteer/Page/StyleTag.html +448 -0
  71. data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
  72. data/docs/Puppeteer/RemoteObject.html +1016 -0
  73. data/docs/Puppeteer/Target.html +1314 -0
  74. data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
  75. data/docs/Puppeteer/Target/TargetInfo.html +729 -0
  76. data/docs/Puppeteer/TimeoutError.html +135 -0
  77. data/docs/Puppeteer/TimeoutSettings.html +496 -0
  78. data/docs/Puppeteer/TouchScreen.html +464 -0
  79. data/docs/Puppeteer/Viewport.html +757 -0
  80. data/docs/Puppeteer/WaitTask.html +637 -0
  81. data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
  82. data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
  83. data/docs/Puppeteer/WebSocket.html +673 -0
  84. data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
  85. data/docs/Puppeteer/WebSocketTransport.html +600 -0
  86. data/docs/Puppeteer/WebSocktTransportError.html +124 -0
  87. data/docs/_index.html +809 -0
  88. data/docs/class_list.html +51 -0
  89. data/docs/css/common.css +1 -0
  90. data/docs/css/full_list.css +58 -0
  91. data/docs/css/style.css +496 -0
  92. data/docs/file.README.html +123 -0
  93. data/docs/file_list.html +56 -0
  94. data/docs/frames.html +17 -0
  95. data/docs/index.html +123 -0
  96. data/docs/js/app.js +314 -0
  97. data/docs/js/full_list.js +216 -0
  98. data/docs/js/jquery.js +4 -0
  99. data/docs/method_list.html +3971 -0
  100. data/docs/top-level-namespace.html +126 -0
  101. data/lib/puppeteer.rb +16 -8
  102. data/lib/puppeteer/async_await_behavior.rb +6 -0
  103. data/lib/puppeteer/browser.rb +24 -5
  104. data/lib/puppeteer/browser_runner.rb +1 -1
  105. data/lib/puppeteer/cdp_session.rb +33 -11
  106. data/lib/puppeteer/connection.rb +1 -1
  107. data/lib/puppeteer/dom_world.rb +142 -121
  108. data/lib/puppeteer/element_handle.rb +223 -181
  109. data/lib/puppeteer/execution_context.rb +41 -17
  110. data/lib/puppeteer/file_chooser.rb +29 -0
  111. data/lib/puppeteer/frame.rb +23 -15
  112. data/lib/puppeteer/frame_manager.rb +7 -9
  113. data/lib/puppeteer/js_handle.rb +3 -3
  114. data/lib/puppeteer/keyboard.rb +1 -1
  115. data/lib/puppeteer/keyboard/us_keyboard_layout.rb +4 -4
  116. data/lib/puppeteer/launcher.rb +0 -1
  117. data/lib/puppeteer/launcher/chrome.rb +48 -2
  118. data/lib/puppeteer/lifecycle_watcher.rb +9 -4
  119. data/lib/puppeteer/mouse.rb +10 -7
  120. data/lib/puppeteer/page.rb +134 -70
  121. data/lib/puppeteer/remote_object.rb +11 -1
  122. data/lib/puppeteer/target.rb +16 -13
  123. data/lib/puppeteer/version.rb +1 -1
  124. data/lib/puppeteer/wait_task.rb +183 -1
  125. data/puppeteer-ruby.gemspec +4 -1
  126. metadata +143 -4
@@ -0,0 +1,124 @@
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::WaitTask::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::WaitTask::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="../WaitTask.html" title="Puppeteer::WaitTask (class)">WaitTask</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::WaitTask::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::WaitTask::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/wait_task.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 9 00:13:40 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>
@@ -0,0 +1,206 @@
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::WaitTask::TimeoutError
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::WaitTask::TimeoutError";
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="../WaitTask.html" title="Puppeteer::WaitTask (class)">WaitTask</a></span></span>
41
+ &raquo;
42
+ <span class="title">TimeoutError</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::WaitTask::TimeoutError
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::WaitTask::TimeoutError</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/wait_task.rb</dd>
100
+ </dl>
101
+
102
+ </div>
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+ <h2>
113
+ Instance Method Summary
114
+ <small><a href="#" class="summary_toggle">collapse</a></small>
115
+ </h2>
116
+
117
+ <ul class="summary">
118
+
119
+ <li class="public ">
120
+ <span class="summary_signature">
121
+
122
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(title:, timeout:) &#x21d2; TimeoutError </a>
123
+
124
+
125
+
126
+ </span>
127
+
128
+
129
+ <span class="note title constructor">constructor</span>
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+ <span class="summary_desc"><div class='inline'>
139
+ <p>A new instance of TimeoutError.</p>
140
+ </div></span>
141
+
142
+ </li>
143
+
144
+
145
+ </ul>
146
+
147
+
148
+
149
+ <div id="constructor_details" class="method_details_list">
150
+ <h2>Constructor Details</h2>
151
+
152
+ <div class="method_details first">
153
+ <h3 class="signature first" id="initialize-instance_method">
154
+
155
+ #<strong>initialize</strong>(title:, timeout:) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::WaitTask::TimeoutError (class)">TimeoutError</a></span></tt>
156
+
157
+
158
+
159
+
160
+
161
+ </h3><div class="docstring">
162
+ <div class="discussion">
163
+
164
+ <p>Returns a new instance of TimeoutError.</p>
165
+
166
+
167
+ </div>
168
+ </div>
169
+ <div class="tags">
170
+
171
+
172
+ </div><table class="source_code">
173
+ <tr>
174
+ <td>
175
+ <pre class="lines">
176
+
177
+
178
+ 7
179
+ 8
180
+ 9</pre>
181
+ </td>
182
+ <td>
183
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/wait_task.rb', line 7</span>
184
+
185
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>title:</span><span class='comma'>,</span> <span class='label'>timeout:</span><span class='rparen'>)</span>
186
+ <span class='kw'>super</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>waiting for </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_title'>title</span><span class='embexpr_end'>}</span><span class='tstring_content'> failed: timeout </span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_timeout'>timeout</span><span class='embexpr_end'>}</span><span class='tstring_content'>ms exceeded</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
187
+ <span class='kw'>end</span></pre>
188
+ </td>
189
+ </tr>
190
+ </table>
191
+ </div>
192
+
193
+ </div>
194
+
195
+
196
+ </div>
197
+
198
+ <div id="footer">
199
+ Generated on Tue Jun 9 00:13:40 2020 by
200
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
201
+ 0.9.24 (ruby-2.6.3).
202
+ </div>
203
+
204
+ </div>
205
+ </body>
206
+ </html>
@@ -0,0 +1,673 @@
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::WebSocket
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::WebSocket";
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 (W)</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">WebSocket</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::WebSocket
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::WebSocket</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/web_socket.rb</dd>
98
+ </dl>
99
+
100
+ </div>
101
+
102
+ <h2>Overview</h2><div class="docstring">
103
+ <div class="discussion">
104
+
105
+ <p>ref: <a href="https://github.com/rails/rails/blob/master/actioncable/lib/action_cable/connection/client_socket.rb">github.com/rails/rails/blob/master/actioncable/lib/action_cable/connection/client_socket.rb</a> ref: <a href="https://github.com/cavalle/chrome_remote/blob/master/lib/chrome_remote/web_socket_client.rb">github.com/cavalle/chrome_remote/blob/master/lib/chrome_remote/web_socket_client.rb</a></p>
106
+
107
+
108
+ </div>
109
+ </div>
110
+ <div class="tags">
111
+
112
+
113
+ </div><h2>Defined Under Namespace</h2>
114
+ <p class="children">
115
+
116
+
117
+
118
+
119
+ <strong class="classes">Classes:</strong> <span class='object_link'><a href="WebSocket/DriverImpl.html" title="Puppeteer::WebSocket::DriverImpl (class)">DriverImpl</a></span>
120
+
121
+
122
+ </p>
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="STATE_CONNECTING-constant" class="">STATE_CONNECTING =
133
+
134
+ </dt>
135
+ <dd><pre class="code"><span class='int'>0</span></pre></dd>
136
+
137
+ <dt id="STATE_OPENED-constant" class="">STATE_OPENED =
138
+
139
+ </dt>
140
+ <dd><pre class="code"><span class='int'>1</span></pre></dd>
141
+
142
+ <dt id="STATE_CLOSING-constant" class="">STATE_CLOSING =
143
+
144
+ </dt>
145
+ <dd><pre class="code"><span class='int'>2</span></pre></dd>
146
+
147
+ <dt id="STATE_CLOSED-constant" class="">STATE_CLOSED =
148
+
149
+ </dt>
150
+ <dd><pre class="code"><span class='int'>3</span></pre></dd>
151
+
152
+ </dl>
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ <h2>
163
+ Instance Method Summary
164
+ <small><a href="#" class="summary_toggle">collapse</a></small>
165
+ </h2>
166
+
167
+ <ul class="summary">
168
+
169
+ <li class="public ">
170
+ <span class="summary_signature">
171
+
172
+ <a href="#close-instance_method" title="#close (instance method)">#<strong>close</strong>(code: 1000, reason: &quot;&quot;) &#x21d2; Object </a>
173
+
174
+
175
+
176
+ </span>
177
+
178
+
179
+
180
+
181
+
182
+
183
+
184
+
185
+
186
+ <span class="summary_desc"><div class='inline'></div></span>
187
+
188
+ </li>
189
+
190
+
191
+ <li class="public ">
192
+ <span class="summary_signature">
193
+
194
+ <a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(url:, max_payload_size:) &#x21d2; WebSocket </a>
195
+
196
+
197
+
198
+ </span>
199
+
200
+
201
+ <span class="note title constructor">constructor</span>
202
+
203
+
204
+
205
+
206
+
207
+
208
+
209
+
210
+ <span class="summary_desc"><div class='inline'>
211
+ <p>A new instance of WebSocket.</p>
212
+ </div></span>
213
+
214
+ </li>
215
+
216
+
217
+ <li class="public ">
218
+ <span class="summary_signature">
219
+
220
+ <a href="#on_close-instance_method" title="#on_close (instance method)">#<strong>on_close</strong>(&amp;block) &#x21d2; Object </a>
221
+
222
+
223
+
224
+ </span>
225
+
226
+
227
+
228
+
229
+
230
+
231
+
232
+
233
+
234
+ <span class="summary_desc"><div class='inline'></div></span>
235
+
236
+ </li>
237
+
238
+
239
+ <li class="public ">
240
+ <span class="summary_signature">
241
+
242
+ <a href="#on_error-instance_method" title="#on_error (instance method)">#<strong>on_error</strong>(&amp;block) &#x21d2; Object </a>
243
+
244
+
245
+
246
+ </span>
247
+
248
+
249
+
250
+
251
+
252
+
253
+
254
+
255
+
256
+ <span class="summary_desc"><div class='inline'></div></span>
257
+
258
+ </li>
259
+
260
+
261
+ <li class="public ">
262
+ <span class="summary_signature">
263
+
264
+ <a href="#on_message-instance_method" title="#on_message (instance method)">#<strong>on_message</strong>(&amp;block) &#x21d2; Object </a>
265
+
266
+
267
+
268
+ </span>
269
+
270
+
271
+
272
+
273
+
274
+
275
+
276
+
277
+
278
+ <span class="summary_desc"><div class='inline'></div></span>
279
+
280
+ </li>
281
+
282
+
283
+ <li class="public ">
284
+ <span class="summary_signature">
285
+
286
+ <a href="#on_open-instance_method" title="#on_open (instance method)">#<strong>on_open</strong>(&amp;block) &#x21d2; Object </a>
287
+
288
+
289
+
290
+ </span>
291
+
292
+
293
+
294
+
295
+
296
+
297
+
298
+
299
+
300
+ <span class="summary_desc"><div class='inline'></div></span>
301
+
302
+ </li>
303
+
304
+
305
+ <li class="public ">
306
+ <span class="summary_signature">
307
+
308
+ <a href="#send_text-instance_method" title="#send_text (instance method)">#<strong>send_text</strong>(message) &#x21d2; Object </a>
309
+
310
+
311
+
312
+ </span>
313
+
314
+
315
+
316
+
317
+
318
+
319
+
320
+
321
+
322
+ <span class="summary_desc"><div class='inline'></div></span>
323
+
324
+ </li>
325
+
326
+
327
+ </ul>
328
+
329
+
330
+ <div id="constructor_details" class="method_details_list">
331
+ <h2>Constructor Details</h2>
332
+
333
+ <div class="method_details first">
334
+ <h3 class="signature first" id="initialize-instance_method">
335
+
336
+ #<strong>initialize</strong>(url:, max_payload_size:) &#x21d2; <tt><span class='object_link'><a href="" title="Puppeteer::WebSocket (class)">WebSocket</a></span></tt>
337
+
338
+
339
+
340
+
341
+
342
+ </h3><div class="docstring">
343
+ <div class="discussion">
344
+
345
+ <p>Returns a new instance of WebSocket.</p>
346
+
347
+
348
+ </div>
349
+ </div>
350
+ <div class="tags">
351
+
352
+
353
+ </div><table class="source_code">
354
+ <tr>
355
+ <td>
356
+ <pre class="lines">
357
+
358
+
359
+ 31
360
+ 32
361
+ 33
362
+ 34
363
+ 35
364
+ 36
365
+ 37
366
+ 38
367
+ 39
368
+ 40
369
+ 41
370
+ 42
371
+ 43
372
+ 44</pre>
373
+ </td>
374
+ <td>
375
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 31</span>
376
+
377
+ <span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='label'>url:</span><span class='comma'>,</span> <span class='label'>max_payload_size:</span><span class='rparen'>)</span>
378
+ <span class='ivar'>@impl</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="WebSocket/DriverImpl.html" title="Puppeteer::WebSocket::DriverImpl (class)">DriverImpl</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="WebSocket/DriverImpl.html#initialize-instance_method" title="Puppeteer::WebSocket::DriverImpl#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='id identifier rubyid_url'>url</span><span class='rparen'>)</span>
379
+ <span class='ivar'>@driver</span> <span class='op'>=</span> <span class='op'>::</span><span class='const'>WebSocket</span><span class='op'>::</span><span class='const'>Driver</span><span class='period'>.</span><span class='id identifier rubyid_client'>client</span><span class='lparen'>(</span><span class='ivar'>@impl</span><span class='comma'>,</span> <span class='label'>max_length:</span> <span class='id identifier rubyid_max_payload_size'>max_payload_size</span><span class='rparen'>)</span>
380
+
381
+ <span class='id identifier rubyid_setup'>setup</span>
382
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_start'>start</span>
383
+
384
+ <span class='const'>Thread</span><span class='period'>.</span><span class='id identifier rubyid_new'>new</span> <span class='kw'>do</span>
385
+ <span class='id identifier rubyid_wait_for_data'>wait_for_data</span> <span class='kw'>until</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
386
+ <span class='kw'>rescue</span> <span class='const'>EOFError</span>
387
+ <span class='comment'># Google Chrome was gone.
388
+ </span> <span class='comment'># We have nothing todo. Just finish polling.
389
+ </span> <span class='kw'>end</span>
390
+ <span class='kw'>end</span></pre>
391
+ </td>
392
+ </tr>
393
+ </table>
394
+ </div>
395
+
396
+ </div>
397
+
398
+
399
+ <div id="instance_method_details" class="method_details_list">
400
+ <h2>Instance Method Details</h2>
401
+
402
+
403
+ <div class="method_details first">
404
+ <h3 class="signature first" id="close-instance_method">
405
+
406
+ #<strong>close</strong>(code: 1000, reason: &quot;&quot;) &#x21d2; <tt>Object</tt>
407
+
408
+
409
+
410
+
411
+
412
+ </h3><table class="source_code">
413
+ <tr>
414
+ <td>
415
+ <pre class="lines">
416
+
417
+
418
+ 76
419
+ 77
420
+ 78
421
+ 79
422
+ 80</pre>
423
+ </td>
424
+ <td>
425
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 76</span>
426
+
427
+ <span class='kw'>def</span> <span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='label'>code:</span> <span class='int'>1000</span><span class='comma'>,</span> <span class='label'>reason:</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
428
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
429
+ <span class='ivar'>@ready_state</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
430
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_close'>close</span><span class='lparen'>(</span><span class='id identifier rubyid_reason'>reason</span><span class='comma'>,</span> <span class='id identifier rubyid_code'>code</span><span class='rparen'>)</span>
431
+ <span class='kw'>end</span></pre>
432
+ </td>
433
+ </tr>
434
+ </table>
435
+ </div>
436
+
437
+ <div class="method_details ">
438
+ <h3 class="signature " id="on_close-instance_method">
439
+
440
+ #<strong>on_close</strong>(&amp;block) &#x21d2; <tt>Object</tt>
441
+
442
+
443
+
444
+
445
+
446
+ </h3><div class="docstring">
447
+ <div class="discussion">
448
+
449
+
450
+ </div>
451
+ </div>
452
+ <div class="tags">
453
+ <p class="tag_title">Parameters:</p>
454
+ <ul class="param">
455
+
456
+ <li>
457
+
458
+ <span class='name'>block</span>
459
+
460
+
461
+ <span class='type'>(<tt>Proc(reason: String, code: Numeric)</tt>)</span>
462
+
463
+
464
+
465
+ </li>
466
+
467
+ </ul>
468
+
469
+
470
+ </div><table class="source_code">
471
+ <tr>
472
+ <td>
473
+ <pre class="lines">
474
+
475
+
476
+ 87
477
+ 88
478
+ 89</pre>
479
+ </td>
480
+ <td>
481
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 87</span>
482
+
483
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_close'>on_close</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
484
+ <span class='ivar'>@on_close</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
485
+ <span class='kw'>end</span></pre>
486
+ </td>
487
+ </tr>
488
+ </table>
489
+ </div>
490
+
491
+ <div class="method_details ">
492
+ <h3 class="signature " id="on_error-instance_method">
493
+
494
+ #<strong>on_error</strong>(&amp;block) &#x21d2; <tt>Object</tt>
495
+
496
+
497
+
498
+
499
+
500
+ </h3><div class="docstring">
501
+ <div class="discussion">
502
+
503
+
504
+ </div>
505
+ </div>
506
+ <div class="tags">
507
+ <p class="tag_title">Parameters:</p>
508
+ <ul class="param">
509
+
510
+ <li>
511
+
512
+ <span class='name'>block</span>
513
+
514
+
515
+ <span class='type'>(<tt>Proc(error_message: String)</tt>)</span>
516
+
517
+
518
+
519
+ </li>
520
+
521
+ </ul>
522
+
523
+
524
+ </div><table class="source_code">
525
+ <tr>
526
+ <td>
527
+ <pre class="lines">
528
+
529
+
530
+ 92
531
+ 93
532
+ 94</pre>
533
+ </td>
534
+ <td>
535
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 92</span>
536
+
537
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_error'>on_error</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
538
+ <span class='ivar'>@on_error</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
539
+ <span class='kw'>end</span></pre>
540
+ </td>
541
+ </tr>
542
+ </table>
543
+ </div>
544
+
545
+ <div class="method_details ">
546
+ <h3 class="signature " id="on_message-instance_method">
547
+
548
+ #<strong>on_message</strong>(&amp;block) &#x21d2; <tt>Object</tt>
549
+
550
+
551
+
552
+
553
+
554
+ </h3><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/web_socket.rb', line 96</span>
566
+
567
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_message'>on_message</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
568
+ <span class='ivar'>@on_message</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</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="on_open-instance_method">
577
+
578
+ #<strong>on_open</strong>(&amp;block) &#x21d2; <tt>Object</tt>
579
+
580
+
581
+
582
+
583
+
584
+ </h3><table class="source_code">
585
+ <tr>
586
+ <td>
587
+ <pre class="lines">
588
+
589
+
590
+ 82
591
+ 83
592
+ 84</pre>
593
+ </td>
594
+ <td>
595
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 82</span>
596
+
597
+ <span class='kw'>def</span> <span class='id identifier rubyid_on_open'>on_open</span><span class='lparen'>(</span><span class='op'>&amp;</span><span class='id identifier rubyid_block'>block</span><span class='rparen'>)</span>
598
+ <span class='ivar'>@on_open</span> <span class='op'>=</span> <span class='id identifier rubyid_block'>block</span>
599
+ <span class='kw'>end</span></pre>
600
+ </td>
601
+ </tr>
602
+ </table>
603
+ </div>
604
+
605
+ <div class="method_details ">
606
+ <h3 class="signature " id="send_text-instance_method">
607
+
608
+ #<strong>send_text</strong>(message) &#x21d2; <tt>Object</tt>
609
+
610
+
611
+
612
+
613
+
614
+ </h3><div class="docstring">
615
+ <div class="discussion">
616
+
617
+
618
+ </div>
619
+ </div>
620
+ <div class="tags">
621
+ <p class="tag_title">Parameters:</p>
622
+ <ul class="param">
623
+
624
+ <li>
625
+
626
+ <span class='name'>message</span>
627
+
628
+
629
+ <span class='type'>(<tt>String</tt>)</span>
630
+
631
+
632
+
633
+ </li>
634
+
635
+ </ul>
636
+
637
+
638
+ </div><table class="source_code">
639
+ <tr>
640
+ <td>
641
+ <pre class="lines">
642
+
643
+
644
+ 71
645
+ 72
646
+ 73
647
+ 74</pre>
648
+ </td>
649
+ <td>
650
+ <pre class="code"><span class="info file"># File 'lib/puppeteer/web_socket.rb', line 71</span>
651
+
652
+ <span class='kw'>def</span> <span class='id identifier rubyid_send_text'>send_text</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
653
+ <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@ready_state</span> <span class='op'>&gt;=</span> <span class='const'><span class='object_link'><a href="#STATE_CLOSING-constant" title="Puppeteer::WebSocket::STATE_CLOSING (constant)">STATE_CLOSING</a></span></span>
654
+ <span class='ivar'>@driver</span><span class='period'>.</span><span class='id identifier rubyid_text'>text</span><span class='lparen'>(</span><span class='id identifier rubyid_message'>message</span><span class='rparen'>)</span>
655
+ <span class='kw'>end</span></pre>
656
+ </td>
657
+ </tr>
658
+ </table>
659
+ </div>
660
+
661
+ </div>
662
+
663
+ </div>
664
+
665
+ <div id="footer">
666
+ Generated on Tue Jun 9 00:13:40 2020 by
667
+ <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
668
+ 0.9.24 (ruby-2.6.3).
669
+ </div>
670
+
671
+ </div>
672
+ </body>
673
+ </html>