I am now convinced that there is no solution to this. But in case there is someone out there who can help: Whole Element that I want to click on genesys cloud is (Its a part of a table):
<a target="_blank" data-bind="
attr: {
href: lastReportRun().reportUrl
},
lAttr: {
title: 'reports.list.grid.downloadColumn.fileTypes.' + lastReportFileType()
},
lString: 'reports.list.grid.downloadColumn.fileTypes.' + lastReportFileType()
" href="https://apps.usw2.pure.cloud/platform/api/v2/downloads/9161911a0307202a" title="XLSX">XLSX</a>
Element snapshot:
I am trying to locate this element to click on it and start downloading the .xlsx file. These are the things I have tried so far, but no luck. Can someone please help me understand where I can correct it.
Code trials:
WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.LINK_TEXT, "XLSX"))).click()
driver.find_element_by_link_text("XLSX").click()
driver.find_element_by_xpath(u'//a[text()="XLSX"]').click()
driver.find_element_by_xpath('//a[normalize-space(text())="XLSX').click()
driver.find_element(By.XPATH, "//input[@name='XLSX' and @value='XLSX']").click()
WebDriverWait(driver,10).until(EC.element_to_be_clickable((By.XPATH, "//*input[@name='XLSX' and @value='XLSX']"))).click()
driver.find_element_by_xpath('/html/body/div[1]/div/div/div/div/div/div/div/div/div[2]/div[2]/div/div[5]/a').click()
WebDriverWait(driver, 5).until(EC.element_to_be_clickable((By.XPATH, "//*span[contains(., 'XLSX')]"))).click()
l=driver.find_element_by_xpath("//*a[@title='XLSX']")
l.click()