失眠网,内容丰富有趣,生活中的好帮手!
失眠网 > python控制浏览器最小化_如何在最小化浏览器的情况下使用selenium webdriver执行测试...

python控制浏览器最小化_如何在最小化浏览器的情况下使用selenium webdriver执行测试...

时间:2018-08-01 05:46:58

相关推荐

python控制浏览器最小化_如何在最小化浏览器的情况下使用selenium webdriver执行测试...

我试着运行这个程序。它可以很好地处理代码,但是当我最小化浏览器时,错误弹出。程序似乎找不到按钮。有什么我可以用来修理它的吗。帮助

{<1分$

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()

如果觉得《python控制浏览器最小化_如何在最小化浏览器的情况下使用selenium webdriver执行测试...》对你有帮助,请点赞、收藏,并留下你的观点哦!

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。