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?