0

I have a svg file and i need to click on the seats, So i have used driver.findelements() when a seat is clickable it should click on it and come out of the if condition. But when i use break it is not clicking the seat, When i do not use break it will go into infinite loop.

How do i break after the seat is selected.

Please find the attached code enter image description here

  • `isEnabled()` can't guarantee 100% that the element is _clickable_. See:[WebDriverWait](https://stackoverflow.com/questions/59130200/selenium-wait-until-element-is-present-visible-and-interactable/59130336#59130336), – undetected Selenium Aug 21 '20 at 10:30

1 Answers1

0

Make recursive function which keeps on checking that element is enabled or not. once it is enabled , it will click and come out.

def click_enabled_element(enable_value = False)
  if enable_value:
    i.click()
    return
  else:
   click_enable_element(i.isEnabled())