HTML of the button:
<button class="Button1" disabled type="button" xpath="1">submit Button</button>
def isButtonDisabled(self):
element = self.element.findElement(By.xpath, 'locator')
return element.get_property('disabled')
But this method is not working.
There is a function in WebDriver called
is_enabledwhich returns true if the element is enabled, else it returns false.Here's a Reference in the documentation of selenium py