Example #1
0
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")
Example #2
0
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")
Example #3
0
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`
Example #4
0
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 `