Element.All()
E-commerce - to get the count of all products we use count ()-method.
Number of element
eg: element.all(by.cs("tag[att='value']")).count();
Get by index:
element.all(by.cs("tag[att='value']")).get(0).click();
//first and last:
element.all(locator).first();
element.all(locator).last();
Add assertions to this
expect(element.all(by.cs("tag[att='value']")).count()).toEqual(7));
Comments
Post a Comment