Python Forum
How to trigger click event on Button without ID/Name
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to trigger click event on Button without ID/Name
#3
I suppose you are using selenium.. It's possible that it's not working because you are calling click() on the div element that is wrapping the button, not sure.

Button tag from your example has classes though, so you can use that.
b = driver.find_element_by_class_name('btn-succes')

or you can use css selector:
b = driver.find_element_by_css_selector('.btn.btn-success.btn.btn-default')
Reply


Messages In This Thread
RE: How to trigger click event on Button without ID/Name - by mlieqo - Jan-27-2019, 12:02 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  cant click button by script at page michael1834 1 1,211 Dec-08-2023, 04:44 PM
Last Post: SpongeB0B
  Click on a button on web page using Selenium Pavel_47 7 4,927 Jan-05-2023, 04:20 AM
Last Post: ellapurnellrt
  button click error rafarangel 2 3,205 Feb-11-2021, 08:19 PM
Last Post: buran
  Log In Button Won't Click - Python Selenium Webdriver samlee916 2 3,935 Jun-07-2020, 04:42 PM
Last Post: samlee916
  How to click facebook message button JanelleGuthrie 2 2,486 May-14-2020, 06:02 PM
Last Post: Larz60+
  Clicking on element not triggering event in Selenium Python (Event Key is not in data dkaeloredo 2 4,355 Feb-16-2020, 05:50 AM
Last Post: dkaeloredo
  Contact form button click action Man_from_India 1 2,865 Feb-01-2020, 06:21 PM
Last Post: snippsat
  HOWTO? Login DSL Modem with Python Requests: need Click "Apply" Button Webtest 4 8,643 Aug-20-2019, 04:03 PM
Last Post: johnmina
  Selenium click on popup button??? GuJu 7 8,182 Jul-20-2019, 09:21 AM
Last Post: Nizam
  how to click javascript button hcyeap 3 5,011 Aug-16-2018, 01:26 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

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