Access to a hosted MariaDB using a connector is not allowed by the provider. I therefore try to export some tables using a Python script with Selenium. I do not manage to find / click the export button of phpMyAdmin.
I try to locate the button using its XPATH, obtained with the Chrome browser. I updated Chrome, the driver, Selenium to the latest versions. Attempted to make the driver wait:
(WebDriverWait(driver, 20).until(EC.element_to_be_clickable((By.XPATH, "//div[@class='navigationbar']/ul[@id='topmenu']//li//img[@title='Exporteren']"))).click())
The problem is that for some reason, the button cannot be found by the driver. I tried to search by xpath, class, css, … without success. I do not find any frame in the html code. Below some html code (that seems to get interpreted in the question...)
HTML:
<div class="navigationbar"><ul id="topmenu" class="resizable-menu">
<li>
<a href="server_status.php" class="tab">
<img src="themes/dot.gif" title="Status" alt="Status" class="icon ic_s_status" /> Status
</a>
</li>
<li>
<a href="server_export.php" class="tab">
<img src="themes/dot.gif" title="Exporteren" alt="Exporteren" class="icon ic_b_export" /> Exporteren
</a>
</li>
<li>
Code trials:
python
btnexp = driver.find_element_by_xpath("//*[@id='topmenu']/li[4]/a/img")
btnexp.click()
Error message:
no such element: Unable to locate element: {"method":"xpath","selector":"//*[@id='topmenu']/li[4]/a/img"}