I am trying to post a comment in instagram after a time delay
browser.switch_to.new_window('tab')
browser.get(instagram_link)
# Send numbers decrementing from 20000 to 6000 with a decrement step of 20
for num in range(19960, 6000, -20):
textarea = WebDriverWait(browser, 10).until(
EC.presence_of_element_located((By.XPATH, "/html/body/div[2]/div/div/div[2]/div/div/div[1]/div[1]/div[2]/section/main/div/div[1]/div/div[2]/div/div[4]/section/div/form/div/textarea"))
)
textarea.send_keys(str(num))
time.sleep(3)
# Re-locate the textarea after sending keys
textarea = WebDriverWait(browser, 10).until(
EC.presence_of_element_located((By.XPATH, "/html/body/div[2]/div/div/div[2]/div/div/div[1]/div[1]/div[2]/section/main/div/div[1]/div/div[2]/div/div[4]/section/div/form/div/textarea"))
)
textarea.send_keys(Keys.ENTER)
this code posts the first number 19960 then it stops and says the error message
selenium.common.exceptions.ElementNotInteractableException: Message: element not interactable
how to solve this error and keep commenting