Hi sindhu,
actually there is method to verify button status in selenium RC and web driver, but we need to verify whether button disabled or enabled. so, in my application developers provided "Disabled" property.
when button got
disabled, plz find below firebug code:
<button class="x-btn-text " style="position: relative; width: 44px;" type="button" tabindex="0" aria-disabled="true">OK</button
when button got
enabled, plz find below firebug code:
<button class="x-btn-text " style="position: relative; width: 44px;" type="button" tabindex="0" aria-disabled="false">OK</button
my code:
if(Globals.driver.findElement(By.xpath("//button[text()='OK']")).getAttribute("aria-disabled").equals("false")){
Globals.driver.findElement(By.className("x-panel-btns")).findElement(By.xpath("//button[text()='OK']")).click();
}
else{
Globals.driver.findElement(By.className("x-panel-btns")).findElement(By.xpath("//button[text()='Cancel']")).click();
}
Please let me know if more required.
Thanks,
Ram