I am using Selenium IDE to make a automation scripts. In my code there is a page where when i select some options the 'Next' button gets disabled for a while. I have used a 'pause' statement for the time when the button is disabled but when i re-run my scripts in Selenium IDE, the 'Next' button does not get clicked most of the time. Does anyone have any solution for this sort of a problem?
Use webdriverWait and ExpectedConditions:
from selenium2.webdriver.common.by import By
from selenium2.webdriver.support.ui import WebDriverWait
from selenium2.webdriver.support import expected_conditions as EC
WebDriverWait(driver, WAIT).until(EC.element_to_be_clickable((By.ID, id)))
Have you tried adding the Selenium IDE: Implicit Wait add-on? It might give you what you are looking for.
"This plugin allows Selenium IDE to automatically wait until the element is found before executing each command using a locator. It is equivalent to the implicit wait function available with Selenium 2 WebDrivers."