Hi,
I am working with a country dropdown list in JS which triggers on selection a
AJAX code to populate a field below it .
The piece of source looks like this.
<select name="CountryId" onchange="javascript:getAlignmentName()"
style="50%"><option value="" selected="selected">
</option>
<option
value="243">Brazil</option>
<option value="244">Chile</option>
<option value="245">China</option>
<option value="268">India</option>
<option value="246">Egypt</option>
</select>
</td>
<td></td>
>From the WebTest recorder,I select the Country as Brazil but I get the script
>as :
<setSelectField name="CountryId" text="Brazil"/>
which is not good enough for WebTest to parse through.
So,as seen in the example in
docs(http://webtest.canoo.com/webtest/manual/setSelectField.html),I tweaked it
to
<setInputField description="Select a country: *" name="CountryId"
value="Brazil"> </setInputField>
My test now read like this
<webtest name="Test1- SR2.0">
<config>
<option name="ThrowExceptionOnScriptError" value="false" />
</config>
<invoke url="http://10.12.91.213:7001/sr2/login.do"
description="Login "/>
<verifyTitle text="Home"/>
<setInputField description="Select a country: *" name="CountryId"
value="Brazil"> </setInputField>
<setInputField name="alignmentVO.operatorName" value="Delta"/>
<clickButton label="Next"/>
<verifyText description="Verify that text is contained in the page"
text="Brazil "/>
<verifyText description="Verify that text is contained in the page"
text="Delta-Brazil"/>
</webtest>
Even this script doesn't get through successfully.
I am not sure what's going wrong in here.
Has anyone got around a similiar issue?
Regards,
Vishal
_________________________________________________________________
Wish to Marry Now? Click Here to Register FREE
http://www.shaadi.com/registration/user/index.php?ptnr=mhottag