Hi Michael

That was the best thread on the mailing list for a long time ;-)

If you don't need the value of #{selectBox} in an other place, you may even try to use something like:
<setSelectField
        xpath="//[EMAIL PROTECTED]'#{stage.name}']/following-sibling::td/select"
        text="${chewi.release.stage2.name}"
        />

Best
        dna

On 13 août 07, at 11:39, Michael Habbert wrote:

Hi all,

I found a way to access the selectbox directly with xpath, so I do not need the row-number any more.

-------------------
<storeXPath description="get the selectbox-name for the new element"
xpath="//[EMAIL PROTECTED]'#{stage.name}']/following-sibling::td/select/ @name" property="selectBox" /> <setSelectField description="Select option Rel Stage Name 2" name="# {selectBox}"
   text="${chewi.release.stage2.name}" />
-------------------

thanks to everybody - thinking about my request - I found the solution by my own.

The trick is the right, smart xpath-expression.

yours

Michael Habbert

Michael Habbert wrote:
Hi again;-),
what I want to achive is:
there is a row inside my table with
one field with my new string - helps me to identify the line (and extract the row-number) and
one select-box I want to change.
my old doing was:
1. Identify the row by accessing the id-tag of the first element identified by my well-known string. 2. change the value of the select-box in this row (and no element in any other row ;-). <setSelectField description="Select option Rel Stage Name 2" name="dependency[#{row.number}].releaseStageID" text="$ {chewi.release.stage2.name}" /> this is may be a better introduction to the first request for support with my webtest-improvement.
thanks,
Michael Habbert wrote:
Hi all,

I run into a webtest-failure caused by a change in the jsp- page ;-) I did. So I'm thinking about change the the test who uses a storeRegEx to identify the line-number of an element I added to the list bevor:
---------------
<storeRegEx description="extract the row-number of the last cr- stage-row." text="&lt;td\sid=&quot;row(\d)&quot; \sclass=&quot;tabelle&quot;\swidth=&quot;300&quot;\stitle=&quot;# {stage.name}&quot;&gt;" group="1" property="row.number" propertyType="dynamic" />
----------------------

so this time the html-code changed on space did become a newline.

Is there a way to extract the line-number coded into the id-tag of the td-tag for example:
<td id="row7" ...bla...bla>

If I identify the value with storeXPath I do have: row7 whereas storeRegEx gives me 7. Any Ideas who to get the seven using storeXPath? or I am stuck with storeRegEx and adjust over and over again?

thanks for all ideas.




--
Mit freundlichen Grüßen

Michael Habbert

_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

--
Are you confusing a structure definition with some pixel
layout system?  HTML is not a pixel layout system.
  -- Tom Christiansen in <[EMAIL PROTECTED]>


_______________________________________________
WebTest mailing list
[email protected]
http://lists.canoo.com/mailman/listinfo/webtest

Reply via email to