I am trying to send a value and click on the button to retrieve certain pdfs but I am getting an error that element is not interactable. I tried using different selectors but I am getting the same error. Below is my code:
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.chrome.options import Options
options=Options()
prefs = {"download.default_directory" : "D:\Trvael_Test_Script\GSTInvoiceDownloads"}
options.add_experimental_option("prefs",prefs)
from selenium.webdriver.chrome.service import Service
s=Service('C:/webdrivers/chromedriver.exe')
driver = webdriver.Chrome(service=s,options=options)
driver.get("link")
time.sleep(10)
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, '//*[@id="GST"]/span[1]'))).click()
time.sleep(5)
driver.switch_to.frame(driver.find_element(By.ID,'ifgstdownloadnFrame'))
time.sleep(5)
driver.find_element(By.XPATH,'//*[@id="txtpnr"]').send_keys('pnr')
driver.find_element(By.XPATH,'//*[@id="btnSubmit"]').click()```
Can anyone please let me know how to make the element interactable?