Hi again,

I figured out myself how to set the Accept-Language header for the browser.
After looking through the canoo source code, I just found out that the header 
properties can't be set in webtest.properties. Therefore it has to be set in 
the test itself. This means for my groovy class:

   void setUp() {
       ant.config(summary: true) {
           header name: 'Accept-Language', value: "de"
       }
   }

It would be a great feature to allow header properties to be set in 
webtest.properties.

Besides, I found this page isn't really helpful, because the information is 
very out-dated:

http://grails.org/Functional+Testing

For example, after creating a webtest, there aren't these folders at all:
- home
- reports
- tests
   - steps

When using grails, how can I define steps or how can I change TestSuite.groovy 
(because this file doesn't exists)? The best tools aren't helpful or valuable, 
if no one knows how to use it. It would be great to keep the docs up to date. 
Really appreciate your efforts, many thanks.

Best regards,
Daniel


Am 25.11.2010 um 16:00 schrieb Daniel Plappert:

> Hi Alexandre,
> 
> thanks for your help, but I already saw this page. The problem is, that I am 
> using canoo webtest with grails, which means, I haven't got a xml file for my 
> configuration, just the webtest.properties. My problem is, that I don't know 
> how to "modify" the header with this property file. I can write something 
> like this:
> 
> wt.config.header["Accept-Language"]=de
> 
> but this didn't change the header. And because my application accepts 
> different languages, I have to modify the header.
> 
> Best regards,
> Daniel
> 
> 
> Am 25.11.2010 um 15:39 schrieb Alexandre Goyard:
> 
>> 2010/11/25 Daniel Plappert <[email protected]>:
>>> Hi all,
>>> 
>>> I need to change the default Accept-Language header for my web test,
>>> haven't figure out how to do it exactly. I am using canoo-webtest-plugin 
>>> for grails.
>>> 
>>> My webtest.properties looks like this:
>>> 
>>> wt.config.host = localhost
>>> wt.config.port = 8080
>>> wt.config.protocol = http
>>> .
>>> .
>>> .
>>> wt.config.showhtmlparseroutput = true
>>> wt.webtestMonitor.skip = skip
>>> 
>>> Can someone please let me know how to set the Accept-Language header
>>> here properly? Many thanks for your help.
>>> 
>> 
>> Hi Daniel,
>> 
>> Read this page : http://webtest.canoo.com/webtest/manual/config.html
>> There is a example ofr change Accept-Language.
>> 
>> -- 
>> Alexandre Goyard
>> 
> 
> 
> _______________________________________________
> WebTest mailing list
> [email protected]
> http://lists.canoo.com/mailman/listinfo/webtest
> 

-- 
Denkformat GmbH&Co.KG
Brandsende 2-4
20095 Hamburg
------------------------------------------------------------
url:   www.denkformat.de
email: [email protected]
fon:   +4940 226 300 781
fax:   +4940 226 300 798

Sitz der Gesellschaft:
Bienenkamp 3b
22159 Hamburg
fon:   +4940 414 812 69
fax:   +4940 414 812 70
Amtsgericht Hamburg: HRA 97215

Komplementär       : Denkformat Beteiligungsgesellschaft mbH
Amtsgericht Hamburg: HRB 84324  

Geschäftsführer:     Lars Graetke, Thomas Kunzmann

Reply via email to