I'm trying to automate downloading a report, but my script is refusing to find the element to click on...
def wait_click(browser, by_what, where):
    wait = WebDriverWait(browser, 20)
    wait.until(EC.element_to_be_clickable((by_what, where))).click()
tillf_export = '//*[@id="panel__6940363340341543984_linkb_6940363340341543984"]'
# inside class
def download_tillf(self):
    self.browser.get(system_export)
    wait_click(self.browser, By.XPATH, tillf_export)
I've tried every possible way, switching away from XPATH, using parent elements and even execute_script with the js.
This is the div:
<table class="dxrpControl" cellspacing="0" cellpadding="0" id="panel__6940363340341543984" border="0" style="border-collapse:collapse;border-collapse:separate;">
        <tbody><tr>
            <td id="panel__6940363340341543984_HC" class="dxrpHeader dxrp-headerClickable dx-borderBox" style="text-align: center; border-bottom: 1.33333px solid rgb(198, 198, 198); border-bottom-left-radius: 0px; border-bottom-right-radius: 0px;"><div id="panel__6940363340341543984_CB" class="dxrpCollapseButton" style="margin-top: 1px;">
                <img id="panel__6940363340341543984_CBImg" class="dxWeb_rpCollapseButton" src="/test/jlltp02/sjalvservicerdr/DXR.axd?r=1_89-UNelo" alt="Collapse/Expand">
            </div><div class="dxrpHCW" style="padding-right: 19px;">
                ** <span id="panel__6940363340341543984_RPHT" class="dxrpHT dx-vam">Tillfällig export</span> 
            </div></td>
        </tr><tr class="dxrpCR">
            <td id="panel__6940363340341543984_RPC" class="dxrp dxrpcontent dx-borderBox"><div class="dxrpAW" style="">
                <div id="panel__6940363340341543984_CRC" class="dx-borderBox dxrpCW">
                    <table border="0">
                        <tbody><tr>
                            <td><span class="UTDATANODTITLEDESC">Tillfällig export kan användas för att snabbt ta ned svaret på en fråga genom att bara ändra den i "Automatiska frågor". Detta för att slippa gå in i Citrix och spara ned filen på M:.</span></td>
                        </tr><tr>
                            <td valign="top"><a id="panel__6940363340341543984_linkb_6940363340341543984" class="UTDATANODLINK" href="javascript:outputClick('6940363340341543984');">>> Tillfällig export</a></td>
                        </tr>
                    </tbody></table>
                </div>
            </div></td>
        </tr>
    </tbody></table>
Can anyone see what I'm doing wrong? Would be forever grateful!
 
    