2 Answers
2

If you're trying to find an element on a page that is dynamically generated, you can use XPath or CSS selectors to find that element. The selector needs to be general enough to capture all possibilities of the dynamic element while being specific enough to not match another element on the page. This usually works best by assigning an ID to the button when possible.

If you're referring to checking the contents/properties of the button with Selenium, that should be fairly straightforward. Once you have the correct selector, you should be able to access the inner HTML (or any other information you want about that element, really).