Python Forum

Full Version: how to click javascript button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi there,

I am trying to automate to login a page.

i am following the example here:
https://stackoverflow.com/questions/4162...ium-python
however, to no avail.

below is the html tag for the button that i need to click
<a onclick="overlay.overlayLogin();" href="javascript:void(0);" class="login bold">Sign In</a>

Appreciate your assistance.

Thank you.

HC
Should your href come before your onclick?
hi there,

ya i think i copied wrongly..

<a onclick="overlay.overlayLogin();" href="javascript:void(0);" class="login bold">Sign In</a>

this one i supposed?
It doesnt matter the order.

If your not using selenium....
you need selenium to click javascript buttons

If you are using selenium
Quote:however, to no avail.
what is your traceback error? And what method are you clicking the button by? xpath? class name? tag name?

WE need descriptions. What site are you logging into so we can see if there are any oddities. Does the mouse become clickable only when hovered over? ARe you waiting for the page to finish loading? etc.