Skip to content
Advertisement

clicking on hyperlink using xpath and css selector do not work

I would like Selenium driver to click on the export button as shown in the image. enter image description here

Here is the html code:

JavaScript

I tried: from the suggestion here driver.find_element(by=By.XPATH("//a[@href='/index.php/filter/export/f/KbInvoiceFilter/m/kb_invoice/a/list']")).click();

but it returns

str is not callable.

Then, I tried using CSS_SELECTOR based on docs here:

JavaScript

it returns

NoSuchElementException

Advertisement

Answer

Try with below

JavaScript

OR Add the ExplicitWait

JavaScript
User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement