How to Capture Network Traffic and Http Requests From WebDriver?

0 votes
How to Capture Network Traffic and Http Requests From WebDriver
Aug 14 in Selenium by Rubin
63 views

1 answer to this question.

0 votes

Hi Rubin, you can use following piece of code to capture network traffic and http requests from webdriver:

public void proxy {
        Proxy proxy = new Proxy();
        // The URL here is the URL that the browsermob proxy is using
        proxy.setHttpProxy("localhost:9100");

        DesiredCapabilities capabilities = DesiredCapabilities.firefox();
        capabilities.setCapability(CapabilityType.PROXY, proxy);

        WebDriver driver = new FirefoxDriver(capabilities);
    }
answered Aug 14 by Abha
• 27,200 points

Related Questions In Selenium

0 votes
1 answer

How to capture the text from Alert Message in Selenium Webdriver?

Hello @Farhan, you can use getText() method ...READ MORE

answered Jul 2 in Selenium by Anvi
• 13,960 points
916 views
0 votes
1 answer
0 votes
1 answer

How can I download the *.jar file from http:// seleniumhq.org using selenium WebDriver?

For Selenium Standalone Server use this: profile.setPreference("browser.helperApps.neverAsk.saveToDisk", "application/java-archive"); and ...READ MORE

answered Apr 9, 2018 in Selenium by Martin
• 4,280 points
712 views
0 votes
1 answer
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,430 points
1,190 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,510 points
1,274 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,510 points
1,032 views