puppeteer-ruby 0.0.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.circleci/config.yml +71 -0
- data/.github/stale.yml +16 -0
- data/.gitignore +19 -0
- data/.rspec +3 -0
- data/.rubocop.yml +302 -0
- data/.travis.yml +7 -0
- data/Dockerfile +6 -0
- data/Gemfile +6 -0
- data/README.md +54 -0
- data/Rakefile +1 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +15 -0
- data/docs/Puppeteer.html +2020 -0
- data/docs/Puppeteer/AsyncAwaitBehavior.html +105 -0
- data/docs/Puppeteer/Browser.html +2148 -0
- data/docs/Puppeteer/BrowserContext.html +809 -0
- data/docs/Puppeteer/BrowserFetcher.html +214 -0
- data/docs/Puppeteer/BrowserRunner.html +914 -0
- data/docs/Puppeteer/BrowserRunner/BrowserProcess.html +477 -0
- data/docs/Puppeteer/CDPSession.html +813 -0
- data/docs/Puppeteer/CDPSession/Error.html +124 -0
- data/docs/Puppeteer/ConcurrentRubyUtils.html +430 -0
- data/docs/Puppeteer/Connection.html +960 -0
- data/docs/Puppeteer/Connection/MessageCallback.html +434 -0
- data/docs/Puppeteer/Connection/ProtocolError.html +216 -0
- data/docs/Puppeteer/Connection/RequestDebugPrinter.html +217 -0
- data/docs/Puppeteer/Connection/ResponseDebugPrinter.html +244 -0
- data/docs/Puppeteer/ConsoleMessage.html +565 -0
- data/docs/Puppeteer/ConsoleMessage/Location.html +433 -0
- data/docs/Puppeteer/DOMWorld.html +2219 -0
- data/docs/Puppeteer/DOMWorld/DetachedError.html +124 -0
- data/docs/Puppeteer/DOMWorld/DocumentEvaluationError.html +124 -0
- data/docs/Puppeteer/DebugPrint.html +233 -0
- data/docs/Puppeteer/Device.html +470 -0
- data/docs/Puppeteer/Devices.html +139 -0
- data/docs/Puppeteer/ElementHandle.html +2542 -0
- data/docs/Puppeteer/ElementHandle/ElementNotFoundError.html +206 -0
- data/docs/Puppeteer/ElementHandle/ElementNotVisibleError.html +206 -0
- data/docs/Puppeteer/ElementHandle/Point.html +492 -0
- data/docs/Puppeteer/ElementHandle/ScrollIntoViewError.html +124 -0
- data/docs/Puppeteer/EmulationManager.html +454 -0
- data/docs/Puppeteer/EventCallbackable.html +433 -0
- data/docs/Puppeteer/EventCallbackable/EventListeners.html +435 -0
- data/docs/Puppeteer/ExecutionContext.html +998 -0
- data/docs/Puppeteer/ExecutionContext/EvaluationError.html +124 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptExpression.html +357 -0
- data/docs/Puppeteer/ExecutionContext/JavaScriptFunction.html +389 -0
- data/docs/Puppeteer/FileChooser.html +455 -0
- data/docs/Puppeteer/Frame.html +3677 -0
- data/docs/Puppeteer/FrameManager.html +2410 -0
- data/docs/Puppeteer/FrameManager/NavigationError.html +124 -0
- data/docs/Puppeteer/IfPresent.html +222 -0
- data/docs/Puppeteer/JSHandle.html +1352 -0
- data/docs/Puppeteer/Keyboard.html +1557 -0
- data/docs/Puppeteer/Keyboard/KeyDefinition.html +831 -0
- data/docs/Puppeteer/Keyboard/KeyDescription.html +603 -0
- data/docs/Puppeteer/Launcher.html +237 -0
- data/docs/Puppeteer/Launcher/Base.html +385 -0
- data/docs/Puppeteer/Launcher/Base/ExecutablePathNotFound.html +124 -0
- data/docs/Puppeteer/Launcher/BrowserOptions.html +441 -0
- data/docs/Puppeteer/Launcher/Chrome.html +669 -0
- data/docs/Puppeteer/Launcher/Chrome/DefaultArgs.html +382 -0
- data/docs/Puppeteer/Launcher/ChromeArgOptions.html +531 -0
- data/docs/Puppeteer/Launcher/LaunchOptions.html +893 -0
- data/docs/Puppeteer/LifecycleWatcher.html +834 -0
- data/docs/Puppeteer/LifecycleWatcher/ExpectedLifecycle.html +363 -0
- data/docs/Puppeteer/LifecycleWatcher/FrameDetachedError.html +206 -0
- data/docs/Puppeteer/LifecycleWatcher/TerminatedError.html +124 -0
- data/docs/Puppeteer/Mouse.html +1105 -0
- data/docs/Puppeteer/Mouse/Button.html +136 -0
- data/docs/Puppeteer/NetworkManager.html +901 -0
- data/docs/Puppeteer/NetworkManager/Credentials.html +385 -0
- data/docs/Puppeteer/Page.html +5970 -0
- data/docs/Puppeteer/Page/FileChooserTimeoutError.html +206 -0
- data/docs/Puppeteer/Page/ScreenshotOptions.html +845 -0
- data/docs/Puppeteer/Page/ScriptTag.html +555 -0
- data/docs/Puppeteer/Page/StyleTag.html +448 -0
- data/docs/Puppeteer/Page/TargetCrashedError.html +124 -0
- data/docs/Puppeteer/RemoteObject.html +1087 -0
- data/docs/Puppeteer/Target.html +1336 -0
- data/docs/Puppeteer/Target/InitializeFailure.html +124 -0
- data/docs/Puppeteer/Target/TargetInfo.html +729 -0
- data/docs/Puppeteer/TimeoutError.html +135 -0
- data/docs/Puppeteer/TimeoutSettings.html +496 -0
- data/docs/Puppeteer/TouchScreen.html +464 -0
- data/docs/Puppeteer/Viewport.html +837 -0
- data/docs/Puppeteer/WaitTask.html +637 -0
- data/docs/Puppeteer/WaitTask/TerminatedError.html +124 -0
- data/docs/Puppeteer/WaitTask/TimeoutError.html +206 -0
- data/docs/Puppeteer/WebSocket.html +673 -0
- data/docs/Puppeteer/WebSocket/DriverImpl.html +412 -0
- data/docs/Puppeteer/WebSocketTransport.html +600 -0
- data/docs/Puppeteer/WebSocktTransportError.html +124 -0
- data/docs/_index.html +823 -0
- data/docs/class_list.html +51 -0
- data/docs/css/common.css +1 -0
- data/docs/css/full_list.css +58 -0
- data/docs/css/style.css +496 -0
- data/docs/file.README.html +123 -0
- data/docs/file_list.html +56 -0
- data/docs/frames.html +17 -0
- data/docs/index.html +123 -0
- data/docs/js/app.js +314 -0
- data/docs/js/full_list.js +216 -0
- data/docs/js/jquery.js +4 -0
- data/docs/method_list.html +4075 -0
- data/docs/top-level-namespace.html +126 -0
- data/lib/puppeteer.rb +200 -0
- data/lib/puppeteer/async_await_behavior.rb +38 -0
- data/lib/puppeteer/browser.rb +259 -0
- data/lib/puppeteer/browser_context.rb +90 -0
- data/lib/puppeteer/browser_fetcher.rb +6 -0
- data/lib/puppeteer/browser_runner.rb +161 -0
- data/lib/puppeteer/cdp_session.rb +100 -0
- data/lib/puppeteer/concurrent_ruby_utils.rb +37 -0
- data/lib/puppeteer/connection.rb +254 -0
- data/lib/puppeteer/console_message.rb +24 -0
- data/lib/puppeteer/debug_print.rb +20 -0
- data/lib/puppeteer/device.rb +12 -0
- data/lib/puppeteer/devices.rb +885 -0
- data/lib/puppeteer/dom_world.rb +484 -0
- data/lib/puppeteer/element_handle.rb +433 -0
- 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/emulation_manager.rb +46 -0
- data/lib/puppeteer/errors.rb +2 -0
- data/lib/puppeteer/event_callbackable.rb +88 -0
- data/lib/puppeteer/execution_context.rb +254 -0
- data/lib/puppeteer/file_chooser.rb +29 -0
- data/lib/puppeteer/frame.rb +286 -0
- data/lib/puppeteer/frame_manager.rb +378 -0
- data/lib/puppeteer/if_present.rb +18 -0
- data/lib/puppeteer/js_handle.rb +142 -0
- data/lib/puppeteer/keyboard.rb +183 -0
- data/lib/puppeteer/keyboard/key_description.rb +19 -0
- data/lib/puppeteer/keyboard/us_keyboard_layout.rb +283 -0
- data/lib/puppeteer/launcher.rb +25 -0
- data/lib/puppeteer/launcher/base.rb +48 -0
- data/lib/puppeteer/launcher/browser_options.rb +41 -0
- data/lib/puppeteer/launcher/chrome.rb +211 -0
- data/lib/puppeteer/launcher/chrome_arg_options.rb +49 -0
- data/lib/puppeteer/launcher/launch_options.rb +68 -0
- data/lib/puppeteer/lifecycle_watcher.rb +171 -0
- data/lib/puppeteer/mouse.rb +123 -0
- data/lib/puppeteer/network_manager.rb +122 -0
- data/lib/puppeteer/page.rb +1065 -0
- data/lib/puppeteer/page/screenshot_options.rb +78 -0
- data/lib/puppeteer/remote_object.rb +143 -0
- data/lib/puppeteer/target.rb +150 -0
- data/lib/puppeteer/timeout_settings.rb +15 -0
- data/lib/puppeteer/touch_screen.rb +43 -0
- data/lib/puppeteer/version.rb +3 -0
- data/lib/puppeteer/viewport.rb +54 -0
- data/lib/puppeteer/wait_task.rb +188 -0
- data/lib/puppeteer/web_socket.rb +122 -0
- data/lib/puppeteer/web_socket_transport.rb +49 -0
- data/puppeteer-ruby.gemspec +32 -0
- metadata +355 -0
@@ -0,0 +1,136 @@
|
|
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
|
+
Module: Puppeteer::Mouse::Button
|
8
|
+
|
9
|
+
— Documentation by YARD 0.9.24
|
10
|
+
|
11
|
+
</title>
|
12
|
+
|
13
|
+
<link rel="stylesheet" href="../../css/style.css" type="text/css" />
|
14
|
+
|
15
|
+
<link rel="stylesheet" href="../../css/common.css" type="text/css" />
|
16
|
+
|
17
|
+
<script type="text/javascript">
|
18
|
+
pathId = "Puppeteer::Mouse::Button";
|
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 (B)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span> » <span class='title'><span class='object_link'><a href="../Mouse.html" title="Puppeteer::Mouse (class)">Mouse</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">Button</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>Module: Puppeteer::Mouse::Button
|
63
|
+
|
64
|
+
|
65
|
+
|
66
|
+
</h1>
|
67
|
+
<div class="box_info">
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
76
|
+
|
77
|
+
|
78
|
+
|
79
|
+
<dl>
|
80
|
+
<dt>Defined in:</dt>
|
81
|
+
<dd>lib/puppeteer/mouse.rb</dd>
|
82
|
+
</dl>
|
83
|
+
|
84
|
+
</div>
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
<h2>
|
89
|
+
Constant Summary
|
90
|
+
<small><a href="#" class="constants_summary_toggle">collapse</a></small>
|
91
|
+
</h2>
|
92
|
+
|
93
|
+
<dl class="constants">
|
94
|
+
|
95
|
+
<dt id="NONE-constant" class="">NONE =
|
96
|
+
|
97
|
+
</dt>
|
98
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>none</span><span class='tstring_end'>'</span></span></pre></dd>
|
99
|
+
|
100
|
+
<dt id="LEFT-constant" class="">LEFT =
|
101
|
+
|
102
|
+
</dt>
|
103
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>left</span><span class='tstring_end'>'</span></span></pre></dd>
|
104
|
+
|
105
|
+
<dt id="RIGHT-constant" class="">RIGHT =
|
106
|
+
|
107
|
+
</dt>
|
108
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>right</span><span class='tstring_end'>'</span></span></pre></dd>
|
109
|
+
|
110
|
+
<dt id="MIDDLE-constant" class="">MIDDLE =
|
111
|
+
|
112
|
+
</dt>
|
113
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>middle</span><span class='tstring_end'>'</span></span></pre></dd>
|
114
|
+
|
115
|
+
</dl>
|
116
|
+
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
|
126
|
+
</div>
|
127
|
+
|
128
|
+
<div id="footer">
|
129
|
+
Generated on Fri Jun 12 12:38:32 2020 by
|
130
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
131
|
+
0.9.24 (ruby-2.6.3).
|
132
|
+
</div>
|
133
|
+
|
134
|
+
</div>
|
135
|
+
</body>
|
136
|
+
</html>
|
@@ -0,0 +1,901 @@
|
|
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::NetworkManager
|
8
|
+
|
9
|
+
— 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::NetworkManager";
|
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 (N)</a> »
|
40
|
+
<span class='title'><span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span></span>
|
41
|
+
»
|
42
|
+
<span class="title">NetworkManager</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::NetworkManager
|
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::NetworkManager</li>
|
78
|
+
|
79
|
+
</ul>
|
80
|
+
<a href="#" class="inheritanceTree">show all</a>
|
81
|
+
|
82
|
+
</dd>
|
83
|
+
</dl>
|
84
|
+
|
85
|
+
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
|
90
|
+
<dl>
|
91
|
+
<dt>Includes:</dt>
|
92
|
+
<dd><span class='object_link'><a href="EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></dd>
|
93
|
+
</dl>
|
94
|
+
|
95
|
+
|
96
|
+
|
97
|
+
|
98
|
+
|
99
|
+
|
100
|
+
<dl>
|
101
|
+
<dt>Defined in:</dt>
|
102
|
+
<dd>lib/puppeteer/network_manager.rb</dd>
|
103
|
+
</dl>
|
104
|
+
|
105
|
+
</div>
|
106
|
+
|
107
|
+
<h2>Defined Under Namespace</h2>
|
108
|
+
<p class="children">
|
109
|
+
|
110
|
+
|
111
|
+
|
112
|
+
|
113
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="NetworkManager/Credentials.html" title="Puppeteer::NetworkManager::Credentials (class)">Credentials</a></span>
|
114
|
+
|
115
|
+
|
116
|
+
</p>
|
117
|
+
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
|
122
|
+
|
123
|
+
|
124
|
+
|
125
|
+
<h2>
|
126
|
+
Instance Method Summary
|
127
|
+
<small><a href="#" class="summary_toggle">collapse</a></small>
|
128
|
+
</h2>
|
129
|
+
|
130
|
+
<ul class="summary">
|
131
|
+
|
132
|
+
<li class="public ">
|
133
|
+
<span class="summary_signature">
|
134
|
+
|
135
|
+
<a href="#authenticate-instance_method" title="#authenticate (instance method)">#<strong>authenticate</strong>(username:, password:) ⇒ Object </a>
|
136
|
+
|
137
|
+
|
138
|
+
|
139
|
+
</span>
|
140
|
+
|
141
|
+
|
142
|
+
|
143
|
+
|
144
|
+
|
145
|
+
|
146
|
+
|
147
|
+
|
148
|
+
|
149
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
150
|
+
|
151
|
+
</li>
|
152
|
+
|
153
|
+
|
154
|
+
<li class="public ">
|
155
|
+
<span class="summary_signature">
|
156
|
+
|
157
|
+
<a href="#cache_enabled=-instance_method" title="#cache_enabled= (instance method)">#<strong>cache_enabled=</strong>(enabled) ⇒ Object </a>
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
</span>
|
162
|
+
|
163
|
+
|
164
|
+
|
165
|
+
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
|
170
|
+
|
171
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
172
|
+
|
173
|
+
</li>
|
174
|
+
|
175
|
+
|
176
|
+
<li class="public ">
|
177
|
+
<span class="summary_signature">
|
178
|
+
|
179
|
+
<a href="#extra_http_headers-instance_method" title="#extra_http_headers (instance method)">#<strong>extra_http_headers</strong> ⇒ !Object<string, string> </a>
|
180
|
+
|
181
|
+
|
182
|
+
|
183
|
+
</span>
|
184
|
+
|
185
|
+
|
186
|
+
|
187
|
+
|
188
|
+
|
189
|
+
|
190
|
+
|
191
|
+
|
192
|
+
|
193
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
194
|
+
|
195
|
+
</li>
|
196
|
+
|
197
|
+
|
198
|
+
<li class="public ">
|
199
|
+
<span class="summary_signature">
|
200
|
+
|
201
|
+
<a href="#extra_http_headers=-instance_method" title="#extra_http_headers= (instance method)">#<strong>extra_http_headers=</strong>(headers) ⇒ Object </a>
|
202
|
+
|
203
|
+
|
204
|
+
|
205
|
+
</span>
|
206
|
+
|
207
|
+
|
208
|
+
|
209
|
+
|
210
|
+
|
211
|
+
|
212
|
+
|
213
|
+
|
214
|
+
|
215
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
216
|
+
|
217
|
+
</li>
|
218
|
+
|
219
|
+
|
220
|
+
<li class="public ">
|
221
|
+
<span class="summary_signature">
|
222
|
+
|
223
|
+
<a href="#init-instance_method" title="#init (instance method)">#<strong>init</strong> ⇒ Object </a>
|
224
|
+
|
225
|
+
|
226
|
+
|
227
|
+
</span>
|
228
|
+
|
229
|
+
|
230
|
+
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
|
237
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
238
|
+
|
239
|
+
</li>
|
240
|
+
|
241
|
+
|
242
|
+
<li class="public ">
|
243
|
+
<span class="summary_signature">
|
244
|
+
|
245
|
+
<a href="#initialize-instance_method" title="#initialize (instance method)">#<strong>initialize</strong>(client, ignore_https_errors, frame_manager) ⇒ NetworkManager </a>
|
246
|
+
|
247
|
+
|
248
|
+
|
249
|
+
</span>
|
250
|
+
|
251
|
+
|
252
|
+
<span class="note title constructor">constructor</span>
|
253
|
+
|
254
|
+
|
255
|
+
|
256
|
+
|
257
|
+
|
258
|
+
|
259
|
+
|
260
|
+
|
261
|
+
<span class="summary_desc"><div class='inline'>
|
262
|
+
<p>A new instance of NetworkManager.</p>
|
263
|
+
</div></span>
|
264
|
+
|
265
|
+
</li>
|
266
|
+
|
267
|
+
|
268
|
+
<li class="public ">
|
269
|
+
<span class="summary_signature">
|
270
|
+
|
271
|
+
<a href="#offline_mode=-instance_method" title="#offline_mode= (instance method)">#<strong>offline_mode=</strong>(value) ⇒ Object </a>
|
272
|
+
|
273
|
+
|
274
|
+
|
275
|
+
</span>
|
276
|
+
|
277
|
+
|
278
|
+
|
279
|
+
|
280
|
+
|
281
|
+
|
282
|
+
|
283
|
+
|
284
|
+
|
285
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
286
|
+
|
287
|
+
</li>
|
288
|
+
|
289
|
+
|
290
|
+
<li class="public ">
|
291
|
+
<span class="summary_signature">
|
292
|
+
|
293
|
+
<a href="#request_interception=-instance_method" title="#request_interception= (instance method)">#<strong>request_interception=</strong>(enabled) ⇒ Object </a>
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
</span>
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
|
302
|
+
|
303
|
+
|
304
|
+
|
305
|
+
|
306
|
+
|
307
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
308
|
+
|
309
|
+
</li>
|
310
|
+
|
311
|
+
|
312
|
+
<li class="public ">
|
313
|
+
<span class="summary_signature">
|
314
|
+
|
315
|
+
<a href="#user_agent=-instance_method" title="#user_agent= (instance method)">#<strong>user_agent=</strong>(user_agent) ⇒ Object </a>
|
316
|
+
|
317
|
+
|
318
|
+
|
319
|
+
</span>
|
320
|
+
|
321
|
+
|
322
|
+
|
323
|
+
|
324
|
+
|
325
|
+
|
326
|
+
|
327
|
+
|
328
|
+
|
329
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
330
|
+
|
331
|
+
</li>
|
332
|
+
|
333
|
+
|
334
|
+
</ul>
|
335
|
+
|
336
|
+
|
337
|
+
|
338
|
+
|
339
|
+
|
340
|
+
|
341
|
+
|
342
|
+
|
343
|
+
|
344
|
+
|
345
|
+
|
346
|
+
<h3 class="inherited">Methods included from <span class='object_link'><a href="EventCallbackable.html" title="Puppeteer::EventCallbackable (module)">EventCallbackable</a></span></h3>
|
347
|
+
<p class="inherited"><span class='object_link'><a href="EventCallbackable.html#add_event_listener-instance_method" title="Puppeteer::EventCallbackable#add_event_listener (method)">#add_event_listener</a></span>, <span class='object_link'><a href="EventCallbackable.html#emit_event-instance_method" title="Puppeteer::EventCallbackable#emit_event (method)">#emit_event</a></span>, <span class='object_link'><a href="EventCallbackable.html#on_event-instance_method" title="Puppeteer::EventCallbackable#on_event (method)">#on_event</a></span>, <span class='object_link'><a href="EventCallbackable.html#remove_event_listener-instance_method" title="Puppeteer::EventCallbackable#remove_event_listener (method)">#remove_event_listener</a></span></p>
|
348
|
+
<div id="constructor_details" class="method_details_list">
|
349
|
+
<h2>Constructor Details</h2>
|
350
|
+
|
351
|
+
<div class="method_details first">
|
352
|
+
<h3 class="signature first" id="initialize-instance_method">
|
353
|
+
|
354
|
+
#<strong>initialize</strong>(client, ignore_https_errors, frame_manager) ⇒ <tt><span class='object_link'><a href="" title="Puppeteer::NetworkManager (class)">NetworkManager</a></span></tt>
|
355
|
+
|
356
|
+
|
357
|
+
|
358
|
+
|
359
|
+
|
360
|
+
</h3><div class="docstring">
|
361
|
+
<div class="discussion">
|
362
|
+
|
363
|
+
<p>Returns a new instance of NetworkManager.</p>
|
364
|
+
|
365
|
+
|
366
|
+
</div>
|
367
|
+
</div>
|
368
|
+
<div class="tags">
|
369
|
+
<p class="tag_title">Parameters:</p>
|
370
|
+
<ul class="param">
|
371
|
+
|
372
|
+
<li>
|
373
|
+
|
374
|
+
<span class='name'>client</span>
|
375
|
+
|
376
|
+
|
377
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="CDPSession.html" title="Puppeteer::CDPSession (class)">CDPSession</a></span></tt>)</span>
|
378
|
+
|
379
|
+
|
380
|
+
|
381
|
+
</li>
|
382
|
+
|
383
|
+
<li>
|
384
|
+
|
385
|
+
<span class='name'>ignoreHTTPSErrors</span>
|
386
|
+
|
387
|
+
|
388
|
+
<span class='type'>(<tt>boolean</tt>)</span>
|
389
|
+
|
390
|
+
|
391
|
+
|
392
|
+
</li>
|
393
|
+
|
394
|
+
<li>
|
395
|
+
|
396
|
+
<span class='name'>frameManager</span>
|
397
|
+
|
398
|
+
|
399
|
+
<span class='type'>(<tt>!<span class='object_link'><a href="../Puppeteer.html" title="Puppeteer (class)">Puppeteer</a></span>.<span class='object_link'><a href="FrameManager.html" title="Puppeteer::FrameManager (class)">FrameManager</a></span></tt>)</span>
|
400
|
+
|
401
|
+
|
402
|
+
|
403
|
+
</li>
|
404
|
+
|
405
|
+
</ul>
|
406
|
+
|
407
|
+
|
408
|
+
</div><table class="source_code">
|
409
|
+
<tr>
|
410
|
+
<td>
|
411
|
+
<pre class="lines">
|
412
|
+
|
413
|
+
|
414
|
+
17
|
415
|
+
18
|
416
|
+
19
|
417
|
+
20
|
418
|
+
21
|
419
|
+
22
|
420
|
+
23
|
421
|
+
24
|
422
|
+
25
|
423
|
+
26
|
424
|
+
27
|
425
|
+
28
|
426
|
+
29
|
427
|
+
30
|
428
|
+
31
|
429
|
+
32
|
430
|
+
33
|
431
|
+
34
|
432
|
+
35
|
433
|
+
36
|
434
|
+
37
|
435
|
+
38
|
436
|
+
39</pre>
|
437
|
+
</td>
|
438
|
+
<td>
|
439
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 17</span>
|
440
|
+
|
441
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_initialize'>initialize</span><span class='lparen'>(</span><span class='id identifier rubyid_client'>client</span><span class='comma'>,</span> <span class='id identifier rubyid_ignore_https_errors'>ignore_https_errors</span><span class='comma'>,</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span><span class='rparen'>)</span>
|
442
|
+
<span class='ivar'>@client</span> <span class='op'>=</span> <span class='id identifier rubyid_client'>client</span>
|
443
|
+
<span class='ivar'>@ignore_https_errors</span> <span class='op'>=</span> <span class='id identifier rubyid_ignore_https_errors'>ignore_https_errors</span>
|
444
|
+
<span class='ivar'>@frame_manager</span> <span class='op'>=</span> <span class='id identifier rubyid_frame_manager'>frame_manager</span>
|
445
|
+
|
446
|
+
<span class='comment'># @type {!Map<string, !Request>}
|
447
|
+
</span> <span class='ivar'>@request_id_to_request</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
448
|
+
|
449
|
+
<span class='comment'># @type {!Map<string, !Protocol.Network.requestWillBeSentPayload>}
|
450
|
+
</span> <span class='ivar'>@request_id_to_request_with_be_sent_event</span>
|
451
|
+
|
452
|
+
<span class='ivar'>@extra_http_headers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
453
|
+
|
454
|
+
<span class='ivar'>@offline</span> <span class='op'>=</span> <span class='kw'>false</span>
|
455
|
+
|
456
|
+
<span class='comment'># /** @type {!Set<string>} */
|
457
|
+
</span> <span class='comment'># this._attemptedAuthentications = new Set();
|
458
|
+
</span> <span class='ivar'>@user_request_interception_enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
459
|
+
<span class='ivar'>@protocol_request_interception_enabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
460
|
+
<span class='ivar'>@user_cache_disabled</span> <span class='op'>=</span> <span class='kw'>false</span>
|
461
|
+
<span class='comment'># /** @type {!Map<string, string>} */
|
462
|
+
</span> <span class='comment'># this._requestIdToInterceptionId = new Map();
|
463
|
+
</span><span class='kw'>end</span></pre>
|
464
|
+
</td>
|
465
|
+
</tr>
|
466
|
+
</table>
|
467
|
+
</div>
|
468
|
+
|
469
|
+
</div>
|
470
|
+
|
471
|
+
|
472
|
+
<div id="instance_method_details" class="method_details_list">
|
473
|
+
<h2>Instance Method Details</h2>
|
474
|
+
|
475
|
+
|
476
|
+
<div class="method_details first">
|
477
|
+
<h3 class="signature first" id="authenticate-instance_method">
|
478
|
+
|
479
|
+
#<strong>authenticate</strong>(username:, password:) ⇒ <tt>Object</tt>
|
480
|
+
|
481
|
+
|
482
|
+
|
483
|
+
|
484
|
+
|
485
|
+
</h3><div class="docstring">
|
486
|
+
<div class="discussion">
|
487
|
+
|
488
|
+
|
489
|
+
</div>
|
490
|
+
</div>
|
491
|
+
<div class="tags">
|
492
|
+
<p class="tag_title">Parameters:</p>
|
493
|
+
<ul class="param">
|
494
|
+
|
495
|
+
<li>
|
496
|
+
|
497
|
+
<span class='name'>username</span>
|
498
|
+
|
499
|
+
|
500
|
+
<span class='type'>(<tt>String|NilClass</tt>)</span>
|
501
|
+
|
502
|
+
|
503
|
+
|
504
|
+
</li>
|
505
|
+
|
506
|
+
<li>
|
507
|
+
|
508
|
+
<span class='name'>password</span>
|
509
|
+
|
510
|
+
|
511
|
+
<span class='type'>(<tt>String|NilClass</tt>)</span>
|
512
|
+
|
513
|
+
|
514
|
+
|
515
|
+
</li>
|
516
|
+
|
517
|
+
</ul>
|
518
|
+
|
519
|
+
|
520
|
+
</div><table class="source_code">
|
521
|
+
<tr>
|
522
|
+
<td>
|
523
|
+
<pre class="lines">
|
524
|
+
|
525
|
+
|
526
|
+
50
|
527
|
+
51
|
528
|
+
52
|
529
|
+
53</pre>
|
530
|
+
</td>
|
531
|
+
<td>
|
532
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 50</span>
|
533
|
+
|
534
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_authenticate'>authenticate</span><span class='lparen'>(</span><span class='label'>username:</span><span class='comma'>,</span> <span class='label'>password:</span><span class='rparen'>)</span>
|
535
|
+
<span class='ivar'>@credentials</span> <span class='op'>=</span> <span class='const'><span class='object_link'><a href="NetworkManager/Credentials.html" title="Puppeteer::NetworkManager::Credentials (class)">Credentials</a></span></span><span class='period'>.</span><span class='id identifier rubyid_new'><span class='object_link'><a href="NetworkManager/Credentials.html#initialize-instance_method" title="Puppeteer::NetworkManager::Credentials#initialize (method)">new</a></span></span><span class='lparen'>(</span><span class='label'>username:</span> <span class='id identifier rubyid_username'>username</span><span class='comma'>,</span> <span class='label'>password:</span> <span class='id identifier rubyid_password'>password</span><span class='rparen'>)</span>
|
536
|
+
<span class='id identifier rubyid_update_protocol_request_interception'>update_protocol_request_interception</span>
|
537
|
+
<span class='kw'>end</span></pre>
|
538
|
+
</td>
|
539
|
+
</tr>
|
540
|
+
</table>
|
541
|
+
</div>
|
542
|
+
|
543
|
+
<div class="method_details ">
|
544
|
+
<h3 class="signature " id="cache_enabled=-instance_method">
|
545
|
+
|
546
|
+
#<strong>cache_enabled=</strong>(enabled) ⇒ <tt>Object</tt>
|
547
|
+
|
548
|
+
|
549
|
+
|
550
|
+
|
551
|
+
|
552
|
+
</h3><table class="source_code">
|
553
|
+
<tr>
|
554
|
+
<td>
|
555
|
+
<pre class="lines">
|
556
|
+
|
557
|
+
|
558
|
+
91
|
559
|
+
92
|
560
|
+
93
|
561
|
+
94</pre>
|
562
|
+
</td>
|
563
|
+
<td>
|
564
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 91</span>
|
565
|
+
|
566
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_cache_enabled='>cache_enabled=</span><span class='lparen'>(</span><span class='id identifier rubyid_enabled'>enabled</span><span class='rparen'>)</span>
|
567
|
+
<span class='ivar'>@user_cache_disabled</span> <span class='op'>=</span> <span class='op'>!</span><span class='id identifier rubyid_enabled'>enabled</span>
|
568
|
+
<span class='id identifier rubyid_update_protocol_cache_disabled'>update_protocol_cache_disabled</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="extra_http_headers-instance_method">
|
577
|
+
|
578
|
+
#<strong>extra_http_headers</strong> ⇒ <tt>!Object<string, string></tt>
|
579
|
+
|
580
|
+
|
581
|
+
|
582
|
+
|
583
|
+
|
584
|
+
</h3><div class="docstring">
|
585
|
+
<div class="discussion">
|
586
|
+
|
587
|
+
|
588
|
+
</div>
|
589
|
+
</div>
|
590
|
+
<div class="tags">
|
591
|
+
|
592
|
+
<p class="tag_title">Returns:</p>
|
593
|
+
<ul class="return">
|
594
|
+
|
595
|
+
<li>
|
596
|
+
|
597
|
+
|
598
|
+
<span class='type'>(<tt>!Object<string, string></tt>)</span>
|
599
|
+
|
600
|
+
|
601
|
+
|
602
|
+
</li>
|
603
|
+
|
604
|
+
</ul>
|
605
|
+
|
606
|
+
</div><table class="source_code">
|
607
|
+
<tr>
|
608
|
+
<td>
|
609
|
+
<pre class="lines">
|
610
|
+
|
611
|
+
|
612
|
+
69
|
613
|
+
70
|
614
|
+
71</pre>
|
615
|
+
</td>
|
616
|
+
<td>
|
617
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 69</span>
|
618
|
+
|
619
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extra_http_headers'>extra_http_headers</span>
|
620
|
+
<span class='ivar'>@extra_http_headers</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
|
621
|
+
<span class='kw'>end</span></pre>
|
622
|
+
</td>
|
623
|
+
</tr>
|
624
|
+
</table>
|
625
|
+
</div>
|
626
|
+
|
627
|
+
<div class="method_details ">
|
628
|
+
<h3 class="signature " id="extra_http_headers=-instance_method">
|
629
|
+
|
630
|
+
#<strong>extra_http_headers=</strong>(headers) ⇒ <tt>Object</tt>
|
631
|
+
|
632
|
+
|
633
|
+
|
634
|
+
|
635
|
+
|
636
|
+
</h3><div class="docstring">
|
637
|
+
<div class="discussion">
|
638
|
+
|
639
|
+
|
640
|
+
</div>
|
641
|
+
</div>
|
642
|
+
<div class="tags">
|
643
|
+
<p class="tag_title">Parameters:</p>
|
644
|
+
<ul class="param">
|
645
|
+
|
646
|
+
<li>
|
647
|
+
|
648
|
+
<span class='name'>extraHTTPHeaders</span>
|
649
|
+
|
650
|
+
|
651
|
+
<span class='type'>(<tt>!Object<string, string></tt>)</span>
|
652
|
+
|
653
|
+
|
654
|
+
|
655
|
+
</li>
|
656
|
+
|
657
|
+
</ul>
|
658
|
+
|
659
|
+
|
660
|
+
</div><table class="source_code">
|
661
|
+
<tr>
|
662
|
+
<td>
|
663
|
+
<pre class="lines">
|
664
|
+
|
665
|
+
|
666
|
+
56
|
667
|
+
57
|
668
|
+
58
|
669
|
+
59
|
670
|
+
60
|
671
|
+
61
|
672
|
+
62
|
673
|
+
63
|
674
|
+
64
|
675
|
+
65
|
676
|
+
66</pre>
|
677
|
+
</td>
|
678
|
+
<td>
|
679
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 56</span>
|
680
|
+
|
681
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_extra_http_headers='>extra_http_headers=</span><span class='lparen'>(</span><span class='id identifier rubyid_headers'>headers</span><span class='rparen'>)</span>
|
682
|
+
<span class='id identifier rubyid_new_extra_http_headers'>new_extra_http_headers</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
|
683
|
+
<span class='id identifier rubyid_headers'>headers</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_key'>key</span><span class='comma'>,</span> <span class='id identifier rubyid_value'>value</span><span class='op'>|</span>
|
684
|
+
<span class='kw'>unless</span> <span class='id identifier rubyid_value'>value</span><span class='period'>.</span><span class='id identifier rubyid_is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>String</span><span class='rparen'>)</span>
|
685
|
+
<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'>Expected value of header \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_key'>key</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" to be String, but \"</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_value'>value</span><span class='embexpr_end'>}</span><span class='tstring_content'>\" is found.</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
|
686
|
+
<span class='kw'>end</span>
|
687
|
+
<span class='id identifier rubyid_new_extra_http_headers'>new_extra_http_headers</span><span class='lbracket'>[</span><span class='id identifier rubyid_key'>key</span><span class='period'>.</span><span class='id identifier rubyid_downcase'>downcase</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
688
|
+
<span class='kw'>end</span>
|
689
|
+
<span class='ivar'>@extra_http_headers</span> <span class='op'>=</span> <span class='id identifier rubyid_new_extra_http_headers'>new_extra_http_headers</span>
|
690
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Network.setExtraHTTPHeaders</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>headers:</span> <span class='id identifier rubyid_new_extra_http_headers'>new_extra_http_headers</span><span class='rparen'>)</span>
|
691
|
+
<span class='kw'>end</span></pre>
|
692
|
+
</td>
|
693
|
+
</tr>
|
694
|
+
</table>
|
695
|
+
</div>
|
696
|
+
|
697
|
+
<div class="method_details ">
|
698
|
+
<h3 class="signature " id="init-instance_method">
|
699
|
+
|
700
|
+
#<strong>init</strong> ⇒ <tt>Object</tt>
|
701
|
+
|
702
|
+
|
703
|
+
|
704
|
+
|
705
|
+
|
706
|
+
</h3><table class="source_code">
|
707
|
+
<tr>
|
708
|
+
<td>
|
709
|
+
<pre class="lines">
|
710
|
+
|
711
|
+
|
712
|
+
41
|
713
|
+
42
|
714
|
+
43
|
715
|
+
44
|
716
|
+
45
|
717
|
+
46</pre>
|
718
|
+
</td>
|
719
|
+
<td>
|
720
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 41</span>
|
721
|
+
|
722
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_init'>init</span>
|
723
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Network.enable</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span>
|
724
|
+
<span class='kw'>if</span> <span class='ivar'>@ignore_https_errors</span>
|
725
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Security.setIgnoreCertificateErrors</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>ignore:</span> <span class='kw'>true</span><span class='rparen'>)</span>
|
726
|
+
<span class='kw'>end</span>
|
727
|
+
<span class='kw'>end</span></pre>
|
728
|
+
</td>
|
729
|
+
</tr>
|
730
|
+
</table>
|
731
|
+
</div>
|
732
|
+
|
733
|
+
<div class="method_details ">
|
734
|
+
<h3 class="signature " id="offline_mode=-instance_method">
|
735
|
+
|
736
|
+
#<strong>offline_mode=</strong>(value) ⇒ <tt>Object</tt>
|
737
|
+
|
738
|
+
|
739
|
+
|
740
|
+
|
741
|
+
|
742
|
+
</h3><div class="docstring">
|
743
|
+
<div class="discussion">
|
744
|
+
|
745
|
+
|
746
|
+
</div>
|
747
|
+
</div>
|
748
|
+
<div class="tags">
|
749
|
+
<p class="tag_title">Parameters:</p>
|
750
|
+
<ul class="param">
|
751
|
+
|
752
|
+
<li>
|
753
|
+
|
754
|
+
<span class='name'>value</span>
|
755
|
+
|
756
|
+
|
757
|
+
<span class='type'>(<tt>TrueClass|FalseClass</tt>)</span>
|
758
|
+
|
759
|
+
|
760
|
+
|
761
|
+
</li>
|
762
|
+
|
763
|
+
</ul>
|
764
|
+
|
765
|
+
|
766
|
+
</div><table class="source_code">
|
767
|
+
<tr>
|
768
|
+
<td>
|
769
|
+
<pre class="lines">
|
770
|
+
|
771
|
+
|
772
|
+
74
|
773
|
+
75
|
774
|
+
76
|
775
|
+
77
|
776
|
+
78
|
777
|
+
79
|
778
|
+
80
|
779
|
+
81
|
780
|
+
82
|
781
|
+
83
|
782
|
+
84</pre>
|
783
|
+
</td>
|
784
|
+
<td>
|
785
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 74</span>
|
786
|
+
|
787
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_offline_mode='>offline_mode=</span><span class='lparen'>(</span><span class='id identifier rubyid_value'>value</span><span class='rparen'>)</span>
|
788
|
+
<span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@offline</span> <span class='op'>==</span> <span class='id identifier rubyid_value'>value</span>
|
789
|
+
<span class='ivar'>@offline</span> <span class='op'>=</span> <span class='id identifier rubyid_value'>value</span>
|
790
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Network.emulateNetworkConditions</span><span class='tstring_end'>'</span></span><span class='comma'>,</span>
|
791
|
+
<span class='label'>offline:</span> <span class='ivar'>@offline</span><span class='comma'>,</span>
|
792
|
+
<span class='comment'># values of 0 remove any active throttling. crbug.com/456324#c9
|
793
|
+
</span> <span class='label'>latency:</span> <span class='int'>0</span><span class='comma'>,</span>
|
794
|
+
<span class='label'>downloadThroughput:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
|
795
|
+
<span class='label'>uploadThroughput:</span> <span class='op'>-</span><span class='int'>1</span><span class='comma'>,</span>
|
796
|
+
<span class='rparen'>)</span>
|
797
|
+
<span class='kw'>end</span></pre>
|
798
|
+
</td>
|
799
|
+
</tr>
|
800
|
+
</table>
|
801
|
+
</div>
|
802
|
+
|
803
|
+
<div class="method_details ">
|
804
|
+
<h3 class="signature " id="request_interception=-instance_method">
|
805
|
+
|
806
|
+
#<strong>request_interception=</strong>(enabled) ⇒ <tt>Object</tt>
|
807
|
+
|
808
|
+
|
809
|
+
|
810
|
+
|
811
|
+
|
812
|
+
</h3><table class="source_code">
|
813
|
+
<tr>
|
814
|
+
<td>
|
815
|
+
<pre class="lines">
|
816
|
+
|
817
|
+
|
818
|
+
96
|
819
|
+
97
|
820
|
+
98
|
821
|
+
99</pre>
|
822
|
+
</td>
|
823
|
+
<td>
|
824
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 96</span>
|
825
|
+
|
826
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_request_interception='>request_interception=</span><span class='lparen'>(</span><span class='id identifier rubyid_enabled'>enabled</span><span class='rparen'>)</span>
|
827
|
+
<span class='ivar'>@user_request_interception_enabled</span> <span class='op'>=</span> <span class='id identifier rubyid_enabled'>enabled</span>
|
828
|
+
<span class='id identifier rubyid_update_protocol_request_interception'>update_protocol_request_interception</span>
|
829
|
+
<span class='kw'>end</span></pre>
|
830
|
+
</td>
|
831
|
+
</tr>
|
832
|
+
</table>
|
833
|
+
</div>
|
834
|
+
|
835
|
+
<div class="method_details ">
|
836
|
+
<h3 class="signature " id="user_agent=-instance_method">
|
837
|
+
|
838
|
+
#<strong>user_agent=</strong>(user_agent) ⇒ <tt>Object</tt>
|
839
|
+
|
840
|
+
|
841
|
+
|
842
|
+
|
843
|
+
|
844
|
+
</h3><div class="docstring">
|
845
|
+
<div class="discussion">
|
846
|
+
|
847
|
+
|
848
|
+
</div>
|
849
|
+
</div>
|
850
|
+
<div class="tags">
|
851
|
+
<p class="tag_title">Parameters:</p>
|
852
|
+
<ul class="param">
|
853
|
+
|
854
|
+
<li>
|
855
|
+
|
856
|
+
<span class='name'>user_agent</span>
|
857
|
+
|
858
|
+
|
859
|
+
<span class='type'>(<tt>String</tt>)</span>
|
860
|
+
|
861
|
+
|
862
|
+
|
863
|
+
</li>
|
864
|
+
|
865
|
+
</ul>
|
866
|
+
|
867
|
+
|
868
|
+
</div><table class="source_code">
|
869
|
+
<tr>
|
870
|
+
<td>
|
871
|
+
<pre class="lines">
|
872
|
+
|
873
|
+
|
874
|
+
87
|
875
|
+
88
|
876
|
+
89</pre>
|
877
|
+
</td>
|
878
|
+
<td>
|
879
|
+
<pre class="code"><span class="info file"># File 'lib/puppeteer/network_manager.rb', line 87</span>
|
880
|
+
|
881
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_user_agent='>user_agent=</span><span class='lparen'>(</span><span class='id identifier rubyid_user_agent'>user_agent</span><span class='rparen'>)</span>
|
882
|
+
<span class='ivar'>@client</span><span class='period'>.</span><span class='id identifier rubyid_send_message'>send_message</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Network.setUserAgentOverride</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='label'>userAgent:</span> <span class='id identifier rubyid_user_agent'>user_agent</span><span class='rparen'>)</span>
|
883
|
+
<span class='kw'>end</span></pre>
|
884
|
+
</td>
|
885
|
+
</tr>
|
886
|
+
</table>
|
887
|
+
</div>
|
888
|
+
|
889
|
+
</div>
|
890
|
+
|
891
|
+
</div>
|
892
|
+
|
893
|
+
<div id="footer">
|
894
|
+
Generated on Fri Jun 12 12:38:35 2020 by
|
895
|
+
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
896
|
+
0.9.24 (ruby-2.6.3).
|
897
|
+
</div>
|
898
|
+
|
899
|
+
</div>
|
900
|
+
</body>
|
901
|
+
</html>
|