I try to run this program. it works fine with codes, however when I minimized the browser, error pop up. it seem that program is unable to find the button. is there anything that i can use to fix it. help
import selenium from selenium import webdriver from selenium.webdriver.support.ui import Select import os import datetime from tkinter import * from tkinter import filedialog from tkinter import messagebox as msgbox # Using Chrome to access web driver = webdriver.Chrome() master = Tk() master.resizable(0, 0) #0 means false genType = StringVar(master) options = ["1-Day Admission Only", "Audio Only"] genType.set(options[0]) def optionChanged(var): if var == "1-Day Admission Only": met() elif var == "Audio Only": met() genTypeMenu = OptionMenu(master, genType, *options, command=optionChanged) def start(): opt = genType.get() if opt == "1-Day Admission Only": def met_one_day_admission(): for i in range(int(qty.s.get())): #do somethig here b = Button(master, text="Start", width=20, command=start, fg="red") qty = entry_with_label("Quantity :", "100") genTypeMenu.pack() b.pack()