You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In particular, performance timings of content/file downloads, uploads, etc. along with viewing HTTP headers sent/received in browser.
Selenium RC had a captureNetworkTraffic option on startup of browser session to enable such functionality, though the user of course had to manually parse the desired data (or look for third party Selenium tools that did that).
WebDriver unfortunately doesn't natively support this, so just opening up a tracking issue for discussion and consideration of adding such functionality perhaps with third party tools.
daluu, Have you seen the robotframework-httplibrary and it's various forks? Some of this functionality might already be present there or more appropriate for that library.
emanlove, yes, I've heard of that library, but didn't check out the forks. Nevertheless, it doesn't quite fit with the issue here. This issue is about doing testing with WebDriver and at the same time being able to query for the browser data such as HTTP headers and as a result of that also extrapolate timing statistics.
This was possible as part of Selenium RC via captureNetworkTraffic option. It isn't available to WebDriver and must be extended via third party tools unless it is somehow incorporated in future WebDriver releases.
But you are right that if I just wanted pure HTTP request/response testing, I could use the mentioned library or similar.
While the use case of this issue is not a widely requested or needed feature, it does have its uses. Same as how developers can check HTTP headers, cookies, and related data via browser extensions like Firebug, we would want same functionality exposed via Selenium to extract out with our tests for debugging or performance analysis, etc. rather than do it via separate tools in separate tests/scripts, etc.
daluu, thanks for helping me understand these issues better. I've not yet had a need for this type of functionality so you have really helped me to see better how it fits into the robotframework-selenium2library, what your needs are, and what greater possibilities there are for me to use the framework for.
There is a reason I think we need this feature:
On a webpage, a javascript execution trigger a http request. This happens typically when the webpage need send logging information to server. Such as following scenarios:
When user stay on one page for more than 3 seconds, it will send log to server
When user open a open a drop down menu and select a item, it will send log to server
And so on.
For this kind of scenarios, I can got two reason why robotframework-httplibrary is not suitable here.
The thing we need test is the behavior of javascript execution.
We need check if it works well in all kinds of browser.
It's may also be useful for testing/verifying AJAX web requests w/o simulating it w/ an external library/tool. But usually simulation is good enough though.
Has anyone tried to use BrowserMobProxy? That seems like it would help gather the information. It is not tied to Selenium and so should have its own library for Robot Framework.
I came across browser mob some days back from this link and was not aware of its requirement at that time. From the glimpse, the snippet appears to use webdriver
That would be a good reference for a BrowserMob Proxy library. They're using BrowserMob's restful api. Thanks for the resource @rama-bornfree, I might do something with this!
I'm working on a BrowserMob Proxy library that would be more appropriate for this. As far as I'm concerned this is outside of the scope of S2L so I'm going to close it.
Activity
emanlove commentedon Dec 22, 2011
daluu, Have you seen the robotframework-httplibrary and it's various forks? Some of this functionality might already be present there or more appropriate for that library.
daluu commentedon Dec 23, 2011
emanlove, yes, I've heard of that library, but didn't check out the forks. Nevertheless, it doesn't quite fit with the issue here. This issue is about doing testing with WebDriver and at the same time being able to query for the browser data such as HTTP headers and as a result of that also extrapolate timing statistics.
This was possible as part of Selenium RC via captureNetworkTraffic option. It isn't available to WebDriver and must be extended via third party tools unless it is somehow incorporated in future WebDriver releases.
But you are right that if I just wanted pure HTTP request/response testing, I could use the mentioned library or similar.
While the use case of this issue is not a widely requested or needed feature, it does have its uses. Same as how developers can check HTTP headers, cookies, and related data via browser extensions like Firebug, we would want same functionality exposed via Selenium to extract out with our tests for debugging or performance analysis, etc. rather than do it via separate tools in separate tests/scripts, etc.
emanlove commentedon Dec 23, 2011
daluu, thanks for helping me understand these issues better. I've not yet had a need for this type of functionality so you have really helped me to see better how it fits into the robotframework-selenium2library, what your needs are, and what greater possibilities there are for me to use the framework for.
lsjuanny commentedon Feb 4, 2012
There is a reason I think we need this feature:
On a webpage, a javascript execution trigger a http request. This happens typically when the webpage need send logging information to server. Such as following scenarios:
And so on.
For this kind of scenarios, I can got two reason why robotframework-httplibrary is not suitable here.
daluu commentedon Dec 18, 2012
It's may also be useful for testing/verifying AJAX web requests w/o simulating it w/ an external library/tool. But usually simulation is good enough though.
ombre42 commentedon Nov 9, 2013
Has anyone tried to use BrowserMobProxy? That seems like it would help gather the information. It is not tied to Selenium and so should have its own library for Robot Framework.
daluu commentedon Nov 10, 2013
That would be nice if there was a BrowserMobProxyLibrary to combine with Selenium2Library for testing in this area.
SteveHarrison82 commentedon Jun 3, 2015
I would like to share the following link:
https://github.com/Work4Labs/selenium-simple-test/blob/72569ee775425273859b36c201508a973ce2db00/src/sst/actions.py.
I came across browser mob some days back from this link and was not aware of its requirement at that time. From the glimpse, the snippet appears to use webdriver
just-be-dev commentedon Jun 3, 2015
That would be a good reference for a BrowserMob Proxy library. They're using BrowserMob's restful api. Thanks for the resource @rama-bornfree, I might do something with this!
SteveHarrison82 commentedon Jun 3, 2015
Welcome, I will try to understand the snippet
just-be-dev commentedon Jul 17, 2015
I'm working on a BrowserMob Proxy library that would be more appropriate for this. As far as I'm concerned this is outside of the scope of S2L so I'm going to close it.