asked 3 months ago
The attributes are the key-value pairs in the HTML Tag.
Sometimes we need to get the attribute to verify the properties and the values of the web element.
The examples are, fetching href value of the hyperlink, title, style, and so on
Example: Navigate to https://www.qafeast.com/demo and click the Button tab on the left side.
The button Submit HTML properties,
The attributes are id, class, id, data-toggle, to get the value of the title = "Click to submit the button" we can use getAttribute() function.
Example: