How to Capture Network Traffic and Http Requests From WebDriver?

0 votes
How to Capture Network Traffic and Http Requests From WebDriver
Aug 14, 2019 in Selenium by Rubin
2,374 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, 2019 by Abha
• 27,930 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, 2019 in Selenium by Anvi
• 14,090 points
4,939 views
0 votes
1 answer

How are 'Selenium-server-standalone.jar' and 'Selenium Client & WebDriver' different from each other?

Okay, your understanding of "Selenium Server" & ...READ MORE

answered Apr 6, 2018 in Selenium by nsv999
• 5,510 points
1,585 views
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,330 points
1,172 views
0 votes
2 answers

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,510 points
3,517 views
0 votes
2 answers

Problem while using InternetExplorerDriver in Selenium WebDriver

enable trusted connection  in internet explorer by ...READ MORE

answered Aug 31 in Selenium by Sri
• 2,970 points
4,521 views
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,890 points
2,589 views
0 votes
2 answers

How to use such xpath to find web elements

xpath are two types. 1) Absolute XPath:    /html/b ...READ MORE

answered Sep 2 in Selenium by Sri
• 2,970 points
2,845 views
+1 vote
1 answer