예제 #1
0
 def test_download_notexist1(self):
     try:
         hiapp = HiApp(self.driver)
         testData = util.getTestDataInput('Download', self._testMethodName)
         hiapp.download_app_notexist(**testData)
     except Exception as err:
         print 'exception:' + err.message
         path = os.getcwd() + '/tests/results/images/'
         fileName = path + self._testMethodName + time.strftime(
             '_%Y%m%d%H%M%S') + '.png'
         self.driver.get_screenshot_as_file(fileName)
         self.assertFalse(True, 'Run ' + self._testMethodName + ' failed')
예제 #2
0
 def test_wode02(self):
     try:
         hiapp = HiApp(self.driver)
         hiapp.enter_wode()
         hiapp.open_switch(u'//android.widget.RelativeLayout[@index=9]/android.widget.Switch')
     except Exception as err:
         print 'exception:'+err.message
         path = os.getcwd()+'/tests/results/images/'
         fileName = path +self._testMethodName+time.strftime('_%Y%m%d%H%M%S')+'.png'
         self.driver.get_screenshot_as_file(fileName)
         self.assertFalse(True,'Run '+self._testMethodName+' failed')
예제 #3
0
 def test_wode02(self):
     try:
         testData = util.getTestDataInput('Wode',self._testMethodName)
         hiapp = HiApp(self.driver)
         hiapp.enter_wode()
         hiapp.open_switch(**testData)
     except Exception as err:
         print 'exception:'+err.message
         path = os.getcwd()+'/tests/results/images/'
         fileName = path +self._testMethodName+time.strftime('_%Y%m%d%H%M%S')+'.png'
         self.driver.get_screenshot_as_file(fileName)
         self.assertFalse(True,'Run '+self._testMethodName+' failed')
예제 #4
0
    def test_wode01(self):
        try:
            testData = util.getTestDataInput('Wode',self._testMethodName)
            hiapp = HiApp(self.driver)
            hiapp.enter_wode()
            hiapp.check_msg([u'//android.widget.TextView[@text="hiapps"]',u'//android.widget.TextView[@text="QQ 4008308300"]'],[u'hiapps',u'QQ 4008308300'])

        except Exception as err:
            print 'exception:'+err.message
            path = os.getcwd()+'/tests/results/images/'
            fileName = path +self._testMethodName+time.strftime('_%Y%m%d%H%M%S')+'.png'
            self.driver.get_screenshot_as_file(fileName)
            self.assertFalse(True,'Run '+self._testMethodName+' failed')