I have an HTML like this:
"<div **id="xx-abc-list-1"**>
<button ng-reflect-class-base="icon component" **id="xx-abc-list-button-2"**><span class="mat-button-wrapper">
</div>
<div **id="xx-abc-list-2"**>
<button ng-reflect-class-base="icon component" **id="xx-abc-list-button-2"**><span class="mat-button-wrapper">
</div>"
Now, i wanted to get the list of all the elements ending with id = xx-abc-list- only so i used the below code.
@FindBy(xpath = "//*[contains(@id,'xx-abc-list-')]");
List<WebElement>;
But this gives me 4 count considering other elements (xx-abc-list-button-) as well.
What should i modify in my above code to get just 2 values that i need?