You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/mobile-apps/features/network-capture.md
+24-53
Original file line number
Diff line number
Diff line change
@@ -67,7 +67,7 @@ Otherwise your app will accidentally mark Sauce's capture as untrustworthy and i
67
67
68
68
:::note Android Only
69
69
70
-
For Android applications, a minor modification in the manifest is necessary to make your app trust our proxy certificate. We'll do this for you automatically when you upload the app to the platform.
70
+
For Android applications, a minor modification in the manifest is necessary to make your app trust our proxy certificate. We'll do this for you automatically on the fly, right before we install the app to the target device.
71
71
72
72
:::
73
73
@@ -77,13 +77,25 @@ For Android applications, a minor modification in the manifest is necessary to m
77
77
The [App Settings](/mobile-apps/live-testing/live-mobile-app-testing/#app-settings) act as default configurations, but can be overridden by the capabilities specified in your test script.
78
78
To control whether network capture is enabled or disabled, add the **networkCapture** capability to your test script.
Upload your mobile app to Sauce Labs [through our UI](/mobile-apps/app-storage/#uploading-apps-via-ui) or [our REST API](/mobile-apps/app-storage/#uploading-apps-via-rest-api).
89
+
90
+
Navigate to **App Management** and locate your app's settings to enable the feature by default for all tests.
To enable System-wide network capture for cross-browser tests, click on **Developer Options** during a Live Testing session on the sidebar.
121
+
122
+
If you need to localize the capture context with just the browser and omit all network calls from the system entirely, then prefer
123
+
using our [DevTools](/web-apps/live-testing/dev-tools/) solution. It will allow you to isolate network calls from individual browser tabs and provide a richer debugging experience.
124
+
106
125
### Limitations
107
126
:::note Limitations
108
127
@@ -214,64 +233,16 @@ The Stats row in the footer provides details on the number of requests, transfer
<p><small><spanclassName="sauceGreen">Espresso and XCUITest Only</span></small></p>
219
-
220
-
To use network capture for automated Espresso and XCUITest tests, instrumentation must be enabled.
221
-
222
-
To enable network traffic capturing in your tests:
223
-
224
-
1. On Sauce Labs, click **Live** > **Mobile App**.
225
-
2. Upload your mobile app to Sauce Labs [through our UI](/mobile-apps/app-storage/#uploading-apps-via-ui) or [our REST API](/mobile-apps/app-storage/#uploading-apps-via-rest-api).
226
-
3. After you’ve uploaded your app, return to the **Live** > **Mobile App** page, hover your mouse over your app, then select **Settings**.<br/><img src={useBaseUrl('img/mobile-apps/networkcapturescr.png')} alt="Mobile app settings navigation" width="600"/>
227
-
4. Under **Default Settings**, toggle Instrumentation and Network Capture to enable the feature.<br/><img src={useBaseUrl('img/mobile-apps/networkcapturescr2.png')} alt="Mobile app settings navigation" width="800"/>
228
-
5. Alternatively, the **networkCapture** capability can be added to your test script:
229
-
-[Espresso via saucectl](/mobile-apps/automated-testing/espresso-xcuitest/espresso/#networkcapture)
230
-
-[XCUITest via saucectl](/mobile-apps/automated-testing/espresso-xcuitest/xcuitest/#networkcapture)
231
-
232
-
:::note Coming soon
233
-
234
-
System-wide network capture for Espresso and XCUITest will be available soon.
235
-
236
-
:::
237
-
238
236
### Limitations
239
237
240
238
<!-- prettier-ignore -->
241
239
:::note Not Supported
242
240
243
241
- Android Emulators
244
242
- iOS Simulators
245
-
- Android Chrome Browser in automated tests
246
-
- iOS Safari Browser in automated tests
247
243
248
244
:::
249
245
250
-
#### Android
251
-
252
-
Our network capture feature depends on the fact that these classes are not obfuscated:
253
-
254
-
[OkHTTP](https://square.github.io/okhttp/)
255
-
256
-
- okhttp3.Interceptor
257
-
- okhttp3.OkHttpClient
258
-
- okhttp3.Request
259
-
- okhttp3.Response
260
-
- okhttp3.ResponseBody
261
-
- okio.Buffer
262
-
263
-
[Volley](https://github.com/google/volley)
264
-
265
-
- com.android.volley.AuthFailureError
266
-
- com.android.volley.NetworkResponse
267
-
- com.android.volley.Request
268
-
- com.android.volley.RequestQueue
269
-
- com.android.volley.Response
270
-
271
-
#### iOS
272
-
273
-
- Network capture works if the app uses [NSURLSession](https://developer.apple.com/documentation/foundation/nsurlsession) or a library (like [Alamofire](https://github.com/Alamofire/Alamofire) or [AFNetworking](https://github.com/AFNetworking/AFNetworking)) that uses NSURLSession internally.
0 commit comments