[Webtest] Input Fields, still have the problem

Brandon Moore webtest@lists.canoo.com
Fri, 18 Jul 2003 14:09:03 -0500


You want to read the default value of the field?
then you should probably use storexpath:

<!- any xpath that specifies the value attribute of the input should
work -->
<storexpath
xpath="//td[@class='txt']/input[@name='PartnerVO.partnerNummer']/@value"
	property="partnerNummer" />
<setinputfield %otherField
	value="#{partnerNummer" />

I don't know about the button. Looking at the HTML it seems you could
reorganize the
page to do the processing in the forms onsubmit action, and change the
button to
a normal submit button. Your button doesn't have a label or a name so I
don't think
you can identify it in a clickbutton step. The code for clickbutton is
excessively
complicated (There are five classes just for the task of locating a
button!), but I
think it only searches for submit buttons. Another problem is that webtest
decides to
store form parameters itself, rather than passing them to httpunit. This
means that
the form parameters in httpunit have to be resynchronized before javascript
will
execute correctly, and also means that your test will die if you set values
on
more than one form (at least as of 284). I'm not sure if an onclick action
will
execute correctly, even if the button is found. Can anyone explain the
design
decision to duplicate httpunit's functionality?

Brandon

-----Original Message-----
From: webtest-admin@lists.canoo.com
[mailto:webtest-admin@lists.canoo.com]On Behalf Of Baum, Oliver
Sent: Friday, July 18, 2003 6:57 AM
To: 'webtest@lists.canoo.com'
Subject: AW: [Webtest] Input Fields, still have the problem


Thanks, but I still have the problem.

Maybe you can send me an example?

HTML:

<td class="txt"><input type="text" readonly  maxlength="9" size="9"
name="PartnerVO.partnerNummer" value="1000490" class="input_text_kurz"
style="text-align:right;background-color : #C2E2C4;border-color :
#999999;color : #333333;" tabindex="-1">

I want to read the PartnerVO.partnerNummer and want to put this number in an
other input field.



And can you tell me (I'm a beginner) how I can manage javascript? There is a
button on the page and I want to click it. It's not a submit button and
behind the button it is a javascript command.


<button class="nav" accesskey="w" id="weiter_button"
onClick="javascript:submitForm('Weiter')"><u>W</u>eiter</button>


Thanks
Olly



-----Ursprüngliche Nachricht-----
Von: Dierk Koenig [mailto:dierk.koenig@canoo.com]
Gesendet: Freitag, 18. Juli 2003 10:55
An: webtest@lists.canoo.com
Betreff: RE: [Webtest] Input Fields


Hi Olly,

look into the storeregex or storexpath step.
You can use it's dynamic property for a following setinputfield.

cheers
Mittie

> -----Original Message-----
> From: webtest-admin@lists.canoo.com
> [mailto:webtest-admin@lists.canoo.com]On Behalf Of Baum, Oliver
> Sent: Freitag, 18. Juli 2003 9:56
> To: 'webtest@lists.canoo.com'
> Subject: [Webtest] Input Fields
>
>
> Hi
>
> Can somebody tell me, how I can read informations from an input field and
> store the information in an other input field?
>
> Olly
>
> *************************************************************
> WWK Lebensversicherung  a.G.
> IT Anwendungs-Systementwicklung
> Marsstrasse 37
> 80292 Muenchen
>
> Telefon: 089 / 5114 2932 o. 3284
> Fax: 089 / 5114 2762
> **************************************************************
>
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
>
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest
_______________________________________________
WebTest mailing list
WebTest@lists.canoo.com
http://lists.canoo.com/mailman/listinfo/webtest