I wish to verify which option is selected in the below code:
<div class="col-xs-12 noPadding details AdminDetails" data-value="INVITE" xpath="1">
<div class="col-xs-8 left">Invite<br>
<span class="permissionsDescription">Invite Users via email; Invite users already imported</span>
</div>
<div class="col-xs-4 right">
<button type="button" value="1" class="accessBtn infoYes ">Yes</button>
<button type="button" value="0" class="accessBtn infoNo active">No</button>
</div>
</div>
I tried this way:
//Set Role Specific Privileges
if (await driver.findElement(By.xpath("//div[@class='rightPane occupyFull']//div[3]//div[2]//button[2]")).isEnabled()) {
console.log(`\nAll good`);
} else {
console.log(`\nCheck failed`);
}
Doesn't matter what is selected on the page I always get a passing result. What is wrong with my approach? Thanks!