2

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?

1
  • Can you explain what you mean by "one beacon"?
    – user246
    Commented Oct 29, 2012 at 18:29

4 Answers 4

1

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

1
  • thanks... i still get totally confused by what "is" selenium... there's too many flavours and versions.
    – gcb
    Commented Oct 29, 2012 at 18:26
0

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

0

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.

1
  • 1
    Are you aware that you can simply edit your previous answer instead of posting a new answer for improving the previous one? Commented Jun 14, 2016 at 5:16
0

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

BrowserMob Proxy is a useful tool which is closely integrated with Selenium and can work independently. It is used to capture performance data for web applications. It is used to manage browser behaviors and traffic in HAR (HTTP Archive format) such as blacklist and white-listing of the content, simulating network traffic and latency, and rewriting HTTP requests and responses.

1
  • It would be better if you write the answer here and use the link as reference. Commented Jun 13, 2016 at 8:44

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