[Webtest] a problem with setSelectField
webtest@lists.canoo.com
webtest@lists.canoo.com
Fri, 14 Oct 2005 18:07:33 -0400
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
|---------+----------------------------->
| | Ilya |
| | Preygel/PH/Novarti|
| | s@PH |
| | Sent by: |
| | webtest-admin@list|
| | s.canoo.com |
| | |
| | |
| | 10/14/2005 06:02 |
| | PM |
| | Please respond to |
| | webtest |
| | |
|---------+----------------------------->
>-----------------------------------------------------------------------------------------------------------------------------|
| |
| To: webtest@lists.canoo.com |
| cc: (bcc: Ilya Preygel/PH/Novartis) |
| Subject: [Webtest] a problem with setSelectField |
>-----------------------------------------------------------------------------------------------------------------------------|
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=
"arrControlGroup" 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="arrControlGroup"
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