This is a migrated thread and some comments may be shown as answers.

MVC DropDown content verification.

1 Answer 54 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stuart
Top achievements
Rank 2
Stuart asked on 18 Mar 2015, 07:18 PM
Trying to verify the content of a standard MVC dropdown using Test Studio.

Here's the DOM

<select id="PartnerSelectId" name="PartnerId" style="width: 240px" class="valid">
<option value="22">Bank B</option>
<option value="24">Bank C</option>
<option value="23">Switch A</option>
<option value="66">Telerik Test Partner</option>
</select>

Looking to verify if Telerik Test Partner exists, and hopefully will use this in an If/Else block to delete it if it does so that we can add it in again during the test.


Any help would be appreciated.

1 Answer, 1 is accepted

Sort by
0
Accepted
Cody
Telerik team
answered on 18 Mar 2015, 11:43 PM
Hi Stuart,

Verifying that a <select> element has a specific option is actually pretty easy. Here's a video demonstration:
http://screencast.com/t/MBfNXnOOe


Regards,
Cody
Telerik
 
The New Release of Telerik Test Studio Is Here! Download, install,
and send us your feedback!
Tags
General Discussions
Asked by
Stuart
Top achievements
Rank 2
Answers by
Cody
Telerik team
Share this question
or