how to click a button using python code example
Example 1: how to code a clickable button in python
from tkinter import *
master = Tk()
def close_window():
exit()
button = Button(master, text = 'Click me', command = close_window)
button.pack()
mainloop()
Example 2: how to click on button using python
from selenium import webdriver
driver = webdriver.Firefox()
# Go to your page url
driver.get('your page url')
# Get button you are going to click by its id ( also you could us find_element_by_css_selector to get element by css selector)
button_element = driver.find_element_by_id('button id')
button_element.click()