You need to set the id attribute on the submit button. You appear to be searching for it by the name "OK", so use that.
-Mike On 3/20/06, ZedroS Schwart <[EMAIL PROTECTED]> wrote: > Hi all > > I'm trying to use htmlunit to test my Tapestry app. > > Until a few time ago, it was going well : I could access the page, assert > some values and so on. Then I wanted to submit some values... I ge't the > error : > com.gargoylesoftware.htmlunit.ElementNotFoundException: elementName=[input] > attributeName=[name] attributeValue=[OK] > > The interesting part of my Tests.java is, I think : > URL url = new URL("Path"); > page = (HtmlPage) client.getPage(url); > HtmlForm form = page.getFormByName("inscriptionForm"); > HtmlTextInput login = (HtmlTextInput) form.getInputByName("login"); > login.setValueAttribute("4car"); > HtmlSubmitInput ok = (HtmlSubmitInput) form.getInputByName("OK"); > > On the page file I have (extracts) : > <property name="login"/> > > <component id="inscriptionForm" type="Form"> > <binding name="listener" value="listener:onOk"/> > <binding name="delegate" value="beans.delegate"/> > </component> > > <component id="login" type="TextField"> > <binding name="value" value="login"/> > <binding name="validators" value="validators:required,minLength=6"/> > > </component> > > On the html page I've (extracts): > <form jwcid="inscriptionForm" > > <tr> > <td width="200"><label>Login (6 car min) :</label></td> > <td><input jwcid="login" type="text" /></td> > </tr> > <tr> > <td><input value="OK" type="submit" /></td> > > Of course, my application works fine when manually testing it. > > Could you please help me launch this "ok" button ? > > Thanks in advance > ZedroS > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]