In the page are many submit buttons with label "Add to Cart". I would like to select the first add to cart button. What is the best way to match the first add to cart button? The buttons are defined as follows. They are submit buttons with label "Add to Cart"
<input type="submit" name="commit" value="Add to Cart">
I have tried
all('input[type="submit"]')[0]
This will select the first submit button. How can i also make sure it has label "Add to Cart"? Thanks!