Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to click javascript button
#1
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
Reply
#2
Should your href come before your onclick?
Reply
#3
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?
Reply
#4
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.
Recommended Tutorials:
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  cant click button by script at page michael1834 1 998 Dec-08-2023, 04:44 PM
Last Post: SpongeB0B
  Click on a button on web page using Selenium Pavel_47 7 4,567 Jan-05-2023, 04:20 AM
Last Post: ellapurnellrt
  button click error rafarangel 2 3,086 Feb-11-2021, 08:19 PM
Last Post: buran
  Log In Button Won't Click - Python Selenium Webdriver samlee916 2 3,772 Jun-07-2020, 04:42 PM
Last Post: samlee916
  How to click facebook message button JanelleGuthrie 2 2,372 May-14-2020, 06:02 PM
Last Post: Larz60+
  Contact form button click action Man_from_India 1 2,752 Feb-01-2020, 06:21 PM
Last Post: snippsat
  HOWTO? Login DSL Modem with Python Requests: need Click "Apply" Button Webtest 4 8,408 Aug-20-2019, 04:03 PM
Last Post: johnmina
  Selenium click on popup button??? GuJu 7 7,732 Jul-20-2019, 09:21 AM
Last Post: Nizam
  How to trigger click event on Button without ID/Name gahhon 7 13,798 Feb-10-2019, 03:06 PM
Last Post: gahhon
  Click a button to get next page ian 7 62,555 Apr-15-2018, 10:05 PM
Last Post: snippsat

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020