Hi
  Hope you have already found the answer. You can use xpath something on the
lines of xpath="//inp...@id^=amount][1] "

<setInputField

      description="BTOTransportCostAmount on CostDetail page: "

       xpath="//inp...@id^=amount][1] "

      value="120"

/>

  The above expression will select the first input field that has an id
starting with amount

Regards
Hari

On Fri, Jan 2, 2009 at 8:45 PM, David Jehoul <[email protected]>wrote:

>  Hello,
>
> I hope this question has a simple answer.
>
> The webpage that I have to test contains elements with names that are
> dynamically build. For example, there is an amount field that is called
> "amountX" where X can be a number between 0 and 9. The value is not known in
> advance.
>
>
>
> It will always be the first field in the webpage that starts with "amount".
>
>
>
> I'm looking for a solution where I can use the following:
>
>
>
> <setInputField
>
>       description="BTOTransportCostAmount on CostDetail page: "
>
>       name="amount"
>
>       value="120"
>
> />
>
>
>
> In this case, the name property does not match e.g. the field with name
> "amount0". I tried with name="amount*" but that does not match either.
>
>
>
> Thanks for the help!
>
>
>
> David
>
>
>

Reply via email to