[Webtest] a problem with setSelectField

Paul King webtest@lists.canoo.com
Sat, 15 Oct 2005 11:38:32 +1000


Paul King wrote:
> This is a bug in WebTest. I'll investigate.

Should be fixed in R1009.

> ilya.preygel@novartis.com wrote:
> 
>> Sorry, the same with a correction in the name of the select field:
>>
>> I have the following HTML form where two select fields are named the same
>>
>>  <form>
>>      <select name="ynList" size="1" id="ynList">
>>         <option value="Yes" selected="selected">Yes</option>
>>         <option value="Yes">No</option>
>>      </select>
>>      <select name="ynList" size="1" id="ynList">
>>         <option value="Yes">Yes</option>
>>         <option value="No" selected="selected">No</option>
>>      </select>
>>    </form>
>>
>> The following  step, checking for the text in the second select box
>> (fieldIndex=1), works without problems.
>>
>> <verifySelectField  description="verify 2nd select field"  name="ynList"
>> text="No" fieldIndex="1"/>
>>
>> but an attempt to set a value in the same select box using the same
>> fieldIndex=1
>>
>> <setSelectField  description="set 2nd select field"  name="ynList" text=
>> "Yes" fieldIndex="1"/>
>>
>> fails with a message "com.canoo.webtest.engine.StepFailedException: Can't
>> set field with index '1', valid range is 0..0, Step: SetSelectField".
>>
>> Is this a bug or I'm doing something wrong? How do I select 'Yes' in the
>> second select field?
>>
>> - Ilya Preygel
> 
> 
> 
> _______________________________________________
> WebTest mailing list
> WebTest@lists.canoo.com
> http://lists.canoo.com/mailman/listinfo/webtest
> 
>