catalin
catalin

Reputation: 1116

Verify if a button is disabled in Python + Selenium

<input type="submit" id="edit-save-m" name="save_m" value="Save my thing" class="form-submit ajax-processed saved-m-processed">

I need to verify with Python and Selenium if the button is disabled. Any ideas?

Upvotes: 0

Views: 11751

Answers (2)

Ranjith&#39;s
Ranjith&#39;s

Reputation: 4730

Try this:

element = driver.find_element_by_id("edit-save-m")
print element.is_enabled()

Prints true or false, based on element visibility.

Upvotes: 7

catalin
catalin

Reputation: 1116

This worked for me:

className.Property.is_enabled()

Upvotes: 0

Related Questions