On a webpage, there is a collection of buttons. Each button has the same source code except for the link text.
I am looking to verify that all the buttons on the page are clickable using WebDriverWait.until. Currently, I can confirm the clickability of the first button with
WebDriverWait(driver,10).until(ec.element_to_be_clickable(By.XPATH,'//a[@class="ng-scope"]'))
But how do I ensure the second button is clickable without relying on its specific text (abc|efg)?
Does anyone have suggestions on how to extract the index within the xpath? Thank you.
<li class="ng-scope" ng-report="one in typelist">
<a class = "btn ng-binding" ng-class="{aabbcc}"> abc</a>
</li>
<li class="ng-scope" ng-report="one in typelist">
<a class = "btn ng-binding" ng-class="{aabbcc}"> efg</a>
</li>