sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03039
[Question #160003]: Global variables and functions argument in unittest
New question #160003 on Sikuli:
https://answers.launchpad.net/sikuli/+question/160003
Hi All,
I have just started working with SIKULI, its look very promising. I working on Windows 7 64bit.
I have two questions about unit test
1. how can I create global variables in unit test scrip ? I have following example, but cause exception:
globalvar = 0
def useFilter(self):
print "in filter"
global globalvar
print "in filter1"
globalvar = globalvar + 1
print "in filter2"
print globalvar
print "in filter3"
def setUp(self):
closeApp("my app")
wait(4)
switchApp("C:\Program Files (x86)\myApp\myApp.exe")
wait(myApp.png ,30)
self.closeUpdateIfAppear()
self.maximizeApp()
wait(1)
self.resetAppLayout()
wait(1)
print "use filter"
self.useFilter()
I see that after step "in filter1" apears exception.
2. how can I create functions with more argument ?
Now I use only functions that have one "sefl" argument; is it possible to pass more arguments to functions in unit test ?
Regards
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.