0

I am trying to click an element using selenium as shown below -

def colour(self):
    self.driver.expected_conditions.element_to_be_clickable('//*[@id="add-remove-buttons"]/input')

I need the driver to wait until the element is visible, how do I go about doing that.

rohit keshav
  • 305
  • 2
  • 16
ufo361
  • 35
  • 1
  • 5

1 Answers1

0

try this

element= WebDriverWait(driver, 10).until(expected_conditions.visibility_of_element_located((By.XPATH, 'YOURXPATH')))

List of functions available

  1. presence_of_element_located
  2. visibility_of_element_located
  3. presence_of_all_elements_located
  4. text_to_be_present_in_element and many more
Amruta
  • 1,128
  • 1
  • 9
  • 19