1 from __future__ import with_statement
4 from sikuli.Sikuli import *
6 class Chromium(object):
8 def __init__(self, url):
13 app = App.open('chromium-browser')
15 type("%s\n" % self.url)
18 def __exit__(self, type_, value, traceback):
22 class TestBasicScenario(unittest.TestCase):
24 def test_01_login(self):
29 click("1379932483974.png")
31 assert exists("1389349522098.png")
34 def test_02_logout(self):
36 click("1389349732360.png")
38 assert exists("loginlogo.png")
42 # Sikuli settings (no logs)
43 Settings.ActionLogs = False
44 Settings.InfoLogs = False
45 Settings.DebugLogs = False
47 with Chromium('localhost&tine20'):
48 suite = unittest.TestLoader().loadTestsFromTestCase(TestBasicScenario)
49 unittest.TextTestRunner(verbosity=2).run(suite)