Salut Guillaume,

Could you please try with latest HtmlUnit release (just override dependency in 
your pom if you are using Maven). JWebUnit is just an API, and it's HtmlUnit 
that is responsible for dealing with this kind of problematic.

You could also open a bug with a minimal test case on sourceforge.

++

Julien

----- Message d'origine ----
De : MOUNIE Guillaume <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Vendredi, 26 Octobre 2007, 16h29mn 05s
Objet : [JWebUnit-development] question on login password with JWebUnit

Hello,

I am writing tests with JWebUnit in order to test an application on which we 
start to enter a login and password. The problem is that the password uses a 
special enctype not recognized by JWebUnit. We cannot change the enctype 
because the authentification page belongs to another informatic service. This 
is the enctype: 
encType="application/x-www-form-urlencoded;charset=UTF-8"

How can I solve this problem?

Here is my JWebUnit class:

import net.sourceforge.jwebunit.junit.WebTestCase;
import
 net.sourceforge.jwebunit.util.TestingEngineRegistry;

public class TestJWebUnit extends WebTestCase {

        public void testMainPageLinks() throws Exception {
                
setTestingEngineKey(TestingEngineRegistry.TESTING_ENGINE_HTMLUNIT);
                getTestContext().setBaseUrl(
                "http://localhost:8080/application";);
                beginAt("/home.do");
                
                setTextField("username", "toto");
                setTextField("password", "pass");
                submit();
                assertTitleEquals("Bienvenue!");
        }
}

Thank you by advance for your answer.

Ys

Guillaume



      

       
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 





      
_____________________________________________________________________________ 
Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail 
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development

Reply via email to