sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #03072
Re: [Question #160003]: Global variables and functions argument in unittest
Question #160003 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/160003
Status: Open => Answered
RaiMan proposed the following answer:
def myMethod(self, text, img=None)
print text
if img: click(img)
--- and I call it (version 1)
def test_some(self)
self.myMethod("this is my method")
should only type text.
--- and I call it (version 2)
def test_some(self)
self.myMethod("this is my method", "someButton.png")
should type text and click
more info on own functions:
http://jythonpodcast.hostjava.net/jythonbook/en/1.0
/DefiningFunctionsandUsingBuilt-Ins.html#chapter-4-defining-functions-
and-using-built-ins
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.