<?xml version="1.0" encoding="UTF-8"?>

<test id="wml2/uabehaviour/formprocessing/forminitialisation/menucontrol/30" 
	class="A" scope="wml2" testtype="application" type="manual" 
	source="wml2#5.4.2.3" device="both">
  <assertion>When the WML:INAME, attribute of the SELECT element is 
  assigned, the SELECTED attribute of the OPTION element must be ignored. 
  </assertion>
  <specnote>Create a card with three OPTION elements within a SELECT 
  element. Set the value of the WML:INAME attribute of the SELECT element 
  to the name of a variable whose value is '2' and the MULTIPLE attribute 
  to 'multiple'. Set also the SELECTED attribute of one of the other 
  option to 'selected'. Make sure that the only one pre-selected option 
  is the option referenced by the WML:INAME variable, e.g. the second 
  option.
  </specnote>
  <results>
    <result>
      <name>submit</name>
      <value>yes</value>
    </result>
  </results>
  <method>
		<![CDATA[
			<wml:card id="main" title="main" newcontext="true">
  			<wml:onevent type="enterforward">
    			<wml:go href="#card2">
      			<wml:setvar name="ichoice" value="2" />
    			</wml:go>
  			</wml:onevent>
				[[auto_failed]]
			</wml:card>
			<wml:card id="card2" title="card2">
				<form action="#card3">
     			<fieldset>
  					<p>Choice</p>
    				<select wml:name="choice" wml:iname="ichoice" multiple="multiple">
      				<option value="plane">Airplane</option>
      				<option value="train">Railway</option>
      				<option value="car" selected="selected">Automobile</option>
    				</select>
    			</fieldset>
  				<fieldset>
   					<input type="submit" value="submit" />
   				</fieldset>
   			</form>
  			<p>Is the initial value of the control only &quot;Railway&quot;?
  				<br/>
  				[[yesno]]
  			</p>
			</wml:card>
		]]>
  </method>
</test>
