---
title: 'Advanced WebDriver Testing: Intercepting and Mocking Network'
description: We've added various new/custom WebDriver commands to our Chrome Browsers.
source_url:
  html: https://testingbot.com/blog/webdriver-network-testing
  md: https://testingbot.com/blog/webdriver-network-testing/index.md
---
# Mocking with WebDriver

By Jochen D.2019-03-04

[](https://www.facebook.com/sharer/sharer.php?u=https%3A%2F%2Ftestingbot.com%2Fblog%2Fwebdriver-network-testing%2Findex.md)
 Share on Facebook 

[](https://twitter.com/intent/tweet?url=https%3A%2F%2Ftestingbot.com%2Fblog%2Fwebdriver-network-testing%2Findex.md)
 Share on Twitter 

[](https://www.reddit.com/submit?url=https%3A%2F%2Ftestingbot.com%2Fblog%2Fwebdriver-network-testing%2Findex.md)
 Post on Reddit 

 Share link 

We've added various new/custom WebDriver commands to our Chrome Browsers.

  

- Throttle the network speed
- Fetch Network requests during your WebDriver tests
- Intercept and mock network responses during your tests

  

#### Throttle Network Speed

With this new option, you can simulate different network speeds during your test.

  

Simulate a 4G connection, specify a GPRS speed or even test how your page reacts when there's no internet connection (offline mode).

  

You can change these settings during your test, so it makes it very easily to test real life situations. For example; people using their cell-phone suddenly experience a slower connection.

  

#### Fetch Network Requests

You can now fetch all network requests and responses during your test.   
 As [WebDriver does not support reading status codes](https://github.com/seleniumhq/selenium-google-code-issue-archive/issues/141), it is now possible to use this command to fetch the status code, response headers and request headers.

  

#### Intercept and Mock

With this functionality, you can intercept and change responses during your test:

- When a test visits a page, you can configure the browser to redirect to another page.
- Configure specific URLs to immediately return an error during your test. Useful to disable ads/trackers during your tests
- Change the entire response (body + headers) of any URL during your test.

  

Documentation for this new feature is available on our [Debugging support](https://testingbot.com/support/other/debugging) page.

### Sidebar

#### TestingBot Cloud Testing

Run automated, manual and visual tests on remote browsers and devices. Sign up for a free trial.

[Free Trial](https://testingbot.com/users/sign_up)

#### Latest articles

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing)

##### Maestro Physical Device Testing

Maestro testing in parallel on physical Android and iOS d...

[Read more](https://testingbot.com/blog/maestro-physical-device-testing)

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing)

##### tvOS Physical Device Testing

Run automated tvOS tests on physical AppleTV devices

[Read more](https://testingbot.com/blog/tvos-automated-testing)

[![MacOS Tahoe Cloud Testing](https://testingbot.com/assets/blog/2025/tahoe.jpg)](https://testingbot.com/blog/macos-tahoe-beta-testing)

##### MacOS Tahoe Cloud Testing

Test your websites and apps on Apple's upcoming macOS Tah...

[Read more](https://testingbot.com/blog/macos-tahoe-beta-testing)

## Other Articles

[![Maestro Physical Device Testing](https://testingbot.com/assets/blog/2026/maestro-physical.jpg)](https://testingbot.com/blog/maestro-physical-device-testing "Maestro Physical Device Testing")

### [Maestro Physical Device Testing](https://testingbot.com/blog/maestro-physical-device-testing)

Maestro testing in parallel on physical Android and iOS devices.

[Read more](https://testingbot.com/blog/maestro-physical-device-testing)

[![tvOS Physical Device Testing](https://testingbot.com/assets/blog/2025/appletv.jpg)](https://testingbot.com/blog/tvos-automated-testing "tvOS Physical Device Testing")

### [tvOS Physical Device Testing](https://testingbot.com/blog/tvos-automated-testing)

Run automated tvOS tests on physical AppleTV devices.

[Read more](https://testingbot.com/blog/tvos-automated-testing)

[![MacOS Tahoe Cloud Testing](https://testingbot.com/assets/blog/2025/tahoe.jpg)](https://testingbot.com/blog/macos-tahoe-beta-testing "MacOS Tahoe Cloud Testing")

### [MacOS Tahoe Cloud Testing](https://testingbot.com/blog/macos-tahoe-beta-testing)

Test your websites and apps on Apple's upcoming macOS Tahoe (macOS 26).

[Read more](https://testingbot.com/blog/macos-tahoe-beta-testing)

[![ChromeOS Cloud Testing](https://testingbot.com/assets/blog/2025/chromeos.jpg)](https://testingbot.com/blog/chromeos-testing "ChromeOS Cloud Testing")

### [ChromeOS Cloud Testing](https://testingbot.com/blog/chromeos-testing)

ChromeOS Manual and Automated testing in the cloud.

[Read more](https://testingbot.com/blog/chromeos-testing)

## Ready to start testing?
[Start a free trial](https://testingbot.com/users/sign_up)

### Share this blog post
Close modal

Copy URL Copy Copied
