I'm facing an issue with my carousel image that changes based on the customer GUID I am currently viewing. While I have successfully implemented this feature, it seems to stop working when placed inside a for loop.
Here is the code snippet:
var date = element(by.css('i.icon.left-arrow'));
browser.wait(EC.elementToBeClickable(date), 30000, "Date Range is still not clickable");
date.click(); // This works but only goes back once.
In an attempt to click through all elements in a for loop, I encountered some challenges. Is this the correct approach in Angular? Seeking guidance on this.
var backArrow = element.all(by.css('i.icon.left-arrow'));
for (var i=0;i<backArrow.length;i++) {
backArrow.click();
}
Below is the HTML element I am working with, which varies depending on the customer and can range from 1 to 50 images:
<i class="icon left-arrow"></i>