how do i know if a button is enabled using selenium?

Just add an answer refers to the comment with a bit explanation.

You can check the attribute value by .get_attribute('disabled') method.

And I think you should use .find_element* (without s) not .find_elements*, because find by id is unique:

disable_val = driver.find_element_by_id('join_button_input').get_attribute('disabled')
if disable_val == 'true':

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top