January 2018
Beginner to intermediate
354 pages
7h 59m
English
It is fairly easy to get started using the tool. You would first instantiate the proxy service in your WebDriver driver class code, pass that proxy capability to your driver, and turn the capture mode on to retrieve the HTTP responses and requests being sent back and forth during the test as you drive the browser.
The following code sample to integrate with Selenium WebDriver is from the Neustar GitHub site:
// start the proxy BrowserMobProxy proxy = new BrowserMobProxyServer(); proxy.start(0); // get the Selenium proxy objectProxy seleniumProxy = ClientUtil.createSeleniumProxy(proxy); // configure it as a desired capability DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.setCapability(CapabilityType ...
Read now
Unlock full access