Is there a way to print all the info about a web element?
When I call a print on a web element that I did retrieve via find_element_by_css_selector()
, I get the internal ID and another reference number, but not all the properties.
For example, I would like to know the class name, the source and alt if it is an image; the label if it is a button and so on.
I did use get_attribute()
; but that is useless if you do not know the name of the attribute; it just return empty if the attribute does not exist, and I need to check an element to know which attributes it has.
Is there a way to get these attributes from the webelement?