I am looking to determine which option is currently selected in the code snippet below:
<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 have attempted the following approach:
//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`);
}
Despite what is actually selected on the page, my code always returns a passing result. Can anyone help identify what is incorrect with my method? Thank you!