Assign id to widget HTML block


Is there a way to assign an id to the div block of a particular widget?

The context is the following: I am writing some automated tests to a Streamlit application and I would like to use the id to find specific input widgets. As far as I could see, they have a custom class (".stRadio", “.stSelectbox”, etc…), but this will be ambiguous if the same widget type appears more than once in the page.

Thanks in advance!