not able to select element

72 Views Asked by At

I was able to select an element using ng-repeat but the developers have used virtual repeat as such the following code does not work now

expect(stores.listStores(0).getText()).toContain('Prahran');
expect(element.all(by.repeater('store in ui.stores')).count()).toEqual(1);

Failed: Index out of bound. Trying to access element at index: 0, but there are only 0 elements that match locator by.repeater("store in ui.stores")

1

There are 1 best solutions below

0
On BEST ANSWER

You can make a CSS selector to match the material design repeater elements:

element.all(by.css('[md-virtual-repeat="store in ui.stores"]'));