VS 2005 Team System Webtest ValidationRule on an asp:dropdownlist control

With this html:
<select name="ctl00$ContentPlaceHolder1$CompanyDropDownList" id="ctl00_ContentPlaceHolder1_CompanyDropDownList" class="Normal">
  <option selected="selected" value="1">All</option>
  <option value="2">Company 1</option>
  <option value="3">Company 2</option>
  <option value="4">Company 3</option>
  <option value="5">Company 4</option>
  <option value="6">Company 5</option>
 </select>

In my webtest I wanted to verify CompanyDropDownList had selected option 2 "Company 1".
Tried Form Field with form field name ctl00$ContentPlaceHolder1$CompanyDropDownList but it did not work.

Using Required Attribute Value worked with the following values:

Attribute Name             value
Expected Value            2
Ignore Case                  False
Match Attribute Name    selected
Match Attribute Value    selected
Tag Name                     option

Comments

Popular posts from this blog

.NET generics with private accessors not compatible with MSTest

Microsoft.ApplicationBlocks. ExceptionManagement The event source x does not exist error

404 error in a REST WCF service