dimanche 28 juin 2015

How do I automate testing of the code (no IDs on many elements and a lot of elements with the same class names)?

I'm trying to automate testing of the code: Well, written without testing in mind (no IDs on many elements, and a lot of elements with the same class names).

<th class="k-header k-filterable k-with-icon" scope="col" data-title="Package Detail" data-index="0" data-field="PackageDetail.Namee" data-role="columnsorter" data-dir="asc" aria-sort="ascending">

<a class="k-grid-filter" href="javascript:void(0)" tabindex="-1">
<span class="k-icon k-filter" style=""/></a>

<a class="k-link" href="/Valiadationrule/GetData?ValiadationruleGrid-sort=PackageDetail.Namee-asc">Package Detail<span class="k-icon k-i-arrow-n"/></a></th>

<th class="k-header k-filterable k-with-icon" scope="col" data-title="Category" data-index="1" data-field="Category" data-role="columnsorter">

<a class="k-grid-filter" href="javascript:void(0)" tabindex="-1">
<span class="k-icon k-filter" style=""/></a>

<a class="k-link" href="/Valiadationrule/GetData?ValiadationruleGrid-sort=Category-asc">Category</a></th>

<th class="k-header k-filterable k-with-icon" scope="col" data-title="Name" data-index="2" data-field="Name" data-role="columnsorter">

<a class="k-grid-filter" href="javascript:void(0)" tabindex="-1">
<span class="k-icon k-filter"/></a>

<a class="k-link" href="/Valiadationrule/GetData?ValiadationruleGrid-sort=Name-asc">Name</a></th>

Aucun commentaire:

Enregistrer un commentaire