Пример #1
0
 def test_false(self):
     u.recordcase(self.test_false, "OtherTest")
     time.sleep(10)
     try:
         assert True
     finally:
         u.log()
Пример #2
0
 def test_true(self):
     # folder = getattr(self.test_true, "__name__")
     # 把case名写进testresult/folder文件下,方便其他方法读取方法名
     u.recordcase(self.test_true, "OtherTest")
     time.sleep(30)
     assert True
     u.log()
Пример #3
0
 def test_fm_copy(self):
     u.recordcase(self.test_fm_copy, "FileManager.Priority1")
     self._launch_filemanager()
     d(resourceId="com.chaozhuo.filemanager:id/text_navigation_child", text=u"文档").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/more").wait(5000)
     d(resourceId="com.chaozhuo.filemanager:id/more").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/item_title", text=u"新建文件").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/file_name_edit").set_text("test.txt")
     time.sleep(2)
     d.press("enter")
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/node_list").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/more").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/item_title", text=u"全选").click()
     time.sleep(2)
     d(resourceId="com.chaozhuo.filemanager:id/copy", text=u"复制").click()
     time.sleep(2)
     for i in xrange(self.loop):
         d(resourceId="com.chaozhuo.filemanager:id/more").click()
         time.sleep(2)
         d(resourceId="com.chaozhuo.filemanager:id/item_title", text=u"粘贴").click()
         time.sleep(2)
     u.log()
Пример #4
0
 def test_open_close(self):
     u.recordcase(self.test_open_close, "FileManager.Priority1")
     for i in xrange(self.loop):
         self._launch_filemanager()
         time.sleep(2)
         d(resourceId="android:id/mwCloseBtn").click()
         time.sleep(2)
     u.log()
Пример #5
0
 def test_fm_createfolder(self):
     u.recordcase(self.test_fm_createfolder, "FileManager.Priority1")
     for i in xrange(self.loop):
         self._launch_filemanager()
         d(resourceId="com.chaozhuo.filemanager:id/text_navigation_child", text=u"文档").click()
         time.sleep(2)
         d(resourceId="com.chaozhuo.filemanager:id/more").click()
         time.sleep(2)
         d(resourceId="com.chaozhuo.filemanager:id/item_title", text=u"新建文件夹").click()
         time.sleep(2)
         d(resourceId="com.chaozhuo.filemanager:id/file_name_edit").set_text("test" + str(i))
         time.sleep(2)
         d.press("enter")
         time.sleep(2)
         d(resourceId="android:id/mwCloseBtn").click()
         time.sleep(2)
     u.log()