sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #10893
[Question #199125]: Junit test without relaunching application
New question #199125 on Sikuli:
https://answers.launchpad.net/sikuli/+question/199125
Hi,
I'm new to scripting and want to know if it is possible to script a unit test within sikuli in which each test doesn't require a relaunch of the application?
For example this code would have to launch the calculator app three times:
def setUp(self):
App.open("C:\Windows\System32\calc.exe")
wait("QEIECalculat.png")
#waits for app to load
def tearDown(self):
type(Key.F4,KEY_ALT)
#shuts down app in this case calculator
popup("The test has concluded")
def testAdd(self):
type(Key.NUM2)
type(Key.ADD)
type(Key.NUM2)
type(Key.ENTER)
assert exists("1338400138750.png")
def testSub(self):
type(Key.NUM2)
type(Key.MINUS)
type(Key.NUM2)
type(Key.ENTER)
assert exists("1338400185338.png")
def testDivide(self):
type(Key.NUM2)
type(Key.DIVIDE)
type(Key.NUM2)
type(Key.ENTER)
assert exists("1338400305084.png")
Any help or direction is appreciated.
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.