how to button.click

So you are using rvest then. I've edited your tags, but you should note that in your post.

Maybe have a look at these?