vendredi 21 août 2015

Cannot select specific result in Search using Protractor - AngularJS

I'm trying to select a specific company from a dropdown list for an automated test. I need to be able to select the exact same company each time. The current script I have only selects the 2nd child in the list so if the list is updated or changed, the script breaks so I'd like to find a way to select the exact company I want regardless of where it sits in the list. This is what Inspect Element in Chrome shows when I look at the company name in the list. The company in this case is Test Master. Site is primarily AngularJS.

<span class="company-name ng-binding" bind-html-unsafe="match.model.name.length > 40 ? (match.model.name.substr(0,40) + '...').toLowerCase() : match.model.name.toLowerCase() | typeaheadHighlight:query"><strong>test master</strong></span> 

Aucun commentaire:

Enregistrer un commentaire