diff options
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/testcases/montage.py | 2 | ||||
| -rw-r--r-- | tests/testcases/test.py | 26 |
2 files changed, 21 insertions, 7 deletions
diff --git a/tests/testcases/montage.py b/tests/testcases/montage.py index 2b3f2c4d..fa67ebaa 100644 --- a/tests/testcases/montage.py +++ b/tests/testcases/montage.py @@ -10,7 +10,7 @@ def run_tests(self): app.tap_menu_js() c.log ('Validating montage') c.click_item('testaut_menu_montage') - c.click_item('img-1') + c.click_item('img-0') sleep(4) c.take_screenshot(None,'montage-singleview.png') c.dbl_click_item('singlemonitor') diff --git a/tests/testcases/test.py b/tests/testcases/test.py index 621b6c60..0cc7e826 100644 --- a/tests/testcases/test.py +++ b/tests/testcases/test.py @@ -4,7 +4,7 @@ Invokes other test cases ''' import unittest -from time import sleep +from time import sleep,localtime,strftime from appium import webdriver import os import glob @@ -13,6 +13,7 @@ import common as c import wizard import app import montage +import errno class ZmninjaAndroidTests(unittest.TestCase): 'Class to run tests against zmNinja' @@ -51,16 +52,29 @@ class ZmninjaAndroidTests(unittest.TestCase): c.testConfig['portal'] = 'https://demo.zoneminder.com/zm' c.testConfig['user'] = 'zmuser' c.testConfig['password'] = 'zmpass' + + c.testConfig['portal'] = 'https://192.168.1.134/zm' + c.testConfig['user'] = 'admin' + c.testConfig['password'] = 'admin' + c.testConfig['use_auth'] = True c.testConfig['use_zm_auth'] = True c.testConfig['use_basic_auth'] = False - c.testConfig['screenshot_dir'] = './screenshots' - if not os.path.exists(c.testConfig['screenshot_dir']): + run_dir = strftime('%b-%d-%I_%M_%S%p', localtime()) + c.testConfig['screenshot_dir'] = './screenshots/'+run_dir + try: os.makedirs(c.testConfig['screenshot_dir']) - files = glob.glob(c.testConfig['screenshot_dir']+'/*') - for f in files: - os.remove(f) + except OSError as exc: + if exc.errno == errno.EEXIST and os.path.isdir(path): + pass + else: + raise + + + #files = glob.glob(c.testConfig['screenshot_dir']+'/*') + #for f in files: + # os.remove(f) self.wait_for_app_start() wizard.run_tests(self) |
