I have the following Angular HTML code and I am trying to do end to end test via protractor for clicking on a dropdown.
Here is the html:
<ul class="dropdown-menu">
<li ng-repeat="currency in availableCurrencies">
<a href="#" class="ng-binding">USD</a>
</li>
<li ng-repeat="currency in availableCurrencies">
<a href="#" class="ng-binding">EUR</a>
</li>
<li ng-repeat="currency in availableCurrencies">
<a href="#" class="ng-binding">GBP</a>
</li>
</ul>
Here is the protractor/js code which is suppose to click EUR:
it('Change Currency to EUR',function(){
var curr_EUR = element.all(by.repeater('currency in availableCurrencies').row(1));
curr_EUR.click();
/*curr_EUR.element(by.linkText('EUR')).click();*/
});
Having trouble click on the element the error I am getting is:
ElementNotVisibleError: element not visible.
Can anyone point out where I am going wrong?
Aucun commentaire:
Enregistrer un commentaire