Reputation: 63
How would I be able to reference by index? I am trying to write automated tests to test an Angular 6 website.
element.all(by.css(".image-holder")).click();
Thanks in advance
Upvotes: 3
Views: 1514
Reputation: 4397
You can try identifying the tags by id
const div = element.querySelectorAll('div')[0];
Upvotes: 0
Reputation: 63
Don't worry managed to solve the problem
Here's the code for future reference:
element.all(by.css(".image-holder")).get(0).click();
Upvotes: 1