1

This is my code:

label = browser.find_elements_by_xpath('//label[contains(.,"{}")]'.format("XYZ"))

if label:
     check if we can click this element (label[0]) if it's not clickable, continue.

Is it possible to find an element and then check if it's clickable?.

Normally this issue happened with webpages where when click button something else appeared. This means that element exists BUT you can't interact with him. How to handle this error or ignore and continue?

P.S. Similar question already asked several times, BUT I can't see the answer which will fit my needs. Solutions like implicitly_wait(1) and e.t.c. are not what I'm looking for.

AMC
  • 2,642
  • 7
  • 13
  • 35

1 Answers1

3

I have used .is_displayed() which solved my issue.

  • Find element x
  • x[0].is_displayed()
  • if True carry on