Software Quality Assurance & Testing Stack Exchange is a question and answer site for software quality control experts, automation engineers, and software testers. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

This question already has an answer here:

I need to know if an application is requesting one beacon via an image or XHR request.

Manually I test it via the network tab in FireBug or monitoring the proxied requests in other browsers...

Searching I see several references to captureNetworkTraffic but none of my Selenium instances have this command.

I'm using the Firefox IDE 1.9.1 and Stand Alone server 2.25.0.

What should I be using to have that captureNetworkTraffic command available? Also, where is it officially documented?

share|improve this question

marked as duplicate by TESTasy, Kate Paulk, Michael Durrant, Bharat Mane, Bruce McLeod Jun 16 at 1:18

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Can you explain what you mean by "one beacon"? – user246 Oct 29 '12 at 18:29
up vote 1 down vote accepted

See this previous thread for an explanation - seems you wont find it officially documented as it is not official...

share|improve this answer
    
thanks... i still get totally confused by what "is" selenium... there's too many flavours and versions. – gcb Oct 29 '12 at 18:26

That feature is only available to Selenium RC (language bindings). It is not available in the IDE, nor Selenium 2 / WebDriver. For RC, it is known to be available for Python and Java, I believe it's there for the other languages as well.

Here's one open source project that actually makes use of it for performance profiling, that you can perhaps make use of, but will have to know/learn some coding.

http://code.google.com/p/selenium-profiler/

And, in terms of RC, I'm not sure if the latest server versions of Selenium v2.25 as mentioned, etc. support it when used with RC clients, so if not, you might have to go with old Selenium v1.x server releases to be able to use it.

Here's some more details on using it in code:

http://blog.eviltester.com/2010/05/a-selenium-capturenetworktraffic-example-in-java.html

http://code.google.com/p/selenium-profiler/source/browse/trunk/web_profiler.py

share|improve this answer

Yes you can automate it using BrowserMob Proxy. Please use the below mentioedn link to test Network traffic using BrowserMob Proxy

share|improve this answer
    
It would be better if you write the answer here and use the link as reference. – TESTasy Jun 13 at 8:44

Using BrowserMob Proxy, we capture performance data How to use BrowserMob Proxy? Download BrowserMob Proxy 2.Start BrowserMob Proxy Create a new Project and import BrowserMob Proxy with Selenium Standalone Server Jar Run the script. After running the script, you will see the proxy server is started, and respective logs are generated. As the script stops, an HTTP achieve file is also generated with Performance Log of the desired web application. Now you can import that HAR file and see the results at pcapperf.appspot.com. It will show the fetched performance data.

share|improve this answer
1  
Are you aware that you can simply edit your previous answer instead of posting a new answer for improving the previous one? – TESTasy Jun 14 at 5:16

Not the answer you're looking for? Browse other questions tagged or ask your own question.