click button python code example
Example 1: Function to a button in tkinter
from tkinter import *
win = Tk()
def btn1():
print("I Don't Know Your Name")
button1 = Button(win, text="Click Me To Print SomeThing", command=btn1)
button1.pack()
win.mainloop()
Example 2: how to click on button using python
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('your page url')
button_element = driver.find_element_by_id('button id')
button_element.click()
Example 3: python button click code
w = Button ( master, option=value, ... )
Example 4: button click event in python
button_element = driver1.find_element_by_id('button event')
button_element.click()