dalekjs / dalek

[unmaintained] DalekJS Base framework
MIT License
695 stars 63 forks source link

Modifying the request header #113

Open vergissberlin opened 10 years ago

vergissberlin commented 10 years ago

What

It would be nice to manipulate the header of the request. Specifically, the attributes "Accept-Language" in order to test multi-language applications.

Why

Test multilanguage applications with auto language selection

How

Allow modifie the request from phantomjs and other drivers over configuration.

Example:

open("http://example.com", {"Accept-Language":"de-DE,de;q=0.8,en;q=0.4"})

Thank yoou!

asciidisco commented 10 years ago

Hey @vergissberlin,

thanks for the detailed request, I really appreciate that. The problem is thought, that the JSON Wire-Protocol (as well as the Webdriver Spec) strictly forbid to change headers - therefor there is no way to do this by setting headers. What I can think of is a way to modify the browser configuration before we can launch it, that at least makes it possible to set the language.