Hi,

When you say the drop down is dynamically populated, I suppose there is an event on country input that load state drop down ?

<select name="country" >....</select>

The problem is HttpUnit has a very limited support of _javascript_. Consider migrating to JWebUnit 1.3, which use HtmlUnit behind the scene.

++

Julien



----- Message d'origine ----
De : Ravi <[EMAIL PROTECTED]>
À : [email protected]
Envoyé le : Jeudi, 5 Octobre 2006, 15h00mn 10s
Objet : [Jwebunit-users] com.meterware.httpunit.IllegalParameterValueException

Hi,
 
I'm writing jwebunit test case for a page where a drop down is dynamically populated(Eg: The state drop down is populated only after the country is selected). When I run the test it is giving the following error.

com.meterware.httpunit.IllegalParameterValueException: May not set parameter 'selectCat' to 'sdjbcsdk'. Value must be one of: {  }
 at com.meterware.httpunit.SelectionFormControl$Options.reportNoMatches(FormControl.java :1189)
 at com.meterware.httpunit.SelectionFormControl$SingleSelectOptions.claimUniqueValues(FormControl.java:1375)
 at com.meterware.httpunit.SelectionFormControl$Options.claimUniqueValues(FormControl.java:1181)
 at com.meterware.httpunit.SelectionFormControl.claimUniqueValue(FormControl.java:1062)
 at com.meterware.httpunit.FormParameter.setValues(FormParameter.java:90)
 at com.meterware.httpunit.WebForm.setParameter(WebForm.java :614)
 at com.meterware.httpunit.WebForm.setParameter(WebForm.java:603)
 at net.sourceforge.jwebunit.HttpUnitDialog.setFormParameter(HttpUnitDialog.java:299)
 at net.sourceforge.jwebunit.WebTester.setFormElement( WebTester.java:789)
 at net.sourceforge.jwebunit.WebTestCase.setFormElement(WebTestCase.java:317)
 at test.jwebunitext.base.TestBase.setFormValues(TestBase.java:293)
 at test.jwebunitext.base.TestBase.processForm (TestBase.java:437)
 at test.TestJava.testSignupFlow1(TestJava.java:59)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java :39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:585)
 at junit.framework.TestCase.runTest(TestCase.java:154)
 at junit.framework.TestCase.runBare (TestCase.java:127)
 at junit.framework.TestResult$1.protect(TestResult.java:106)
 at junit.framework.TestResult.runProtected(TestResult.java:124)
 at junit.framework.TestResult.run(TestResult.java:109)
 at junit.framework.TestCase.run (TestCase.java:118)
 at junit.framework.TestSuite.runTest(TestSuite.java:208)
 at junit.framework.TestSuite.run(TestSuite.java:203)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java :478)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
 at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

 

Any pointers?

--
Regards,
Ravi
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users



Découvrez un nouveau moyen de poser toutes vos questions quel que soit le sujet ! Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. Cliquez ici.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys -- and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jwebunit-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-users

Reply via email to