vendredi 2 novembre 2018

Problem clicking an href=javascript using selenium web drive python

I am having an problem with clicking an menu item that has an link with an href with selenium web drive.

<a class="a-link-normal" href="javascript:;">Fiction</a>

Here is my code:

driver.find_element_by_xpath('//*[@id="div-fiction"]/span/a').click()

This only seem to hover over the linked name and highlight it but does not trigger the javascript. I tried reading all the other solutions but it all lead to just using the click() method. Does anyone know what is wrong or a different approach to this.




Aucun commentaire:

Enregistrer un commentaire