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
570 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,800 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,010 points
2,408 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,297 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,320 points
952 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,510 points
2,225 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,870 points
1,836 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,870 points
1,829 views
+1 vote
1 answer