- From: David Burns <dburns@mozilla.com>
- Date: Thu, 08 Nov 2012 15:41:46 +0000
- To: Karl Dubost <karld@opera.com>
- CC: public-browser-tools-testing@w3.org
Personally I don't think changing HTTP headers belongs in the WebDriver spec. The WebDriver spec deals with making the browser automateable and trying to emulate the user. Changing headers does not fit in with those goals. Changing headers can easily be done via adding a proxy in the middle between the browser and the web pages under test and this is how people using the OSS WebDriver currently do that. David On 08/11/2012 12:29, Karl Dubost wrote: > Hi, > > When doing testing on Web pages, it is useful to be able to preset the HTTP request headers. The resource representation returned by the server will be different depending on these headers. It is happening for example in the case of an Accept-Language header (but not only). > > Accept-Language: en > Accept-Language: fr > > will return different contents with different properties. Some headers, some markup, style definitely (size of the text and then boxes), cookies, etc. > > For example, same resource and two different representations one with the content in French the other with the content in English. > > → curl -sI -H "Accept-Language: fr" http://www.opera.com/ > > HTTP/1.1 200 OK > Date: Thu, 08 Nov 2012 12:27:17 GMT > Server: Apache > Content-Type: text/html; charset=utf-8 > Set-Cookie: language=none; path=/; domain=www.opera.com; expires=Fri, 10-Aug-2012 12:27:17 GMT > Set-Cookie: language=fr; path=/; domain=.opera.com; expires=Sun, 06-Nov-2022 12:27:17 GMT > Vary: Accept-Encoding > > → curl -sI -H "Accept-Language: en" http://www.opera.com/ > > HTTP/1.1 200 OK > Date: Thu, 08 Nov 2012 12:27:27 GMT > Server: Apache > Content-Type: text/html; charset=utf-8 > Set-Cookie: language=none; path=/; domain=www.opera.com; expires=Fri, 10-Aug-2012 12:27:27 GMT > Set-Cookie: language=en; path=/; domain=.opera.com; expires=Sun, 06-Nov-2022 12:27:27 GMT > Vary: Accept-Encoding > > > It would be good to allow to set those headers before the HTTP Request. > > > PS: This comment is based on reading > WebDriver > W3C Editor's Draft 08 November 2012 > http://dvcs.w3.org/hg/webdriver/raw-file/tip/webdriver-spec.html > >
Received on Thursday, 8 November 2012 15:42:21 UTC