ElementNotInteractableException: Message: element not interactable
error you are getting because the element is not interactable at the point of accessing it. May be various reason, sometimes it is not visible and trying to click, sometimes overlay with other elements, sometimes for viewport.
Please find following solutions.
#1 using WebDriverWait()
oatObj=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//span[contains(@class, 'treeImg') and contains(., 'OAT ')]")))
oatObj.click()
#2 using Actions class
oatObj=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//span[contains(@class, 'treeImg') and contains(., 'OAT ')]")))
ActionChains(driver).move_to_element(oatObj).click().perform()
#3 using JavaScripts Executor
oatObj=WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.XPATH, "//span[contains(@class, 'treeImg') and contains(., 'OAT ')]")))
driver.execute_script("arguments[0].click();",oatObj)
Please import below libraries:
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By
from selenium.webdriver.common.action_chains import ActionChains