I want to get the value of this aria-checked = ‘true’ as shown in the screenshot below. I am able to get this value easily by using below code:
WebElement searchTextBox= driver.findElement(By.className(“ui-igcheckbox-container”));
// retrieving html attribute value using getAttribute() method
String typeValue=searchTextBox.getAttribute(“aria-checked”);
System.out.println("Value of type attribute: "+typeValue);
But the problem here is i want to get this value Dynamically above code only returns only first value of the table row. Can anyone help me how to get this value dynamically?