mercredi 25 février 2015

How to count total number of option of drop-down in protractor

I am trying to verify number of options of drop-down but it is not working. I have used the following code:



campaignManagementPage.statusDropDown().Count();
this.statusDropDown = function () {
return element(by.model('campaign.lifeStage'));
}


HTML for drop down is following:



<select class="form-control ng-pristine ng-valid ng-touched" data-ng- model="campaign.lifeStage">
<option value="design">Design</option>
<option value="preview">Preview</option>
<option value="live">Live</option>
<option value="completed">Completed</option>
</select>`

Aucun commentaire:

Enregistrer un commentaire