Home / Companies / Octopus Deploy / Blog / Post Details
Content Deep Dive

Selenium series: adding the BrowserMob proxy

Blog post from Octopus Deploy

Post Details
Company
Date Published
Author
Matthew Casperson
Word Count
1,196
Language
English
Hacker News Points
-
Summary

Matthew Casperson's post from October 2018 discusses the integration of BrowserMob proxy into a Selenium WebDriver test framework, enabling the capture and interception of network requests during tests. By adding BrowserMob as a Maven dependency and creating a decorator, the framework configures a proxy server that directs HTTP and HTTPS traffic through a local proxy, enhancing network request monitoring capabilities. The setup involves creating an instance of BrowserMobProxyServer, configuring it within the DesiredCapabilities object, and updating the AutomatedBrowserFactory to incorporate the BrowserMobDecorator. This allows tests to run transparently while providing the means to observe and manipulate network requests, which is not possible with WebDriver alone. The article also hints at further exploration of BrowserMob's features and addresses potential misconfigurations in proxy setups.