Selenium with Python. Button is grayed out. Need to wait for it to be clickable.

There is a method for that.
“EC.element_to_be_clickable” comes in handy.
In below example, the Continue button would not get enabled until the form fields were filled in properly. Sometimes the test would whiz through too fast and the click of the Continue button would fail. This way, it waits for it to be clickable. Nice.

wait.until(EC.element_to_be_clickable((By.ID, Page1ofSetUp.Button_Continue)))

You will need to import a few items and instantiate:

from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
wait = ui.WebDriverWait(self.driver, 10)