Bugs item #1991841, was opened at 2008-06-12 13:21
Message generated for change (Settings changed) made by henryju
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=497982&aid=1991841&group_id=61302

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
>Status: Deleted
>Resolution: Duplicate
Priority: 5
Private: No
Submitted By: JavaSquall (javasquall)
Assigned to: Nobody/Anonymous (nobody)
Summary: submit(buttonName, buttonValue) doesn't work

Initial Comment:
I have a big Problem
in my jsp site there are som submit buttons


<div id="button_left"><a href="" id="précédent" 
class="button_vor">Précédent</a></div>
<div id="button_middle"><input type="submit" class="button_vor" 
name="btnsubmit" value="Aperçu" id="aperçu"></div>
<div id="button_right"><input type="submit" class="button_vor" name="btnsubmit" 
value="Suivant" id="suivant"></div>

i want to press the last one with name="btnsubmit" and value="Suivant"

but the method
submit("btnsubmit", "Suivant") 
doesn't work

junit.framework.AssertionFailedError: Submit Button [btnsubmit] with value 
[Suivant] not found.
        at junit.framework.Assert.fail(Assert.java:47)
        at junit.framework.Assert.assertTrue(Assert.java:20)
        at 
net.sourceforge.jwebunit.junit.WebTester.assertSubmitButtonPresent(WebTester.java:1595)
        at net.sourceforge.jwebunit.junit.WebTester.submit(WebTester.java:2296)
        at 
net.sourceforge.jwebunit.junit.WebTestCase.submit(WebTestCase.java:1752)
        at xxxxx.xxxx(xxxx.java:191)
        at xxxxx.xxxx(xxxx.java:703)
        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:597)
        at junit.framework.TestCase.runTest(TestCase.java:164)
        at junit.framework.TestCase.runBare(TestCase.java:130)
        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:120)
        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)


if i use clickButton("suivant") the test doesn't fail but the submit button is 
not pressed....
i know that because after clicking the button is still remain on the same page.
if i click through the application by hand everything is working fine.

how can i press a submit button if i have more than one submit button in my 
form and if they have the same name?
whats with a method submit(buttonId).

if there is any other way of clicking the button EXCEPT XPATH please let me 
know..

this is really important for me because i writing my diploma over automated 
testing with jwebunit and it also includes a practical part

so please respont to
[EMAIL PROTECTED]

thx in advance

kr
squall

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

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

-------------------------------------------------------------------------
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

Reply via email to