Thanks Guillaume, I found an alternative, I used the
same input without id
<input type="checkbox" name="simpleDefectRate_enabled"
value="true"/>
and tried
uncheckCheckbox("simpleDefectRate_enabled");
checkCheckbox("simpleDefectRate_enabled","true");
It was able to find the checkbox name and works fine
now but for some reason I have to do uncheckCheckbox
and then checkCheckbox otherwise it was not able to
find the checkbox name.
Regards
Malathi
--- MOUNIE Guillaume <[EMAIL PROTECTED]>
wrote:
> Hello,
>
> You should try to put an
> id=âsimpleDefectRate_enabledâ in your input.
>
> ys
>
> Guillaume
>
>
> ----- Message d'origine ----
> De : malathi gopalan <[EMAIL PROTECTED]>
> Ã : [email protected]
> Envoyé le : Vendredi, 7 Décembre 2007, 1h53mn 38s
> Objet : [JWebUnit-development] checkCheckBox cannot
> find the name of the checkbox
>
> Hi,
>
> I am using jwebunit1.4.1
>
> I have checkbox defined as <input
> type=âcheckboxâ
> name=âsimpleDefectRate_enabledâ
> value=âtrueâ/>
>
> I tried
>
>
assertCheckboxPresent(âsimpleDefectRate_enabledâ,ââtrueâ);
>
> this works fine but
>
>
checkCheckbox(âsimpleDefectRate_enabledâ,âtrueâ);
> fails and gives the following stack trace
>
> java.lang.RuntimeException: No checkbox with name
> [simpleDefectRate_enabled] and value [true] was
> found
> in current form.
> at
>
net.sourceforge.jwebunit.htmlunit.HtmlUnitDialog.getCheckbox(HtmlUnitDialog.java:1523)
> at
>
net.sourceforge.jwebunit.htmlunit.HtmlUnitDialog.checkCheckbox(HtmlUnitDialog.java:1543)
> at
>
net.sourceforge.jwebunit.junit.WebTester.checkCheckbox(WebTester.java:1835)
> at
>
net.sourceforge.jwebunit.junit.WebTestCase.checkCheckbox(WebTestCase.java:1399)
> at
>
com.timestock.unittests.jwebunit.JWebUnitTest.testIncidentGeneratingRulesSettings(JWebUnitTest.java:80)
> 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
>
net.sourceforge.jwebunit.junit.WebTestCase.runBare(WebTestCase.java:58)
> 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.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
> at
>
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> at
>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
>
> Any help would be appreciated.
>
> Thanks in advance
>
> Regards
> Malathi
>
>
>
>
>
>
____________________________________________________________________________________
> Never miss a thing. Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
>
-------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php
> _______________________________________________
> JWebUnit-development mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
>
>
>
>
>
>
>
_____________________________________________________________________________
>
> Ne gardez plus qu'une seule adresse mail ! Copiez
> vos mails vers Yahoo! Mail http://mail.yahoo.fr>
-------------------------------------------------------------------------
> SF.Net email is sponsored by:
> Check out the new SourceForge.net Marketplace.
> It's the best place to buy or sell services for
> just about anything Open Source.
> http://sourceforge.net/services/buy/index.php>
_______________________________________________
> JWebUnit-development mailing list
> [email protected]
>
https://lists.sourceforge.net/lists/listinfo/jwebunit-development
>
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
JWebUnit-development mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jwebunit-development