In some of the book the buttons are added in the page Class e.g
button(:add_to_cart, value: 'Adopt Me!')
There is no click event (.click) and the button is called from the steps with
How does the call know that I am clicking the button
When we did the same with a method in the Class the method contained the .click event e.g.
def select_puppy_number(num)
button_element(value: 'View Details', index: num - 1).click
end
This makes more sense as the method is called and the click event is instigated. How does it know though that we are clicking the button on the first Adopt Me button?