5 messages in com.canoo.lists.webtestRe: [Webtest] a problem with setSelec...
FromSent OnAttachments
ilya...@novartis.com14 Oct 2005 15:01 
ilya...@novartis.com14 Oct 2005 15:07 
Paul King14 Oct 2005 16:56 
Paul King14 Oct 2005 18:38 
ilya...@novartis.com17 Oct 2005 07:16 
Subject:Re: [Webtest] a problem with setSelectField
From:Paul King (pau@asert.com.au)
Date:10/14/2005 06:38:10 PM
List:com.canoo.lists.webtest

Paul King wrote:

This is a bug in WebTest. I'll investigate.

Should be fixed in R1009.

ilya@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