0

I am getting error

elenium.common.exceptions.ElementClickInterceptedException: Message: 
  element click intercepted: Element <a class="fc-timeline-event fc-h-event fc-event fc-event-start fc-event-end fc-event-future s-lc-eq-avail" tabindex="0" title="12:00am Thursday, November 11, 2021 - Room 19 - Available" aria-label="12:00am Thursday, November 11, 2021 - Room 19 - Available">...</a>
  is not clickable at point (730, 588). Other element would receive the click: 
  <div class="fc-scroller" style="overflow: scroll hidden;">...</div>
  (Session info: headless chrome=95.0.4638.69)

I believe this is because I am trying to click the element before it is loaded. How can I wait for an element to be loaded WITHOUT ITS XPATH. I have this function:

def waitThenClick(path, driver):
    try:
        element = WebDriverWait(driver, 10).until(
            EC.element_to_be_clickable((By.XPATH, path)))
        driver.find_element(By.XPATH, path).click()
    except TimeoutException:
        print("Failed to load", path)

to wait then click with xpath, but I do not have the xpath of the element in this case My code:

if (currentTime == targetDateTime and arr[-1] == "Available"):
    avalableElement = elm // WebElement Object
...
WebDriverWait(driver, 10).until(EC.element_to_be_clickable(avalableElement))
avalableElement.click()

How can I either wait for the element to load with the object and not xpath, or get the xpath from the webelement object?

6
  • 1
    Include the full exception in your post. It'll tell you what element is intercepting the click and that will tell you how to proceed. Commented Nov 10, 2021 at 17:08
  • I updated the question Commented Nov 10, 2021 at 17:40
  • looks like a scrollable calendar... so probably stays at the bottom of the page? Find the close button for that item and click it before attempting to click your target element. Commented Nov 10, 2021 at 17:44
  • It is a sideways scrolling calendar, It was working at one point, but since I moved from mac to Linux it has been erroring. Commented Nov 10, 2021 at 18:14
  • probably due to different resolution/screen size. That calendar is overlapping the element you are trying to click. Might be a bug to write up. Commented Nov 10, 2021 at 18:50

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.