Following is the AngularJS Code that I have used for Test Automation for a Web Application using Protractor... for example I want to click on dropdown item 3 and verfiy that I have selected option 3.
How should I do it ? The code doesn't show any error. I'm trying to automate using Angular JS
function seldrop(element, optionNum) {
console.log('in seldrop');
var selectDropdownbyNum = function ( element, optionNum ) {
if (optionNum){
var options = element.querySelectorAll('.dropdown-toggle')
.then(function(options){
options[optionNum].click();
});
}
}
}
it('put in values', function() {
const selector = seldrop(element,'3');
console.log('\n ✓ element selected') }});
});