abhishek1997
2 years agoContributor
How to verify if a web element is selected or not
Hello Team, How to verify if a web element is selected or not. For example, see the attached screenshot. If Button A is clicked Label A will be selected. So we have to verify the whether Label A ...
- 2 years ago
I tried in different way, it worked for me
def isSelected():
ele = homePage.FindElement("xpath")
eleClass = str(ele.getAttribute("class"))
if "highlighted" in eleClass :
Log.Message("The element is selected")
else:
Log.Message("The element is not selected")