Button gets disabled and doesnot get clicked



  • 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)))



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2