Selenium series: adding the BrowserMob proxy
Blog post from Octopus Deploy
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.