What is the proper way in Protractor to test the number of li elements
inside a ul element?
I do this to verify that the ul is present:
var ul = element(by.tagName('ul')); // only have one on the page
expect(ul.isPresent()).toBe(true);
That part works.
Then I try this to verify the number of li elements.
It seems to complicated and it doesn't work.
var lis = ul.findElements(by.tagName('li'));
lis.then(
function (data) {
expect(data.length).toBe(1);
},
function (err) {
this.fail(err);
});
--
R. Mark Volkmann
Object Computing, Inc.
--
You received this message because you are subscribed to the Google Groups
"AngularJS" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/angular.
For more options, visit https://groups.google.com/d/optout.