本文整理汇总了Python中application.Application.start_方法的典型用法代码示例。如果您正苦于以下问题:Python Application.start_方法的具体用法?Python Application.start_怎么用?Python Application.start_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类application.Application
的用法示例。
在下文中一共展示了Application.start_方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: do_test_2
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import start_ [as 别名]
def do_test_2():
"2nd Watsup Test"
filename = 'atestfile.txt'
if os.path.exists(filename):
os.remove(filename)
app = Application()
try:
app.connect_(title ='Simple Form')
except WindowNotFoundError:
app.start_(r'examples\simple.exe')
form = app.SimpleForm
form.Edit.SetText(filename)
sleep(.6)
print 'clicking button to create file'
form.CreateFile.Click()
# now check that the file is there
if os.path.exists(filename):
print 'file %s is present' % filename
else:
print "file %s isn't there" % filename
form.MenuSelect("File->Exit")
示例2: do_test_3
# 需要导入模块: from application import Application [as 别名]
# 或者: from application.Application import start_ [as 别名]
def do_test_3():
"3rd Watsup Test"
app = Application()
try:
app.connect_(title ='Performance Form 2')
except WindowNotFoundError:
app.start_(r'examples\perform2.exe')
app.PerformanceForm1.Clickme.Click()
waited = 0
while not app.PerformacneForm1.Edit1._.Texts and not waited >= 1:
print 'waiting'
sleep(.1)
waited += .1
print `app.PerformacneForm1.Edit1._.Texts`