sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #09763
Re: [Question #193047]: unable to use some of the assert when running unit test in Sikui x-1.0rc3(r905)
Question #193047 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/193047
Status: Answered => Open
Prem Nambiar is still having a problem:
Here is the sample code snippet from Jedi unitest shipped with sikuli
x-1.0rc3
def test_textarea_add_del_by_menu(self):
type("hello world")
assertExist(x.png)
click("a", KEY_CTRL)
type("\n######")
assertNotExist(x.png)
I used the "assertNotExist" similar as above code snippet from Jedi in
the following script
class MyTest1(unittest.TestCase):
def setUp(self):
self.aview = App(r'C:\Program Files\myApp.exe')
#self.aview.open()
def tearDown(self):
pass
def test_login(self):
self.aview.open()
wait(3)
self.assertNotExist(pattern("LoginDlg.png").similar(0.95))
But i get the following error
self.assertNotExist(pattern("LoginDlg.png").similar(0.95))
AttributeError: 'MyTest1' object has no attribute 'assertNotExist'
i tried without using the pattern keyword as shown in the description of
this issue but that also gets the error. Lot of similar assert is used
in Jedi unit test.
self.assert not exists("LoginDlg.png") --- does not work for me, IDE
displays the error "mismatched input exists"
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.