Does anyone have a better way to find and click a button on a webpage using javascript? I have been using the click on an image action. It works fine but I find it a bit less efficient.
What I am trying to achieve here to click a "Book" button as soon as it appears.
I understand that each button associates with different number that pops up has a unique id (i'm no expert at all)
This site is behind a password so I won't be able to provide the actual url.
For example:
The "Book" button that I circled above and its html is
<input type="button" id="btnBook_2023-09-05_21" name="btnBook_2023-09-05_21" value="Book" onclick="bookslots.bookSlot(this)">
Where as the html for this book button below is
<input type="button" id="btnBook_2023-09-05_22" name="btnBook_2023-09-05_22" value="Book" onclick="bookslots.bookSlot(this)">