So here’s a nested function that I defined. It works on regular window mode but won’t work on headless
def xPort():
wait = WebDriverWait(website, 450)
xport = wait.until(EC.element_to_be_clickable((By.ID,"ctl00_cplMain_ExportToExcel0")))
xport.click()
This function uses the webdriver refresh function before but I removed it. I tried maximizing the window for the element to be clickable. But somehow the element click() action won’t run.