adspace
How can we find the value of different attributes like name, class, value of an element?
Answer Posted / Sajjan Singh
In Selenium, you can find the value of different attributes like name, class, value by using WebElement methods such as `getAttribute(attributeName)`. For example, to get the value of the 'name' attribute, use `element.getAttribute('name')`, and for the 'class' attribute, use `element.getAttribute('class')`.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers