I'm starting with Selenium and I'm doing tests on a website, but I find the following structure, and I can not click on the next one. It is a link inside a li tag.
<li class="last">
<a onclick="sendFormWithOptionsCU(event, 'https://www.xxx.com');" href="https://www.xxx.com">»</a>
</li>
Python code
btnSiguiente=navegador.find_element_by_class_name('last')
print btnSiguiente
enlace=btnSiguiente.find_element_by_tag_name('a')
print enlace
btnSiguiente.find_element_by_tag_name('a').click()
But it does not execute the next button. I have also tried with the xpath, but since the web changes, it does not detect me next time.