Bugs item #693598, was opened at 2003-02-26 07:22
Message generated for change (Comment added) made by jimweaver
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=693598&group_id=61302

Category: None
Group: None
>Status: Deleted
>Resolution: None
Priority: 7
Submitted By: Markus (sorcerer13)
Assigned to: Nobody/Anonymous (nobody)
Summary: setLocale has no effect

Initial Comment:
Setting a new locale using setLocale() in WebTester has 
no effect. getLocale() returns the locale set with 
setLocale(), but the locale "en_US" is sent to the server.

Here is the code:
public void setUp()
{
  System.out.println ("old locale: " + getTestContext
().getLocale ());
  getTestContext().setLocale (Locale.GERMAN);
  getTestContext().setBaseUrl(BASE_URL);
                
  System.out.println ("new locale: " + getTestContext
().getLocale ());
}



----------------------------------------------------------------------

>Comment By: Jim Weaver (jimweaver)
Date: 2004-09-14 14:21

Message:
Logged In: YES 
user_id=619947

Hi,

My statement a year ago was incorrect in any case, the
locale on TestContext has nothing to do with HttpUnit - it
is only used for accessing property files by locale.

There is some documentation about using HttpUnit with
alternate character sets at
http://httpunit.sourceforge.net/doc/faq.html#charset.

I'm going to close this bug, because I'm not sure what
jWebUnit could/should do - as long as the httpunit stuff is
exposed.  If you have changes you'd like in regard to this -
please submit them as a patch or request for enhancment. 
Thanks!

----------------------------------------------------------------------

Comment By: Matt Raible (mraible)
Date: 2004-09-09 15:41

Message:
Logged In: YES 
user_id=226669

Here's a workaround that seems to work.  Add the code 
below to your setUp() method.

        getTestContext().getWebClient().setHeaderField
("Accept-Language", "de");

----------------------------------------------------------------------

Comment By: Jim Weaver (prospero2000us)
Date: 2003-09-22 14:26

Message:
Logged In: YES 
user_id=597548

This method was originally added to compare property file
values against html results.  It should also pass to
httpunit as the browser locale.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=693598&group_id=61302


-------------------------------------------------------
This SF.Net email is sponsored by: thawte's Crypto Challenge Vl
Crack the code and win a Sony DCRHC40 MiniDV Digital Handycam
Camcorder. More prizes in the weekly Lunch Hour Challenge.
Sign up NOW http://ad.doubleclick.net/clk;10740251;10262165;m
_______________________________________________
Jwebunit-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to