I am newbie about python selenium and I am trying to click on a button which has the following html structure:
<a href="javascript:doPage('2');">2</a>
-->
<a href="#doPage2" onclick="javascript:doPage('2');">2</a>
<img src="/images/common/divisionLine.gif" alt="" />
<!--
<a href="javascript:doPage('3');">3</a>
-->
<a href="#doPage3" onclick="javascript:doPage('3');">3</a>
<img src="/images/common/divisionLine.gif" alt="" />
I want to click hyperlink name "2" or "3" like below code. But it does not work.
wait(driver, 5).until(EC.element_to_be_clickable((By.XPATH,"//a[@onclick=\"javascript:doPage('2');\"]"))).click()
When I run my python code, I got below error comment.
selenium.common.exceptions.WebDriverException: Message: unknown error: Element is not clickable at point (577, 821)
Any thoughts which can point me in the right direction would be great. Thanks.