Commit bec8f038 authored by libin's avatar libin
Browse files

20190725更新了测试报告

parent 448441bb
This diff is collapsed.
...@@ -21,6 +21,7 @@ from datetime import datetime ...@@ -21,6 +21,7 @@ from datetime import datetime
class WebClient(): class WebClient():
__driver = None __driver = None
imgs = []
def __init__(self, url): def __init__(self, url):
self.url = url self.url = url
...@@ -240,42 +241,43 @@ class WebClient(): ...@@ -240,42 +241,43 @@ class WebClient():
'''断言字符''' '''断言字符'''
def assert_equal_msg(self, actual_msg, expect_msg): def assert_equal_msg(self, actual_msg, expect_msg):
assert actual_msg == expect_msg # assert actual_msg == expect_msg
# try: try:
# assert actual_msg == expect_msg assert actual_msg == expect_msg
# except AssertionError: except AssertionError:
# raise Exception("\nAssertError: actual result is " + actual_msg + \ self.imgs.append(self.__driver.get_screenshot_as_base64())
# "; expect restlt is " + expect_msg) raise AssertionError("\nAssertError: actual result: " + actual_msg + \
time.sleep(self.timeout) "; expect restlt: " + expect_msg)
# time.sleep(self.timeout)
''' 获取元素,并获取它的text和传入的文本进行断言比较 ''' ''' 获取元素,并获取它的text和传入的文本进行断言比较 '''
def assert_mark_msg(self, element_selector, msg, find_by=By.XPATH): def assert_mark_msg(self, element_selector, msg, find_by=By.XPATH):
try: try:
self.wait_unit_elem(element_selector, find_by) self.wait_unit_elem(element_selector, find_by)
txtmsg = self.get_element(element_selector, find_by).text txtmsg = self.get_element(element_selector, find_by).text
print("expected text:",msg,",actual text:",txtmsg) # assert msg in txtmsg
assert msg in txtmsg try:
# try: assert msg in txtmsg
# assert msg in txtmsg except AssertionError:
# except AssertionError: self.imgs.append(self.__driver.get_screenshot_as_base64())
# raise Exception("\nAssertError: actual result is " + txtmsg + \ raise AssertionError("\nAssertError: actual result: " + txtmsg + \
# "; expect restlt is " + msg) "; expect restlt: " + msg)
except TimeoutException: except TimeoutException:
raise Exception("\nAssertError:can't find element!") raise AssertionError("\nAssertError:can't find element!")
'''获取多个元素,并获取它们的text和传入的文本进行断言比较''' '''获取多个元素,并获取它们的text和传入的文本进行断言比较'''
def assert_multiple_mark_msg(self,elements_selector,msg,find_by=By.XPATH): def assert_multiple_mark_msg(self,elements_selector,msg,find_by=By.XPATH):
self.wait_unit_elem(elements_selector, find_by) self.wait_unit_elem(elements_selector, find_by)
txtmsgs = self.get_elements(elements_selector, find_by) txtmsgs = self.get_elements(elements_selector, find_by)
print("expected text:",msg,",actual text:",txtmsgs)
for txtmsg in txtmsgs: for txtmsg in txtmsgs:
txt = txtmsg.text txt = txtmsg.text
assert msg in txt # assert msg in txt
# try: try:
# assert msg in txt assert msg in txt
# except AssertionError: except AssertionError:
# raise Exception("\nAssertError:Actual results is:"+txt+";Expect results is:"+msg+".") self.imgs.append(self.__driver.get_screenshot_as_base64())
raise AssertionError("\nAssertError:Actual results: "+txt+";Expect results: "+msg+".")
...@@ -290,34 +292,37 @@ class WebClient(): ...@@ -290,34 +292,37 @@ class WebClient():
'''断言:判断一个元素是否disabled''' '''断言:判断一个元素是否disabled'''
def assert_element_disabled(self, element_selector, find_by=By.XPATH ): def assert_element_disabled(self, element_selector, find_by=By.XPATH ):
element_enabled = self.is_enabled(element_selector, find_by) element_enabled = self.is_enabled(element_selector, find_by)
assert element_enabled == False try:
assert element_enabled == False
except AssertionError:
self.imgs.append(self.__driver.get_screenshot_as_base64())
raise AssertionError("\nAssertError:Actual results: enable;Expect results: disable.")
# 断言控件属性值 # 断言控件属性值
def assert_attribute_msg(self, element_selector, attr, msg, find_by=By.XPATH): def assert_attribute_msg(self, element_selector, attr, msg, find_by=By.XPATH):
self.wait_unit_elem(element_selector, find_by) self.wait_unit_elem(element_selector, find_by)
attrmsg = self.get_element(element_selector, find_by).get_attribute(attr) attrmsg = self.get_element(element_selector, find_by).get_attribute(attr)
print("actual attribute:",attrmsg) # assert msg in attrmsg
assert msg in attrmsg try:
# try: assert msg in attrmsg
# assert msg in attrmsg except AssertionError:
# except AssertionError: self.imgs.append(self.__driver.get_screenshot_as_base64())
# raise Exception("\nAssertError: actual result is " + attrmsg + \ raise AssertionError("\nAssertError: actual attribute result: " + attrmsg + \
# "; expect restlt is " + msg) "; expect attribute restlt: " + msg)
time.sleep(self.timeout) time.sleep(self.timeout)
'''断言多个控件属性值''' '''断言多个控件属性值'''
def assert_multiple_attribute_msg(self,element_selector,attr,msg,find_by=By.XPATH): def assert_multiple_attribute_msg(self,element_selector,attr,msg,find_by=By.XPATH):
self.wait_unit_elem(element_selector, find_by) self.wait_unit_elem(element_selector, find_by)
attributes = self.get_elements(element_selector, find_by) attributes = self.get_elements(element_selector, find_by)
print("actual attributes:")
for attribute in attributes: for attribute in attributes:
attribute_msg = attribute.get_attribute(attr) attribute_msg = attribute.get_attribute(attr)
print(" " + attribute_msg) # assert msg in attribute_msg
assert msg in attribute_msg try:
# try: assert msg in attribute_msg
# assert msg in attribute_msg except AssertionError:
# except AssertionError: self.imgs.append(self.__driver.get_screenshot_as_base64())
# raise Exception("\nAssertError:Actual result is:"+attribute_msg+";Expect result is:"+msg+".") raise AssertionError("\nAssertError:Actual attribute result: "+attribute_msg+";Expect attribute result: "+msg+".")
...@@ -325,7 +330,11 @@ class WebClient(): ...@@ -325,7 +330,11 @@ class WebClient():
def assert_elem_is_displayed(self, element_selector, flage=1,find_by=By.XPATH): def assert_elem_is_displayed(self, element_selector, flage=1,find_by=By.XPATH):
if 1 == flage: if 1 == flage:
tmp = self.get_element(element_selector, find_by).is_displayed() tmp = self.get_element(element_selector, find_by).is_displayed()
assert tmp == True try:
assert tmp == True
except AssertionError:
self.imgs.append(self.__driver.get_screenshot_as_base64())
raise AssertionError("\nAssertError:The element doesn't exist.")
else: else:
try: try:
self.get_element(element_selector, find_by).is_displayed() self.get_element(element_selector, find_by).is_displayed()
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
var data = [{'startTime': '2019-07-24 19:00:07', 'duration': '0:03:54.638576', 'title': '智能工位系统测试报告', 'status': '错误 6', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 0.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 6 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 0 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 6 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'errorClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'ft1.1\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft1.1\')" >\n 错误</a>\n\n <div id=\'div_ft1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft1.1: The element doesn\'t exist!\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase002_superadministrator_navigation_menu.py", line 30, in tearDown\n self.imgs = self.browser.imgs\nAttributeError: \'NavigationMemu\' object has no attribute \'browser\'\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr class=\'errorClass\'>\n <td>testcase011_companyadmin_create_park.CreatePark</td>\n <td>5</td>\n <td>0</td>\n <td>0</td>\n <td>5</td>\n <td><a href="javascript:showClassDetail(\'c2\',5)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'ft2.1\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_creat_yuanqu_001</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft2.1\')" >\n 错误</a>\n\n <div id=\'div_ft2.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft2.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft2.1: actual attribute: 请输入园区名称\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][1]/li[2]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][2]/li[1]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][3]/li[1]\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase011_companyadmin_create_park.py", line 172, in tearDown\n self.imgs = self.browser.imgs\nAttributeError: \'CreatePark\' object has no attribute \'browser\'\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n<tr id=\'ft2.2\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_create_yuanqu_002</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft2.2\')" >\n 错误</a>\n\n <div id=\'div_ft2.2\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft2.2\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft2.2: Traceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase011_companyadmin_create_park.py", line 63, in test_create_yuanqu_002\n self.brower.click_element(xtpz_yqgl.CREAT_PARK)#点击”添加园区“按钮\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 168, in click_element\n element.click()\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\remote\\webelement.py", line 80, in click\n self._execute(Command.CLICK_ELEMENT)\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\remote\\webelement.py", line 633, in _execute\n return self._parent.execute(command, params)\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\remote\\webdriver.py", line 321, in execute\n self.error_handler.check_response(response)\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\remote\\errorhandler.py", line 242, in check_response\n raise exception_class(message, screen, stacktrace)\nselenium.common.exceptions.ElementNotInteractableException: Message: element not interactable\n (Session info: chrome=75.0.3770.100)\n\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n<tr id=\'ft2.3\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_create_yuanqu_002</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft2.3\')" >\n 错误</a>\n\n <div id=\'div_ft2.3\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft2.3\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft2.3: Traceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase011_companyadmin_create_park.py", line 172, in tearDown\n self.imgs = self.browser.imgs\nAttributeError: \'CreatePark\' object has no attribute \'browser\'\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n<tr id=\'ft2.4\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_create_yuanqu_003</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft2.4\')" >\n 错误</a>\n\n <div id=\'div_ft2.4\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft2.4\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft2.4: INFO:root:else.//*[@class=\'ant-cascader-menu\'][1]/li[2]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][2]/li[1]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][3]/li[1]\nexpected result: 0 ,actual result: 0\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase011_companyadmin_create_park.py", line 172, in tearDown\n self.imgs = self.browser.imgs\nAttributeError: \'CreatePark\' object has no attribute \'browser\'\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n<tr id=\'ft2.5\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_create_yuanqu_004</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft2.5\')" >\n 错误</a>\n\n <div id=\'div_ft2.5\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft2.5\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft2.5: INFO:root:else.//*[@class=\'ant-cascader-menu\'][1]/li[2]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][2]/li[1]\nINFO:root:else.//*[@class=\'ant-cascader-menu\'][3]/li[1]\nexpected result: 1 ,actual result: 1\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase011_companyadmin_create_park.py", line 172, in tearDown\n self.imgs = self.browser.imgs\nAttributeError: \'CreatePark\' object has no attribute \'browser\'\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>6</td>\n <td>0</td>\n <td>0</td>\n <td>6</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'error': '6'}]
\ No newline at end of file
This diff is collapsed.
var data = [{'startTime': '2019-07-24 19:06:53', 'duration': '0:00:23.349356', 'title': '智能工位系统测试报告', 'status': '错误 1', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 0.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 1 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 0 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 1 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'errorClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'ft1.1\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft1.1\')" >\n 错误</a>\n\n <div id=\'div_ft1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft1.1: Traceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 256, in assert_mark_msg\n self.wait_unit_elem(element_selector, find_by)\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 93, in wait_unit_elem\n EC.presence_of_element_located((find_by, element_selector)))\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\support\\wait.py", line 80, in until\n raise TimeoutException(message, screen, stacktrace)\nselenium.common.exceptions.TimeoutException: Message: \n\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase002_superadministrator_navigation_menu.py", line 14, in setUp\n login_swp.login01(self.object,test_data.SUPERADMIN_NAME,test_data.SUPERADMIN_PW,test_data.HOME_PAGE_SUPERADMIN_NAME)\n File "D:\\workspace\\python\\Smart_workspace\\src\\module\\login_swp.py", line 15, in login01\n driver.assert_mark_msg(administrator.ADMINISTRATOR_SUPERADMIN,home_page_name,By.CLASS_NAME)\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 266, in assert_mark_msg\n raise Exception("\\nAssertError:can\'t find element!")\nException: \nAssertError:can\'t find element!\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'error': '1'}]
\ No newline at end of file
This diff is collapsed.
var data = [{'startTime': '2019-07-24 19:07:54', 'duration': '0:00:23.420319', 'title': '智能工位系统测试报告', 'status': '错误 1', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 0.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 1 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 0 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 1 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'errorClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'ft1.1\' class=\'none\'>\n <td class=\'errorCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_ft1.1\')" >\n 错误</a>\n\n <div id=\'div_ft1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_ft1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>ft1.1: Traceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 256, in assert_mark_msg\n self.wait_unit_elem(element_selector, find_by)\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 93, in wait_unit_elem\n EC.presence_of_element_located((find_by, element_selector)))\n File "D:\\python\\lib\\site-packages\\selenium\\webdriver\\support\\wait.py", line 80, in until\n raise TimeoutException(message, screen, stacktrace)\nselenium.common.exceptions.TimeoutException: Message: \n\n\nDuring handling of the above exception, another exception occurred:\n\nTraceback (most recent call last):\n File "D:\\workspace\\python\\Smart_workspace\\src\\testcase_for_test\\testcase002_superadministrator_navigation_menu.py", line 14, in setUp\n login_swp.login01(self.object,test_data.SUPERADMIN_NAME,test_data.SUPERADMIN_PW,test_data.HOME_PAGE_SUPERADMIN_NAME)\n File "D:\\workspace\\python\\Smart_workspace\\src\\module\\login_swp.py", line 15, in login01\n driver.assert_mark_msg(administrator.ADMINISTRATOR_SUPERADMIN,home_page_name,By.CLASS_NAME)\n File "D:\\workspace\\python\\Smart_workspace\\src\\common\\web_client.py", line 266, in assert_mark_msg\n raise Exception("\\nAssertError:can\'t find element!")\nException: \nAssertError:can\'t find element!\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>1</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'error': '1'}]
\ No newline at end of file
This diff is collapsed.
var data = [{'startTime': '2019-07-24 19:17:36', 'duration': '0:00:21.221958', 'title': '智能工位系统测试报告', 'status': '通过 1', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 100.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 0 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 1 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 1 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'passClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'pt1.1\' class=\'hiddenRow\'>\n <td class=\'passCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_pt1.1\')" >\n 通过</a>\n\n <div id=\'div_pt1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_pt1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>pt1.1: The element doesn\'t exist!\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'success': '1'}]
\ No newline at end of file
This diff is collapsed.
var data = [{'startTime': '2019-07-24 19:19:00', 'duration': '0:00:21.303855', 'title': '智能工位系统测试报告', 'status': '通过 1', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 100.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 0 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 1 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 1 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'passClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'pt1.1\' class=\'hiddenRow\'>\n <td class=\'passCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_pt1.1\')" >\n 通过</a>\n\n <div id=\'div_pt1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_pt1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>pt1.1: The element doesn\'t exist!\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'success': '1'}]
\ No newline at end of file
This diff is collapsed.
var data = [{'startTime': '2019-07-25 10:10:15', 'duration': '0:00:21.318346', 'title': '智能工位系统测试报告', 'status': '通过 1', 'desc': '用例执行情况:', 'data': '\n <div id="btn-group">\n <div class="btn-group btn-group-sm">\n <a class="btn btn-primary" onclick=\'javascript:showCase(0)\'>概要{ 100.00% }</a>\n <a class="btn btn-warning" onclick=\'javascript:showCase(4)\'>错误{ 0 }</a>\n <a class="btn btn-danger" onclick=\'javascript:showCase(1)\'>失败{ 0 }</a>\n <a class="btn btn-success" onclick=\'javascript:showCase(2)\'>通过{ 1 }</a>\n <a class="btn btn-info" onclick=\'javascript:showCase(3)\'>所有{ 1 }</a>\n </div>\n <p></p>\n <table id=\'result_table\' class="table table-bordered">\n <colgroup>\n <col align=\'left\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n <col align=\'right\' />\n </colgroup>\n <tr id=\'header_row\'>\n <td>测试套件/测试用例</td>\n <td>总数</td>\n <td>通过</td>\n <td>失败</td>\n <td>错误</td>\n <th>视图</th>\n <th>错误截图</th>\n </tr>\n \n <tr class=\'passClass\'>\n <td>testcase002_superadministrator_navigation_menu.NavigationMemu</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td><a href="javascript:showClassDetail(\'c1\',1)">详情</a></td>\n <td>&nbsp;</td>\n </tr>\n\n<tr id=\'pt1.1\' class=\'hiddenRow\'>\n <td class=\'passCase\'><div class=\'testcase\'>test_navigation_menu_shrin_and_expand</div></td>\n <td colspan=\'5\' align=\'center\'>\n\n <!--css div popup start-->\n <a class="popup_link" onfocus=\'this.blur();\' href="javascript:showTestDetail(\'div_pt1.1\')" >\n 通过</a>\n\n <div id=\'div_pt1.1\' class="popup_window">\n <div style=\'text-align: right; color:red;cursor:pointer\'>\n <a onfocus=\'this.blur();\' onclick="document.getElementById(\'div_pt1.1\').style.display = \'none\' " >\n [x]</a>\n </div>\n <pre>pt1.1: The element doesn\'t exist!\n</pre>\n </div>\n <!--css div popup end-->\n\n </td>\n <td>无截图</td>\n</tr>\n\n <tr id=\'total_row\'>\n <td>总计</td>\n <td>1</td>\n <td>1</td>\n <td>0</td>\n <td>0</td>\n <td>&nbsp;</td>\n <th>&nbsp;</th>\n </tr>\n </table>\n </div>\n', 'success': '1'}]
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment