提交 537ccdc1 authored 作者: 陈泽健's avatar 陈泽健

将用户管理模块的代码进行重构,将新增用户、删除用户、修改用户等公用的操作封装到base目录下,方便后续管理。使用元素定位插件进行定位,解决定位失败的问题。测试报告中补充用例截图。

上级 f5ca9ae3
...@@ -187,126 +187,130 @@ class Mqtt: ...@@ -187,126 +187,130 @@ class Mqtt:
return list(reader) return list(reader)
@staticmethod @staticmethod
def build_message(configs, current_time, topic): def wait_for_message(self, topic, timeout=5):
"""
等待指定主题的消息
:param topic: 主题名称
:param timeout: 超时时间(秒)
:return: 接收到的消息或 None
"""
if self.client:
start_time = datetime.now()
while (datetime.now() - start_time).total_seconds() < timeout:
if hasattr(self, 'received_message'):
return self.received_message
sleep(0.1)
return None
return None
@staticmethod
def read_config_from_csv(file_path):
"""
从 CSV 文件读取配置-
:param file_path: CSV 文件路径
:return: 配置列表
"""
with open(file_path, mode='r', encoding='utf-8') as file:
reader = csv.DictReader(file)
return list(reader)
@staticmethod
def build_message(config, current_time,topic):
""" """
构建消息内容 构建消息内容
:param configs: 配置字典 :param config: 配置字典
:param current_time: 当前时间 :param current_time: 当前时间
:param topic: 消息主题
:return: 消息字典 :return: 消息字典
""" """
if not isinstance(current_time, str) or not isinstance(topic, str): #安卓信息设备上报
raise ValueError("current_time and topic must be strings") if topic == "rebootResponseTopic":
return {
client_id = configs.get('clientID', '') "method": "/system/readSystemInfo",
app_token = configs.get('appToken', '') "clientId": config['clientId'],
company_number = configs.get('companyNumber', '') "result": json.dumps({
cnum = configs.get('cnum', '') "result": {
conference_name = configs.get('conferenceName', '测试会议室') "buildInfo": {
conference_id = int(configs.get('conferenceID', 0)) "appToken": config['appToken'],
mac_address = configs.get('macAddress', '') "companyNumber": config['companyNumber'],
auth_code = configs.get('authCode', '') "cnum": config['cnum'],
presence_state = configs.get('presence_state','') "conferenceName": "测试会议室",
kaiguan = configs.get('kaiguan', '') "conferenceId": int(config['conferenceId']),
julishezhi = configs.get('julishezhi', '') "defaultQrCodeUrl": "http://192.168.5.218:8888/group1/M00/00/21/wKgFyGNBWZmADtnNAAAwrxR0X8s016.png",
lingmindushezhi = configs.get('lingmindushezhi', '') "aliasName": "zt",
wifi_mac = configs.get('wifi_mac', '') "serverBaseUrl": "http://192.168.5.218:8996/",
ble_mac = configs.get('ble_mac', '') "localBindTime": current_time,
sn = configs.get('sn', '') "generalField": "{\"conferencePhone\":\"\",\"chooseTimeType\":1,\"meetingTopicSwitch\":\"1\",\"meetingContentSwitch\":\"1\",\"meetingReverseTypeSwitch\":\"1\",\"seatArrangeSwitch\":\"1\",\"meetingVoteSwitch\":\"1\",\"floorPlanPath\":\"\",\"jumpToPaperless\":2,\"approvalList\":[],\"isLeaderJoin\":false,\"meetingPublishScreenSwitch\":\"1\"}"
ip = configs.get('ip', '') },
"faceVersion": "4.2.12021020201.1",
try: "wgtVersion": "0.0.81",
if topic == "rebootResponseTopic": "deviceModel": "yx_rk3288",
message = { "abiList": ["armeabi-v7a", "armeabi"],
"method": "/system/readSystemInfo", "androidId": "48134e6047a19aaf",
"clientId": client_id, "appName": "UBAINS",
"result": json.dumps({ "appPackageName": "com.ubains.local.gviewer",
"result": { "appVersion": 78,
"buildInfo": { "appVersionName": "1.1.78",
"appToken": app_token, "battery": 0,
"companyNumber": company_number, "bluetoothEnabled": False,
"cnum": cnum, "camerasCount": 1,
"conferenceName": conference_name, "charging": True,
"conferenceId": conference_id, "density": 1,
"defaultQrCodeUrl": "http://192.168.5.218:8888/group1/M00/00/21/wKgFyGNBWZmADtnNAAAwrxR0X8s016.png", "freeAndTotalMemory": "1176M/1997M",
"aliasName": "zt", "internalAvailableSize": 4306395136,
"serverBaseUrl": "http://192.168.5.218:8996/", "internalTotalSize": 4877451264,
"localBindTime": current_time, "ipAddress": "192.168.5.129",
"generalField": "{\"conferencePhone\":\"\",\"chooseTimeType\":1,\"meetingTopicSwitch\":\"1\",\"meetingContentSwitch\":\"1\",\"meetingReverseTypeSwitch\":\"1\",\"seatArrangeSwitch\":\"1\",\"meetingVoteSwitch\":\"1\",\"floorPlanPath\":\"\",\"jumpToPaperless\":2,\"approvalList\":[],\"isLeaderJoin\":false,\"meetingPublishScreenSwitch\":\"1\"}" "macAddress": config['macAddress'],
}, "networkType": "NETWORK_ETHERNET",
"faceVersion": "4.2.12021020201.1", "processCpuUsage": "0.82%",
"wgtVersion": "0.0.81", "resolution": "1280x800",
"deviceModel": "yx_rk3288", "romName": "rockchip",
"abiList": ["armeabi-v7a", "armeabi"], "rooted": True,
"androidId": "48134e6047a19aaf", "sdkVersionCode": 25,
"appName": "UBAINS", "sdkVersionName": "7.1.2",
"appPackageName": "com.ubains.local.gviewer", "sysDate": "Tue Oct 22 18:24:52 GMT+08:00 2024",
"appVersion": 78, "sysDateStr": current_time,
"appVersionName": "1.1.78", "sysElapsedRealtime": "342:26:11",
"battery": 0, "sysLanguage": "zh",
"bluetoothEnabled": False, "sysSupportedSensors": ["Accelerometer sensor", "Gyroscope sensor",
"camerasCount": 1, "Game Rotation Vector Sensor",
"charging": True, "Gravity Sensor"],
"density": 1, "authCode": config['authCode'],
"freeAndTotalMemory": "1176M/1997M", "conferenceName": "测试会议室"
"internalAvailableSize": 4306395136,
"internalTotalSize": 4877451264,
"ipAddress": "192.168.5.129",
"macAddress": mac_address,
"networkType": "NETWORK_ETHERNET",
"processCpuUsage": "0.82%",
"resolution": "1280x800",
"romName": "rockchip",
"rooted": True,
"sdkVersionCode": 25,
"sdkVersionName": "7.1.2",
"sysDate": "Tue Oct 22 18:24:52 GMT+08:00 2024",
"sysDateStr": current_time,
"sysElapsedRealtime": "342:26:11",
"sysLanguage": "zh",
"sysSupportedSensors": ["Accelerometer sensor", "Gyroscope sensor",
"Game Rotation Vector Sensor",
"Gravity Sensor"],
"authCode": auth_code,
"conferenceName": conference_name
}
})
}
return message
elif topic == "/uams/android/broadcast":
message = {
"type": "heartbeat",
"clientId": client_id,
"appId": "com.ubains.uniplatform",
"deviceId": client_id
}
return json.dumps(message)
# 毫米波雷达数据上报
elif "/properties/upload" in topic or "/properties/upload" in topic:
return json.dumps({
"properties":{
"client_id" : client_id,
"presence_state" : presence_state,
"kaiguan" : kaiguan,
"julishezhi" : julishezhi,
"lingmindushezhi" : lingmindushezhi,
"led":1,
"wifi_mac" : wifi_mac,
"ble_mac" : ble_mac,
"last_connection_time": current_time,
"current_time":"2024-08-28 17:21:36",
"device_model" : "c1_100_wifi_u",
"fw_version":"0.0.6",
"sn" : sn,
"ip" : ip
} }
}) })
}
except (ValueError, TypeError) as e: #安卓信息心跳上报
raise ValueError(f"Error building message: {e}") elif topic == "/uams/android/broadcast":
return json.dumps({
"type":"heartbeat",
"clientId" : config['clientId'],
"appId":"com.ubains.uniplatform",
"deviceId": config['deviceId']
})
#毫米波雷达数据上报
elif "/properties/upload" in topic or "/properties/upload" in topic:
return json.dumps({
"properties":{
"client_id" : config['client_id'],
"presence_state" : config['presence_state'],
"kaiguan" : config['kaiguan'],
"julishezhi" : config['julishezhi'],
"lingmindushezhi" : config['lingmindushezhi'],
"led":1,
"wifi_mac" : config['wifi_mac'],
"ble_mac" : config['ble_mac'],
"last_connection_time": current_time,
"current_time":"2024-08-28 17:21:36",
"device_model" : "c1_100_wifi_u",
"fw_version":"0.0.6",
"sn" : config['sn'],
"ip" : config['ip']
}
})
def send_and_receive_messages(self, topic, message, num_times=1, timeout=5, interval=0.2): def send_and_receive_messages(self, topic, message, num_times=1, timeout=5, interval=0.2):
""" """
......
import logging import logging
from hytest import * from hytest import *
from selenium import webdriver from selenium import webdriver
from selenium.common import TimeoutException, NoSuchElementException, ElementNotInteractableException
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC from selenium.webdriver.support import expected_conditions as EC
...@@ -12,7 +13,8 @@ def browser_init(): ...@@ -12,7 +13,8 @@ def browser_init():
wd = webdriver.Chrome(options=options) wd = webdriver.Chrome(options=options)
wd.implicitly_wait(10) wd.implicitly_wait(10)
wd.get('https://nat.ubainsyun.com:11046') wd.get('https://192.168.5.218/#/login/logindf')
# wd.get('https://nat.ubainsyun.com:11046')
wd.maximize_window() wd.maximize_window()
GSTORE['wd'] = wd GSTORE['wd'] = wd
...@@ -24,14 +26,10 @@ def handle_ssl_warning(): ...@@ -24,14 +26,10 @@ def handle_ssl_warning():
INFO("'----------' 正在处理SSL证书警告 '----------'") INFO("'----------' 正在处理SSL证书警告 '----------'")
# 等待并点击“详细信息”按钮 # 等待并点击“详细信息”按钮
WebDriverWait(wd, 10).until( safe_click((By.XPATH, '//*[@id="details-button"]'), wd)
EC.element_to_be_clickable((By.XPATH, '//*[@id="details-button"]'))
).click()
# 等待并点击“继续”链接,以忽略 SSL 警告 # 等待并点击“继续”链接,以忽略 SSL 警告
WebDriverWait(wd, 10).until( safe_click((By.XPATH, '//*[@id="proceed-link"]'), wd)
EC.element_to_be_clickable((By.XPATH, '//*[@id="proceed-link"]'))
).click()
# 等待页面加载完成 # 等待页面加载完成
WebDriverWait(wd, 10).until( WebDriverWait(wd, 10).until(
...@@ -48,55 +46,52 @@ def handle_ssl_warning(): ...@@ -48,55 +46,52 @@ def handle_ssl_warning():
def admin_login(): def admin_login():
wd = GSTORE['wd'] wd = GSTORE['wd']
INFO("输入用户名:admin@czj") INFO("输入用户名:admin@ZDH")
# 等待元素刷新 # 等待元素刷新
WebDriverWait(wd, 10).until( safe_send_keys((By.XPATH, "//input[@placeholder='请输入账号或手机号或邮箱号']"),'admin@ZDH', wd)
EC.element_to_be_clickable((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[1]/div/input')
)).send_keys("admin@czj")
INFO("输入密码:Ubains@4321") INFO("输入密码:Ubains@4321")
WebDriverWait(wd, 10).until( safe_send_keys((By.XPATH, "//input[@placeholder='请输入密码']"), "Ubains@4321", wd)
EC.element_to_be_clickable((By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[2]/div/input')
)).send_keys("Ubains@4321")
INFO("输入验证码:csba") INFO("输入验证码:csba")
WebDriverWait(wd, 10).until( safe_send_keys((By.XPATH, "//input[@placeholder='请输入图形验证码']"), "csba", wd)
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[3]/div[1]/div/input')
)).send_keys("csba")
wd.implicitly_wait(5) wd.implicitly_wait(5)
INFO("点击登录按钮") INFO("点击登录按钮")
WebDriverWait(wd, 10).until( safe_click((By.XPATH, "//input[@value='登 录']"), wd)
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[3]/div[1]/div[2]/div/form/div[4]/input')
)).click()
INFO("进入后台")
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[1]/div/img[2]')
)).click()
def enter_the_backend(): def enter_the_backend():
INFO("进入后台") INFO("进入后台")
wd = GSTORE['wd'] wd = GSTORE['wd']
WebDriverWait(wd, 10).until( safe_click((By.XPATH, "//img[@title='后台系统']"), wd)
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[1]/div/img[2]')
)).click()
INFO("打开账号管理下拉菜单") INFO("打开账号管理下拉菜单")
WebDriverWait(wd, 10).until( safe_click((By.XPATH, "//span[@class='aside_menu menu_account']"), wd)
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[2]/div[1]/ul/li[3]/div/span[1]')
)).click()
INFO("进入用户管理模块") INFO("进入用户管理模块")
WebDriverWait(wd, 10).until( safe_click((By.XPATH, "//li[contains(text(),'用户管理')]"), wd)
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[2]/div[1]/ul/li[3]/ul/li/ul/li[4]') def safe_send_keys(element_locator, value, wd):
)).click() try:
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
element.send_keys(value)
except TimeoutException:
print(f"TimeoutException: Element {element_locator} not found or not clickable within 10 seconds.")
except NoSuchElementException:
print(f"NoSuchElementException: Element {element_locator} not found.")
except ElementNotInteractableException:
print(f"ElementNotInteractableException: Element {element_locator} is not interactable.")
def safe_click(element_locator, wd):
try:
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
element.click()
except TimeoutException:
print(f"TimeoutException: Element {element_locator} not found or not clickable within 10 seconds.")
except NoSuchElementException:
print(f"NoSuchElementException: Element {element_locator} not found.")
except ElementNotInteractableException:
print(f"ElementNotInteractableException: Element {element_locator} is not interactable.")
def browser_quit(): def browser_quit():
INFO("清除浏览器") INFO("清除浏览器")
......
...@@ -22,4 +22,7 @@ ...@@ -22,4 +22,7 @@
6. 2024-11-02 6. 2024-11-02
- 将原有pytest框架代码改为hytest框架使用,优化了脚本执行效率,并对应增加异常处理。 - 将原有pytest框架代码改为hytest框架使用,优化了脚本执行效率,并对应增加异常处理。
- MQTT相关模块目前调整了Mqtt_Send.py文件中封装的方法优化,增加异常处理。处理了登录成功断言失败的问题。 - MQTT相关模块目前调整了Mqtt_Send.py文件中封装的方法优化,增加异常处理。处理了登录成功断言失败的问题。
- 补充用户管理模块的新增用户部分代码,当前存在新增界面弹窗后定位失败问题。 - 补充用户管理模块的新增用户部分代码,当前存在新增界面弹窗后定位失败问题。
\ No newline at end of file 7. 2024-11-04
- 将用户管理模块的代码进行重构,将新增用户、删除用户、修改用户等公用的操作封装到base目录下,方便后续管理。
- 使用元素定位插件进行定位,解决定位失败的问题。
\ No newline at end of file
...@@ -21,7 +21,7 @@ except ModuleNotFoundError as e: ...@@ -21,7 +21,7 @@ except ModuleNotFoundError as e:
current_dir = os.path.dirname(os.path.abspath(__file__)) current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径 # 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../测试数据/MQTT安卓上报数据.csv') csv_file_path = os.path.join(current_dir, '../../测试数据/MQTT安卓上报与心跳上报.csv')
if __name__ == "__main__": if __name__ == "__main__":
# 读取配置文件 # 读取配置文件
......
import sys
import os
import time import time
from logging import ERROR
from time import sleep from time import sleep
from selenium.common.exceptions import TimeoutException, NoSuchElementException, ElementNotInteractableException, \ from selenium.common.exceptions import TimeoutException, NoSuchElementException, ElementNotInteractableException, NoSuchWindowException
NoSuchWindowException
from hytest import * from hytest import *
from selenium.webdriver.support.select import Select
# 获取当前脚本的绝对路径 # 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__)) current_dir = os.path.dirname(os.path.abspath(__file__))
...@@ -23,44 +20,7 @@ except ModuleNotFoundError as e: ...@@ -23,44 +20,7 @@ except ModuleNotFoundError as e:
DEFAULT_WAIT_TIME = 20 DEFAULT_WAIT_TIME = 20
# 默认等待时间(秒),用于元素加载或操作之间的等待 # 默认等待时间(秒),用于元素加载或操作之间的等待
CLASS_MESSAGE_CONTENT = 'el-message__content' CLASS_MESSAGE_CONTENT = "//p[@class='el-message__content']"
def safe_send_keys(element_locator, value, wd):
try:
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
element.send_keys(value)
except TimeoutException:
print(f"TimeoutException: Element {element_locator} not found or not clickable within 10 seconds.")
except NoSuchElementException:
print(f"NoSuchElementException: Element {element_locator} not found.")
except ElementNotInteractableException:
print(f"ElementNotInteractableException: Element {element_locator} is not interactable.")
def safe_click(element_locator, wd):
try:
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
element.click()
except TimeoutException:
print(f"TimeoutException: Element {element_locator} not found or not clickable within 10 seconds.")
except NoSuchElementException:
print(f"NoSuchElementException: Element {element_locator} not found.")
except ElementNotInteractableException:
print(f"ElementNotInteractableException: Element {element_locator} is not interactable.")
def handle_modal_popup(wd):
try:
# 等待模态弹窗出现
modal_popup = WebDriverWait(wd, 10).until(EC.visibility_of_element_located((By.XPATH, '/html/body/div[2]/div')))
except TimeoutException:
print("TimeoutException: Modal popup not found within 10 seconds.")
except NoSuchElementException:
print("NoSuchElementException: Elements in modal popup not found.")
except ElementNotInteractableException:
print("ElementNotInteractableException: Elements in modal popup are not interactable.")
except Exception as e:
print(f"Unexpected error: {e}")
class Add_User_00x: class Add_User_00x:
...@@ -269,41 +229,40 @@ class Add_User_00x: ...@@ -269,41 +229,40 @@ class Add_User_00x:
(By.XPATH, '//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/button[2]/span') (By.XPATH, '//*[@id="app"]/div/div[2]/div[2]/div/div/div[2]/div[2]/button[2]/span')
)).click() )).click()
sleep(1) sleep(1)
handle_modal_popup(wd) # wd = handle_modal_popup(wd)
STEP(2, STEP(2,
f"输入账号:{account},用户名:{username},密码:{password},确认密码: {check_password},手机号:{phone},邮箱:{email}") f"输入账号:{account},用户名:{username},密码:{password},确认密码: {check_password},手机号:{phone},邮箱:{email}")
if account is not None: if account is not None:
safe_send_keys((By.XPATH, '/html/body/div[3]/div/div[2]/div[1]/div/input'), account, wd) safe_send_keys((By.XPATH, "//input[@id='accountChange']"), account, wd)
if username is not None: if username is not None:
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd) safe_send_keys((By.XPATH, "//input[@placeholder='用户名']"), username, wd)
if password is not None: if password is not None:
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[3]/div[2]/input'), password, wd) safe_send_keys((By.XPATH, "//input[@placeholder='11位及以上的大小写字母和数字且连续3位及以上不重复和不连续组合']"), password, wd)
if check_password is not None: if check_password is not None:
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[4]/div[2]/input'), check_password, wd) safe_send_keys((By.XPATH, "//input[@placeholder='确认密码']"), check_password, wd)
safe_click((By.XPATH, '/html/body/div[5]/div/div[2]/div[5]/div/div[1]/input'), wd) safe_click((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请选择']"), wd)
safe_click((By.XPATH, '//*[@id="cascader-menu-1727-0-0"]/span'), wd) safe_click((By.XPATH, "/html[1]/body[1]/div[4]/div[1]/div[1]/div[1]/ul[1]/li[1]/label[1]/span[1]/span[1]"), wd)
safe_click((By.XPATH, '/html/body/div[5]/div/div[2]/div[6]/div/label[1]/span[2]'), wd) safe_click((By.XPATH, "//span[contains(text(),'男')]"), wd)
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[7]/div/input'), phone, wd) safe_send_keys((By.XPATH, "//input[@placeholder='手机']"), phone, wd)
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[8]/div/input'), email, wd) safe_send_keys((By.XPATH, "//input[@placeholder='邮箱']"), email, wd)
SELENIUM_LOG_SCREEN(wd) SELENIUM_LOG_SCREEN(wd)
STEP(3, "点击【确定】按钮") STEP(3, "点击【确定】按钮")
time.sleep(2) safe_click((By.XPATH, "//div[@aria-label='添加用户']//span[contains(text(),'确定')]"), wd)
safe_click((By.XPATH, '/html/body/div[5]/div/div[3]/span/button/span'), wd)
time.sleep(2)
try: try:
notify_text = WebDriverWait(wd, DEFAULT_WAIT_TIME).until( notify_text = WebDriverWait(wd, DEFAULT_WAIT_TIME).until(
EC.presence_of_element_located((By.XPATH, CLASS_MESSAGE_CONTENT)) EC.presence_of_element_located((By.XPATH, CLASS_MESSAGE_CONTENT))
).text ).text
SELENIUM_LOG_SCREEN(wd)
except Exception as e: except Exception as e:
INFO(f"Exception occurred: {e}") INFO(f"Exception occurred: {e}")
......
<!DOCTYPE html>
<html>
<head>
<title>测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 16:29:43</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 16:30:13</td>
</tr>
<tr>
<td>耗时</td>
<td>30.483 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-02 16:29:43</span>
</div>
<div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\设备管理\安卓信息上报.py">
<div>
<span class="label">进入文件</span>
<span>cases\设备管理\安卓信息上报.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">设备上报_0001</span>
<span class="executetime">2024-11-02 16:29:49</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\设备管理\安卓信息上报.py::Android_000x</span>
<div class="test_steps" id="test_steps 设备上报_0001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>连接MQTT</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>MQTT发送消息</span>
</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-02 16:30:11</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:14:15</td> <td>2024/11/03 10:16:18</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:14:26</td> <td>2024/11/03 10:16:56</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>11.111</td> <td>38.072</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:14:15</span> <span class="executetime">2024-11-03 10:16:18</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,7 +419,7 @@ function next_error(){ ...@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:14:23</span> <span class="executetime">2024-11-03 10:16:29</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@czj</div>
...@@ -442,7 +442,7 @@ function next_error(){ ...@@ -442,7 +442,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 ABORT</span> <span class="label caselabel">用例 ABORT</span>
<span class="casename">用户新增_001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 22:14:24</span> <span class="executetime">2024-11-03 10:16:31</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
...@@ -452,11 +452,21 @@ function next_error(){ ...@@ -452,11 +452,21 @@ function next_error(){
<span class="tag">步骤 #1</span> <span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span> <span>点击【新增】按钮</span>
</div> </div>
<div class="info error-info">'WebDriver' object has no attribute 'find_element_by_xpath' <div class="case_step">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div class="info error-info">'NoneType' object has no attribute 'find_element'
Traceback: Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 252, in teststeps File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 278, in teststeps
wd.find_element_by_xpath('//*[@id=&quot;app&quot;]/div/div[2]/div[2]/div/div/div[2]/div[2]/button[2]/span').clck() safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath' File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 26, in safe_send_keys
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
value = method(self._driver)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
AttributeError: 'NoneType' object has no attribute 'find_element'
</div> </div>
</div> </div>
</div> </div>
...@@ -465,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath' ...@@ -465,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:14:24</span> <span class="executetime">2024-11-03 10:16:54</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:05:59</td> <td>2024/11/03 10:23:03</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:06:10</td> <td>2024/11/03 10:23:36</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>11.108</td> <td>33.301</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:05:59</span> <span class="executetime">2024-11-03 10:23:03</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,13 +419,17 @@ function next_error(){ ...@@ -419,13 +419,17 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:06:08</span> <span class="executetime">2024-11-03 10:23:10</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@czj</div>
<div class="info">输入密码:Ubains@4321</div> <div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div> <div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div> <div class="info">点击登录按钮</div>
<div class="info">进入后台</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -438,7 +442,7 @@ function next_error(){ ...@@ -438,7 +442,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 ABORT</span> <span class="label caselabel">用例 ABORT</span>
<span class="casename">用户新增_001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 22:06:08</span> <span class="executetime">2024-11-03 10:23:11</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
...@@ -448,11 +452,21 @@ function next_error(){ ...@@ -448,11 +452,21 @@ function next_error(){
<span class="tag">步骤 #1</span> <span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span> <span>点击【新增】按钮</span>
</div> </div>
<div class="info error-info">'WebDriver' object has no attribute 'find_element_by_xpath' <div class="case_step">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div class="info error-info">'NoneType' object has no attribute 'find_element'
Traceback: Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 252, in teststeps File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 282, in teststeps
wd.find_element_by_xpath('//*[@id=&quot;app&quot;]/div/div[2]/div[2]/div/div/div[2]/div[2]/button[2]/span').clck() safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath' File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 26, in safe_send_keys
element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
value = method(self._driver)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 156, in _predicate
return _element_if_visible(driver.find_element(*locator))
AttributeError: 'NoneType' object has no attribute 'find_element'
</div> </div>
</div> </div>
</div> </div>
...@@ -461,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath' ...@@ -461,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:06:08</span> <span class="executetime">2024-11-03 10:23:34</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:22:21</td> <td>2024/11/03 11:01:11</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:22:44</td> <td>2024/11/03 11:02:22</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>22.767</td> <td>71.630</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:22:21</span> <span class="executetime">2024-11-03 11:01:11</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,7 +419,7 @@ function next_error(){ ...@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:22:30</span> <span class="executetime">2024-11-03 11:01:18</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@czj</div>
...@@ -442,7 +442,7 @@ function next_error(){ ...@@ -442,7 +442,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 ABORT</span> <span class="label caselabel">用例 ABORT</span>
<span class="casename">用户新增_001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 22:22:31</span> <span class="executetime">2024-11-03 11:01:19</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
...@@ -452,63 +452,23 @@ function next_error(){ ...@@ -452,63 +452,23 @@ function next_error(){
<span class="tag">步骤 #1</span> <span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span> <span>点击【新增】按钮</span>
</div> </div>
<div class="info">Waiting for modal popup to appear...</div>
<div class="info">TimeoutException: Modal popup not found within 20 seconds.</div>
<div class="case_step"> <div class="case_step">
<span class="tag">步骤 #2</span> <span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span> <span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div> </div>
<div class="info error-info">Message: <div class="info error-info">'NoneType' object has no attribute 'find_element'
Stacktrace:
GetHandleVerifier [0x00007FF63C4DFD55+29557]
(No symbol) [0x00007FF63C4521F0]
(No symbol) [0x00007FF63C30B6EA]
(No symbol) [0x00007FF63C35FA15]
(No symbol) [0x00007FF63C35FC6C]
(No symbol) [0x00007FF63C3ABB07]
(No symbol) [0x00007FF63C38753F]
(No symbol) [0x00007FF63C3A88A3]
(No symbol) [0x00007FF63C3872A3]
(No symbol) [0x00007FF63C3512DF]
(No symbol) [0x00007FF63C352451]
GetHandleVerifier [0x00007FF63C80DC4D+3363437]
GetHandleVerifier [0x00007FF63C859AD7+3674359]
GetHandleVerifier [0x00007FF63C84EA7B+3629211]
GetHandleVerifier [0x00007FF63C59FC16+815670]
(No symbol) [0x00007FF63C45D69F]
(No symbol) [0x00007FF63C459264]
(No symbol) [0x00007FF63C459400]
(No symbol) [0x00007FF63C4481AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
Traceback: Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 266, in teststeps File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 287, in teststeps
WebDriverWait(wd, 10).until( safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 105, in until File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 27, in safe_send_keys
raise TimeoutException(message, screen, stacktrace) element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
selenium.common.exceptions.TimeoutException: Message: File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
Stacktrace: value = method(self._driver)
GetHandleVerifier [0x00007FF63C4DFD55+29557] File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 156, in _predicate
(No symbol) [0x00007FF63C4521F0] return _element_if_visible(driver.find_element(*locator))
(No symbol) [0x00007FF63C30B6EA] AttributeError: 'NoneType' object has no attribute 'find_element'
(No symbol) [0x00007FF63C35FA15]
(No symbol) [0x00007FF63C35FC6C]
(No symbol) [0x00007FF63C3ABB07]
(No symbol) [0x00007FF63C38753F]
(No symbol) [0x00007FF63C3A88A3]
(No symbol) [0x00007FF63C3872A3]
(No symbol) [0x00007FF63C3512DF]
(No symbol) [0x00007FF63C352451]
GetHandleVerifier [0x00007FF63C80DC4D+3363437]
GetHandleVerifier [0x00007FF63C859AD7+3674359]
GetHandleVerifier [0x00007FF63C84EA7B+3629211]
GetHandleVerifier [0x00007FF63C59FC16+815670]
(No symbol) [0x00007FF63C45D69F]
(No symbol) [0x00007FF63C459264]
(No symbol) [0x00007FF63C459400]
(No symbol) [0x00007FF63C4481AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
</div> </div>
</div> </div>
</div> </div>
...@@ -517,7 +477,7 @@ Stacktrace: ...@@ -517,7 +477,7 @@ Stacktrace:
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:22:42</span> <span class="executetime">2024-11-03 11:02:20</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:08:06</td> <td>2024/11/04 09:30:57</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:08:16</td> <td>2024/11/04 09:31:06</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>9.684</td> <td>9.140</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:08:06</span> <span class="executetime">2024-11-04 09:30:57</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,7 +419,7 @@ function next_error(){ ...@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:08:13</span> <span class="executetime">2024-11-04 09:31:04</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@czj</div>
...@@ -427,11 +427,80 @@ function next_error(){ ...@@ -427,11 +427,80 @@ function next_error(){
<div class="info">输入验证码:csba</div> <div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div> <div class="info">点击登录按钮</div>
<div class="info">进入后台</div> <div class="info">进入后台</div>
<div class="info error-info">suite setup fail | 'WebDriver' object has no attribute 'find_element_by_link_text' <div class="info">进入后台</div>
<div class="info error-info">suite setup fail | Message: stale element reference: stale element not found in the current frame
(Session info: chrome=130.0.6723.92); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
Stacktrace:
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0D522BE]
(No symbol) [0x00007FF6E0D54637]
(No symbol) [0x00007FF6E0D546F0]
(No symbol) [0x00007FF6E0D99BD0]
(No symbol) [0x00007FF6E0DC74FA]
(No symbol) [0x00007FF6E0D93006]
(No symbol) [0x00007FF6E0DC7710]
(No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
Traceback: Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py&quot;, line 21, in suite_setup File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py&quot;, line 20, in suite_setup
wd.find_element_by_link_text('账号管理').click() enter_the_backend()
AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text' File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py&quot;, line 85, in enter_the_backend
WebDriverWait(wd, 10).until(
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 96, in until
value = method(self._driver)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py&quot;, line 365, in _predicate
if element and element.is_enabled():
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py&quot;, line 192, in is_enabled
return self._execute(Command.IS_ELEMENT_ENABLED)[&quot;value&quot;]
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py&quot;, line 395, in _execute
return self._parent.execute(command, params)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 380, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.StaleElementReferenceException: Message: stale element reference: stale element not found in the current frame
(Session info: chrome=130.0.6723.92); For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#stale-element-reference-exception
Stacktrace:
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0D522BE]
(No symbol) [0x00007FF6E0D54637]
(No symbol) [0x00007FF6E0D546F0]
(No symbol) [0x00007FF6E0D99BD0]
(No symbol) [0x00007FF6E0DC74FA]
(No symbol) [0x00007FF6E0D93006]
(No symbol) [0x00007FF6E0DC7710]
(No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
</div> </div>
</div> </div>
</div> </div>
...@@ -439,7 +508,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text' ...@@ -439,7 +508,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text'
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:08:14</span> <span class="executetime">2024-11-04 09:31:04</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
<!DOCTYPE html>
<html>
<head>
<title>测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/04 10:00:26</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/04 10:00:36</td>
</tr>
<tr>
<td>耗时</td>
<td>9.763 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>0</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="color:red">1</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:00:26</span>
</div>
<div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_dir" id="suite_dir cases\账号管理\">
<div>
<span class="label">进入目录</span>
<span>cases\账号管理\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\账号管理\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\账号管理\</span>
<span class="executetime">2024-11-04 10:00:30</span>
</div>
<div class="folder_body">
<div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\账号管理\用户管理.py">
<div>
<span class="label">进入文件</span>
<span>cases\账号管理\用户管理.py</span>
</div>
<div class="case abort" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="casename">用户新增_001</span>
<span class="executetime">2024-11-04 10:00:31</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
<div class="test_steps" id="test_steps 用户新增_001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div class="info error-info">Message: element click intercepted: Element &lt;span class=&quot;el-radio__label&quot;&gt;...&lt;/span&gt; is not clickable at point (586, 439). Other element would receive the click: &lt;label class=&quot;el-checkbox&quot;&gt;...&lt;/label&gt;
(Session info: chrome=130.0.6723.92)
Stacktrace:
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0DA76EE]
(No symbol) [0x00007FF6E0DA513C]
(No symbol) [0x00007FF6E0DA2608]
(No symbol) [0x00007FF6E0DA181A]
(No symbol) [0x00007FF6E0D936CE]
(No symbol) [0x00007FF6E0DC74FA]
(No symbol) [0x00007FF6E0D93006]
(No symbol) [0x00007FF6E0DC7710]
(No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 297, in teststeps
safe_click((By.XPATH, &quot;//span[contains(text(),'男')]&quot;), wd)
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 39, in safe_click
element.click()
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py&quot;, line 94, in click
self._execute(Command.CLICK_ELEMENT)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webelement.py&quot;, line 395, in _execute
return self._parent.execute(command, params)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\webdriver.py&quot;, line 380, in execute
self.error_handler.check_response(response)
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\remote\errorhandler.py&quot;, line 229, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.ElementClickInterceptedException: Message: element click intercepted: Element &lt;span class=&quot;el-radio__label&quot;&gt;...&lt;/span&gt; is not clickable at point (586, 439). Other element would receive the click: &lt;label class=&quot;el-checkbox&quot;&gt;...&lt;/label&gt;
(Session info: chrome=130.0.6723.92)
Stacktrace:
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0DA76EE]
(No symbol) [0x00007FF6E0DA513C]
(No symbol) [0x00007FF6E0DA2608]
(No symbol) [0x00007FF6E0DA181A]
(No symbol) [0x00007FF6E0D936CE]
(No symbol) [0x00007FF6E0DC74FA]
(No symbol) [0x00007FF6E0D93006]
(No symbol) [0x00007FF6E0DC7710]
(No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:00:34</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:29:28</td> <td>2024/11/04 10:03:53</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:31:39</td> <td>2024/11/04 10:04:27</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>130.549</td> <td>33.157</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:29:28</span> <span class="executetime">2024-11-04 10:03:53</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,15 +419,14 @@ function next_error(){ ...@@ -419,15 +419,14 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:29:36</span> <span class="executetime">2024-11-04 10:03:57</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div> <div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div> <div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div> <div class="info">点击登录按钮</div>
<div class="info">进入后台</div> <div class="info">进入后台</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div> <div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div> <div class="info">进入用户管理模块</div>
</div> </div>
...@@ -442,7 +441,7 @@ function next_error(){ ...@@ -442,7 +441,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 FAIL</span> <span class="label caselabel">用例 FAIL</span>
<span class="casename">用户新增_001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 22:29:37</span> <span class="executetime">2024-11-04 10:03:58</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
...@@ -457,33 +456,33 @@ function next_error(){ ...@@ -457,33 +456,33 @@ function next_error(){
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span> <span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div> </div>
<div> <div>
<img class="screenshot" src="imgs/20241102223102566579.png" width="aa"> <img class="screenshot" src="imgs/20241104100401180929.png" width="aa">
</div> </div>
<div class="case_step"> <div class="case_step">
<span class="tag">步骤 #3</span> <span class="tag">步骤 #3</span>
<span>点击【登录】按钮</span> <span>点击【确定】按钮</span>
</div> </div>
<div class="info">Exception occurred: Message: <div class="info">Exception occurred: Message:
Stacktrace: Stacktrace:
GetHandleVerifier [0x00007FF63C4DFD55+29557] GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF63C4521F0] (No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF63C30B6EA] (No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF63C35FA15] (No symbol) [0x00007FF6E0D9FA15]
(No symbol) [0x00007FF63C35FC6C] (No symbol) [0x00007FF6E0D9FC6C]
(No symbol) [0x00007FF63C3ABB07] (No symbol) [0x00007FF6E0DEBB07]
(No symbol) [0x00007FF63C38753F] (No symbol) [0x00007FF6E0DC753F]
(No symbol) [0x00007FF63C3A88A3] (No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF63C3872A3] (No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF63C3512DF] (No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF63C352451] (No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF63C80DC4D+3363437] GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF63C859AD7+3674359] GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF63C84EA7B+3629211] GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF63C59FC16+815670] GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF63C45D69F] (No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF63C459264] (No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF63C459400] (No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF63C4481AF] (No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29] BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40] RtlUserThreadStart [0x00007FFD83FCAF08+40]
</div> </div>
...@@ -498,7 +497,7 @@ Stacktrace: ...@@ -498,7 +497,7 @@ Stacktrace:
</div> </div>
<div class="info error-info"> <div class="info error-info">
Traceback: Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 324, in teststeps File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 323, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div> CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div> </div>
</div> </div>
...@@ -507,7 +506,7 @@ Traceback: ...@@ -507,7 +506,7 @@ Traceback:
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:31:37</span> <span class="executetime">2024-11-04 10:04:24</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 22:25:26</td> <td>2024/11/04 10:08:50</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 22:25:48</td> <td>2024/11/04 10:09:26</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>21.883</td> <td>35.790</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -333,11 +333,11 @@ function next_error(){ ...@@ -333,11 +333,11 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>失败</td> <td>失败</td>
<td style="">0</td> <td style="color:red">1</td>
</tr> </tr>
<tr> <tr>
<td>异常</td> <td>异常</td>
<td style="color:red">1</td> <td style="">0</td>
</tr> </tr>
<tr> <tr>
<td>阻塞</td> <td>阻塞</td>
...@@ -369,15 +369,15 @@ function next_error(){ ...@@ -369,15 +369,15 @@ function next_error(){
</div> </div>
</div> </div>
<div class="barchar_item"> <div class="barchar_item">
<span>用例失败 0% : 0</span> <span>用例失败 100% : 1</span>
<div class="barchart_barbox"> <div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div> <div class="barchart_bar" style="width: 100.0%; background-color: #bb4069;"></div>
</div> </div>
</div> </div>
<div class="barchar_item"> <div class="barchar_item">
<span>用例异常 100% : 1</span> <span>用例异常 0% : 0</span>
<div class="barchart_barbox"> <div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #9c27b0;"></div> <div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div> </div>
</div> </div>
<div class="barchar_item"> <div class="barchar_item">
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:25:26</span> <span class="executetime">2024-11-04 10:08:50</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -419,15 +419,14 @@ function next_error(){ ...@@ -419,15 +419,14 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\账号管理\</span> <span>cases\账号管理\</span>
<span class="executetime">2024-11-02 22:25:34</span> <span class="executetime">2024-11-04 10:08:56</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">输入用户名:admin@czj</div> <div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div> <div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div> <div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div> <div class="info">点击登录按钮</div>
<div class="info">进入后台</div> <div class="info">进入后台</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div> <div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div> <div class="info">进入用户管理模块</div>
</div> </div>
...@@ -438,11 +437,11 @@ function next_error(){ ...@@ -438,11 +437,11 @@ function next_error(){
<span class="label">进入文件</span> <span class="label">进入文件</span>
<span>cases\账号管理\用户管理.py</span> <span>cases\账号管理\用户管理.py</span>
</div> </div>
<div class="case abort" id="case_00000001"> <div class="case fail" id="case_00000001">
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 ABORT</span> <span class="label caselabel">用例 FAIL</span>
<span class="casename">用户新增_001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 22:25:35</span> <span class="executetime">2024-11-04 10:08:58</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
...@@ -456,60 +455,50 @@ function next_error(){ ...@@ -456,60 +455,50 @@ function next_error(){
<span class="tag">步骤 #2</span> <span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span> <span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div> </div>
<div class="info error-info">Message: <div>
Stacktrace: <img class="screenshot" src="imgs/20241104100900653006.png" width="aa">
GetHandleVerifier [0x00007FF63C4DFD55+29557] </div>
(No symbol) [0x00007FF63C4521F0] <div class="case_step">
(No symbol) [0x00007FF63C30B6EA] <span class="tag">步骤 #3</span>
(No symbol) [0x00007FF63C35FA15] <span>点击【确定】按钮</span>
(No symbol) [0x00007FF63C35FC6C] </div>
(No symbol) [0x00007FF63C3ABB07] <div class="info">Exception occurred: Message:
(No symbol) [0x00007FF63C38753F]
(No symbol) [0x00007FF63C3A88A3]
(No symbol) [0x00007FF63C3872A3]
(No symbol) [0x00007FF63C3512DF]
(No symbol) [0x00007FF63C352451]
GetHandleVerifier [0x00007FF63C80DC4D+3363437]
GetHandleVerifier [0x00007FF63C859AD7+3674359]
GetHandleVerifier [0x00007FF63C84EA7B+3629211]
GetHandleVerifier [0x00007FF63C59FC16+815670]
(No symbol) [0x00007FF63C45D69F]
(No symbol) [0x00007FF63C459264]
(No symbol) [0x00007FF63C459400]
(No symbol) [0x00007FF63C4481AF]
BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40]
Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 266, in teststeps
WebDriverWait(wd, 10).until(
File &quot;C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py&quot;, line 105, in until
raise TimeoutException(message, screen, stacktrace)
selenium.common.exceptions.TimeoutException: Message:
Stacktrace: Stacktrace:
GetHandleVerifier [0x00007FF63C4DFD55+29557] GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF63C4521F0] (No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF63C30B6EA] (No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF63C35FA15] (No symbol) [0x00007FF6E0D9FA15]
(No symbol) [0x00007FF63C35FC6C] (No symbol) [0x00007FF6E0D9FC6C]
(No symbol) [0x00007FF63C3ABB07] (No symbol) [0x00007FF6E0DEBB07]
(No symbol) [0x00007FF63C38753F] (No symbol) [0x00007FF6E0DC753F]
(No symbol) [0x00007FF63C3A88A3] (No symbol) [0x00007FF6E0DE88A3]
(No symbol) [0x00007FF63C3872A3] (No symbol) [0x00007FF6E0DC72A3]
(No symbol) [0x00007FF63C3512DF] (No symbol) [0x00007FF6E0D912DF]
(No symbol) [0x00007FF63C352451] (No symbol) [0x00007FF6E0D92451]
GetHandleVerifier [0x00007FF63C80DC4D+3363437] GetHandleVerifier [0x00007FF6E124DC4D+3363437]
GetHandleVerifier [0x00007FF63C859AD7+3674359] GetHandleVerifier [0x00007FF6E1299AD7+3674359]
GetHandleVerifier [0x00007FF63C84EA7B+3629211] GetHandleVerifier [0x00007FF6E128EA7B+3629211]
GetHandleVerifier [0x00007FF63C59FC16+815670] GetHandleVerifier [0x00007FF6E0FDFC16+815670]
(No symbol) [0x00007FF63C45D69F] (No symbol) [0x00007FF6E0E9D69F]
(No symbol) [0x00007FF63C459264] (No symbol) [0x00007FF6E0E99264]
(No symbol) [0x00007FF63C459400] (No symbol) [0x00007FF6E0E99400]
(No symbol) [0x00007FF63C4481AF] (No symbol) [0x00007FF6E0E881AF]
BaseThreadInitThunk [0x00007FFD832E257D+29] BaseThreadInitThunk [0x00007FFD832E257D+29]
RtlUserThreadStart [0x00007FFD83FCAF08+40] RtlUserThreadStart [0x00007FFD83FCAF08+40]
</div> </div>
<div class="info">Alert text: </div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>校验提示信息: 账号为空</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 327, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -517,7 +506,7 @@ Stacktrace: ...@@ -517,7 +506,7 @@ Stacktrace:
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 22:25:46</span> <span class="executetime">2024-11-04 10:09:24</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
<!DOCTYPE html>
<html>
<head>
<title>测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/04 10:11:01</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/04 10:11:15</td>
</tr>
<tr>
<td>耗时</td>
<td>14.569 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>0</td>
</tr>
<tr>
<td>失败</td>
<td style="color:red">1</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:11:01</span>
</div>
<div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_dir" id="suite_dir cases\账号管理\">
<div>
<span class="label">进入目录</span>
<span>cases\账号管理\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\账号管理\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\账号管理\</span>
<span class="executetime">2024-11-04 10:11:08</span>
</div>
<div class="folder_body">
<div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\账号管理\用户管理.py">
<div>
<span class="label">进入文件</span>
<span>cases\账号管理\用户管理.py</span>
</div>
<div class="case fail" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 FAIL</span>
<span class="casename">用户新增_001</span>
<span class="executetime">2024-11-04 10:11:09</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
<div class="test_steps" id="test_steps 用户新增_001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div>
<img class="screenshot" src="imgs/20241104101111685742.png" width="aa">
</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>点击【确定】按钮</span>
</div>
<div class="info">Alert text: </div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>校验提示信息: 账号为空</span>
</div>
<div class="checkpoint_fail">
<span class="tag">检查点 FAIL</span>
<span>弹出提示</span>
</div>
<div class="info error-info">
Traceback:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 327, in teststeps
CHECK_POINT('弹出提示', notify_text == check_text)</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:11:13</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="block">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -309,15 +309,15 @@ function next_error(){ ...@@ -309,15 +309,15 @@ function next_error(){
</tr> </tr>
<tr> <tr>
<td>开始时间</td> <td>开始时间</td>
<td>2024/11/02 20:56:07</td> <td>2024/11/04 10:12:02</td>
</tr> </tr>
<tr> <tr>
<td>结束时间</td> <td>结束时间</td>
<td>2024/11/02 20:56:19</td> <td>2024/11/04 10:12:14</td>
</tr> </tr>
<tr> <tr>
<td>耗时</td> <td>耗时</td>
<td>12.187</td> <td>11.779</td>
</tr> </tr>
<tr> <tr>
<td>预备执行用例数量</td> <td>预备执行用例数量</td>
...@@ -401,7 +401,7 @@ function next_error(){ ...@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header"> <div class="folder_header">
<span class="label">套件初始化</span> <span class="label">套件初始化</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 20:56:07</span> <span class="executetime">2024-11-04 10:12:02</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div> <div class="info">'----------' 正在初始化浏览器 '----------'</div>
...@@ -410,56 +410,75 @@ function next_error(){ ...@@ -410,56 +410,75 @@ function next_error(){
</div> </div>
</div> </div>
</div> </div>
<div class="suite_file" id="suite_file cases\登录模块\账号密码登录测试.py"> <div class="suite_dir" id="suite_dir cases\账号管理\">
<div>
<span class="label">进入目录</span>
<span>cases\账号管理\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\账号管理\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\账号管理\</span>
<span class="executetime">2024-11-04 10:12:06</span>
</div>
<div class="folder_body">
<div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\账号管理\用户管理.py">
<div> <div>
<span class="label">进入文件</span> <span class="label">进入文件</span>
<span>cases\登录模块\账号密码登录测试.py</span> <span>cases\账号管理\用户管理.py</span>
</div> </div>
<div class="case pass" id="case_00000001"> <div class="case pass" id="case_00000001">
<div class="folder_header"> <div class="folder_header">
<span class="label caselabel">用例 PASS</span> <span class="label caselabel">用例 PASS</span>
<span class="casename">登录 UI_0001</span> <span class="casename">用户新增_001</span>
<span class="executetime">2024-11-02 20:56:14</span> <span class="executetime">2024-11-04 10:12:07</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_000x</span> <span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
<div class="test_steps" id="test_steps 登录 UI_0001"> <div class="test_steps" id="test_steps 用户新增_001">
<span class="label">测试步骤</span> <span class="label">测试步骤</span>
<div class="case_step"> <div class="case_step">
<span class="tag">步骤 #1</span> <span class="tag">步骤 #1</span>
<span>输入账号: None, 密码: Ubains@4321, 验证码: csba</span> <span>点击【新增】按钮</span>
</div> </div>
<div class="case_step"> <div class="case_step">
<span class="tag">步骤 #2</span> <span class="tag">步骤 #2</span>
<span>点击登录按钮</span> <span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div> </div>
<div> <div>
<img class="screenshot" src="imgs/20241102205617064337.png" width="aa"> <img class="screenshot" src="imgs/20241104101209849452.png" width="aa">
</div> </div>
<div class="info">Alert text: 请输入账号!</div>
<div class="case_step"> <div class="case_step">
<span class="tag">步骤 #3</span> <span class="tag">步骤 #3</span>
<span>校验提示信息: 请输入账号!</span> <span>点击【确定】按钮</span>
</div>
<div class="info">Alert text: 账号为空</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>校验提示信息: 账号为空</span>
</div> </div>
<div class="checkpoint_pass"> <div class="checkpoint_pass">
<span class="tag">检查点 PASS</span> <span class="tag">检查点 PASS</span>
<span>弹出提示</span> <span>弹出提示</span>
</div> </div>
</div> </div>
<div class="case_teardown teardown case_st_lable" id="case_teardown teardown 登录 UI_0001">
<span class="label">用例清除</span>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>刷新页面</span>
</div>
</div>
</div> </div>
</div> </div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\"> <div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header"> <div class="folder_header">
<span class="label">套件清除</span> <span class="label">套件清除</span>
<span>cases\</span> <span>cases\</span>
<span class="executetime">2024-11-02 20:56:17</span> <span class="executetime">2024-11-04 10:12:12</span>
</div> </div>
<div class="folder_body"> <div class="folder_body">
<div class="info">清除浏览器</div> <div class="info">清除浏览器</div>
......
<!DOCTYPE html>
<html>
<head>
<title>测试报告</title>
<meta charset="UTF-8">
<style>body {
font-family: consolas, Verdana, sans-serif;
font-size: .95em;
color: #696e71;
display: grid;
grid-template-columns: 1fr 5rem;
}
.main_section {
width: 90%;
margin: 0 auto;
}
#float_menu{
position:fixed;
top:0;
right:0;
text-align: center;
}
#float_menu .menu-item {
cursor: pointer;
padding: .5em;
margin: .5em 0;
color: #c08580;
background-color: #f8f0ef;
font-size: 1.2em;
}
.result{
display: flex;
}
.result_table{
border-collapse: collapse;
border: 1px solid #f0e0e5;
width: 30em;
text-align: center;
font-size: 1.0em;
}
.result_table td{
border: 1px solid #f0e0e5;
padding: .3em;
}
.result_barchart{
width: 30em;
margin: 0 5em 0 5em;
}
.barchar_item{
margin: 2.5rem 0;
}
.barchart_barbox {
margin: 0.5em 0;
width: 100%;
background-color: #fff;
border: 1px solid #86c2dd;
border-radius: .2em;
}
.barchart_bar {
text-align: right;
height: 1.2rem;
}
.h3_button {
margin: 1.5em;
cursor: pointer;
color: #03a9f4;
}
.info
{
white-space:pre-wrap;
margin: .8em 1.5em;
}
.error-info
{
color: #a64747
}
.suite_dir {
margin: 1em .2em;
padding: .3em;
/* background-color: #dfeff6; */
border: 1px solid #bcd8e4;
}
.suite_file {
margin: 1em .2em;
padding: .3em;
border: 1px solid #bcd8e4;
}
.case {
margin: 1em .2em;
/* padding: .3em; */
border: 1px solid #e7d4d4;
}
.case_class_path{
margin: 0em 1em;
}
.folder_header {
padding: .2em .7em;
background-color: #fffaf9;
cursor: pointer;
}
.setup{
margin: .2em;
/* padding: .3em; */
/* border: 1px solid #e7d4d4; */
}
.teardown{
margin: .2em;
/* padding: .3em;*/
/* border: 1px solid #e7d4d4; */
}
.test_steps{
margin: .2em;
padding: .3em;
/* border: 1px solid #e7d4d4; */
}
.label {
display: inline-block;
padding: .1em .5em;
font-size: .88em;
letter-spacing: 1px;
white-space: nowrap;
color: #0d6ebc;
border-radius: .2em;
min-width: 5em;
margin-right: 2em;
font-family: consolas;
}
/* .suite_setup .label{
color: #219e26 ;
}
.suite_teardown .label{
color: #219e26;
} */
/* .case.pass .casename{
color: #329132 ;
} */
.case.pass .caselabel{
color: white;
background-color: #3b9e3f;
}
/* .case.fail .casename{
color: #a64747;
} */
.case.fail .caselabel{
color: white;
background-color: #a64747;
}
/* .case.abort .casename{
color: #953ab7;
} */
.case.abort .caselabel{
color: white;
background-color: #9c27b0;
}
.case_step {
margin: .8em;
}
.checkpoint_pass {
margin: .8em;
}
.checkpoint_fail {
margin: .8em;
}
.case_step .tag{
color: #2196f3;;
margin: .3em 1em .3em 0;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_pass .tag{
color: #009806;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.checkpoint_fail .tag{
color: #9c2020;
margin:.3em 1em .3em .5em;
padding: .1em .3em;
font-size: .92em;
}
.screenshot {
border: 1px solid #86c2dd;
}
.executetime {
float: right;
}</style>
<script type="text/javascript">var FOLDER_ALL_CASES = false //是否为精简模式的标记
var ERROR_INFOS = []; // 错误信息列表
var current_error_idx = -1;
// 页面加载后执行的函数
window.addEventListener("load", function(){
// 所有 .folder_header 添加点击事件处理
let folderHeaderEles = document.querySelectorAll(".folder_header");
folderHeaderEles.forEach(function(ele) {
ele.addEventListener("click", function(event) {
let fb = event.target.closest('.folder_header').nextElementSibling;
fb.style.display = fb.style.display === 'none' ? 'block' : 'none'
});
});
// 找到所有的错误信息对象
ERROR_INFOS = document.querySelectorAll(".error-info");
});
function toggle_folder_all_cases(){
let eles = document.querySelectorAll(".folder_body");
FOLDER_ALL_CASES = !FOLDER_ALL_CASES;
document.getElementById('display_mode').innerHTML = FOLDER_ALL_CASES? "Detail" : "Summary"
for (const ele of eles){
ele.style.display = FOLDER_ALL_CASES? "none": "block"
}
}
function previous_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx -= 1;
if (current_error_idx<0)
current_error_idx = 0
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}
function next_error(){
// 查找错误必须是详细模式
if (FOLDER_ALL_CASES)
toggle_folder_all_cases()
current_error_idx += 1;
if (current_error_idx > ERROR_INFOS.length-1)
current_error_idx = ERROR_INFOS.length-1
let error = ERROR_INFOS[current_error_idx];
error.scrollIntoView({behavior: "smooth", block: "center", inline: "start"});
}</script>
</head>
<body>
<div class="main_section">
<h1 style="font-family: auto">测试报告</h1>
<h3>统计结果</h3>
<div class="result">
<table class="result_table">
<tbody>
<tr>
<td>hytest 版本</td>
<td>0.8.12</td>
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/04 10:26:30</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/04 10:26:42</td>
</tr>
<tr>
<td>耗时</td>
<td>11.819 秒</td>
</tr>
<tr>
<td>预备执行用例数量</td>
<td>1</td>
</tr>
<tr>
<td>实际执用例行数量</td>
<td>1</td>
</tr>
<tr>
<td>通过</td>
<td>1</td>
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
</tr>
<tr>
<td>异常</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
<td style="">0</td>
</tr>
<tr>
<td>套件初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>套件清除 失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例初始化失败</td>
<td style="">0</td>
</tr>
<tr>
<td>用例清除 失败</td>
<td style="">0</td>
</tr>
</tbody>
</table>
<div class="result_barchart">
<div class="barchar_item">
<span>用例通过 100% : 1 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 100.0%; background-color: #04AA6D;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #bb4069;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例异常 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #9c27b0;"></div>
</div>
</div>
<div class="barchar_item">
<span>用例阻塞 0% : 0 个</span>
<div class="barchart_barbox">
<div class="barchart_bar" style="width: 0.0%; background-color: #dcbdbd;"></div>
</div>
</div>
</div>
</div>
<div style="margin-top:2em">
<h3 style="display:inline">执行日志</h3>
</div>
<div class="exec_log">
<div class="suite_dir" id="suite_dir cases\">
<div>
<span class="label">进入目录</span>
<span>cases\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:26:30</span>
</div>
<div class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
<div class="info">'----------' 正在处理SSL证书警告 '----------'</div>
<div class="info">'----------' SSL证书警告处理完成 '----------'</div>
</div>
</div>
</div>
<div class="suite_dir" id="suite_dir cases\账号管理\">
<div>
<span class="label">进入目录</span>
<span>cases\账号管理\</span>
</div>
<div class="suite_setup setup" id="suite_setup setup cases\账号管理\">
<div class="folder_header">
<span class="label">套件初始化</span>
<span>cases\账号管理\</span>
<span class="executetime">2024-11-04 10:26:33</span>
</div>
<div class="folder_body">
<div class="info">输入用户名:admin@ZDH</div>
<div class="info">输入密码:Ubains@4321</div>
<div class="info">输入验证码:csba</div>
<div class="info">点击登录按钮</div>
<div class="info">进入后台</div>
<div class="info">打开账号管理下拉菜单</div>
<div class="info">进入用户管理模块</div>
</div>
</div>
</div>
<div class="suite_file" id="suite_file cases\账号管理\用户管理.py">
<div>
<span class="label">进入文件</span>
<span>cases\账号管理\用户管理.py</span>
</div>
<div class="case pass" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 PASS</span>
<span class="casename">用户新增_001</span>
<span class="executetime">2024-11-04 10:26:35</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
<div class="test_steps" id="test_steps 用户新增_001">
<span class="label">测试步骤</span>
<div class="case_step">
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div>
<img class="screenshot" src="imgs/20241104102637654300.png" width="aa">
</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>点击【确定】按钮</span>
</div>
<div>
<img class="screenshot" src="imgs/20241104102639836413.png" width="aa">
</div>
<div class="info">Alert text: 账号为空</div>
<div class="case_step">
<span class="tag">步骤 #4</span>
<span>校验提示信息: 账号为空</span>
</div>
<div class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</div>
</div>
</div>
</div>
<div class="suite_teardown teardown" id="suite_teardown teardown cases\">
<div class="folder_header">
<span class="label">套件清除</span>
<span>cases\</span>
<span class="executetime">2024-11-04 10:26:39</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
</div>
</div>
</div>
</div>
</div>
<div id="float_menu">
<div class="menu-item" onclick="document.querySelector(&quot;body&quot;).scrollIntoView()">页首</div>
<div class="menu-item" onclick="window.open(&quot;http://www.byhy.net/tut/auto/hytest/01&quot;, &quot;_blank&quot;); ">帮助</div>
<div class="menu-item" id="display_mode" onclick="toggle_folder_all_cases()">Summary</div>
<div class="error_jumper" display="none">
<div class="menu-item" onclick="previous_error()" title="上一个错误"></div>
<div class="menu-item" onclick="next_error()" title="下一个错误"></div>
</div>
</div>
</body>
</html>
\ No newline at end of file
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
========= 测试开始 : 20241102_224704 ========= ========= 测试开始 : 20241104_102630 =========
...@@ -49,19 +49,18 @@ ...@@ -49,19 +49,18 @@
>>> cases\账号管理\ >>> cases\账号管理\
[ suite setup ] cases\账号管理\ [ suite setup ] cases\账号管理\
输入用户名:admin@czj 输入用户名:admin@ZDH
输入密码:Ubains@4321 输入密码:Ubains@4321
输入验证码:csba 输入验证码:csba
点击登录按钮 点击登录按钮
进入后台 进入后台
进入后台
打开账号管理下拉菜单 打开账号管理下拉菜单
进入用户管理模块 进入用户管理模块
>>> cases\账号管理\用户管理.py >>> cases\账号管理\用户管理.py
* 用户新增_001 - 2024-11-02 22:47:13 * 用户新增_001 - 2024-11-04 10:26:35
[ case execution steps ] [ case execution steps ]
...@@ -70,3 +69,44 @@ ...@@ -70,3 +69,44 @@
-- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com -- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com
picture imgs/20241104102637654300.png
-- 第 3 步 -- 点击【确定】按钮
picture imgs/20241104102639836413.png
Alert text: 账号为空
-- 第 4 步 -- 校验提示信息: 账号为空
** 检查点 ** 弹出提示 ----> 通过
PASS
[ suite teardown ] cases\
清除浏览器
========= 测试结束 : 20241104_102642 =========
耗时 : 11.819 秒
预备执行用例数量 : 1
实际执行用例数量 : 1
通过 : 1
失败 : 0
异常 : 0
套件初始化失败 : 0
套件清除 失败 : 0
用例初始化失败 : 0
用例清除 失败 : 0
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
========= 测试开始 : 20241102_224007 ========= ========= 测试开始 : 20241104_102540 =========
...@@ -49,24 +49,27 @@ ...@@ -49,24 +49,27 @@
>>> cases\账号管理\ >>> cases\账号管理\
[ suite setup ] cases\账号管理\ [ suite setup ] cases\账号管理\
输入用户名:admin@czj 输入用户名:admin@ZDH
输入密码:Ubains@4321 输入密码:Ubains@4321
输入验证码:csba 输入验证码:csba
点击登录按钮 点击登录按钮
进入后台 进入后台
进入后台 suite setup fail | 'NoneType' object has no attribute 'is_displayed'
打开账号管理下拉菜单 Traceback:
进入用户管理模块 File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py", line 20, in suite_setup
enter_the_backend()
File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py", line 66, in enter_the_backend
>>> cases\账号管理\用户管理.py safe_click((By.XPATH, "//img[@title='后台系统']"), wd)
File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py", line 87, in safe_click
* 用户新增_001 - 2024-11-02 22:40:16 element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
[ case execution steps ] value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
-- 第 1 步 -- 点击【新增】按钮 return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 179, in _element_if_visible
return element if element.is_displayed() == visibility else False
-- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com AttributeError: 'NoneType' object has no attribute 'is_displayed'
[ suite teardown ] cases\
清除浏览器
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
========= 测试开始 : 20241102_223903 ========= ========= 测试开始 : 20241104_102244 =========
...@@ -49,24 +49,27 @@ ...@@ -49,24 +49,27 @@
>>> cases\账号管理\ >>> cases\账号管理\
[ suite setup ] cases\账号管理\ [ suite setup ] cases\账号管理\
输入用户名:admin@czj 输入用户名:admin@ZDH
输入密码:Ubains@4321 输入密码:Ubains@4321
输入验证码:csba 输入验证码:csba
点击登录按钮 点击登录按钮
进入后台 进入后台
进入后台 suite setup fail | 'NoneType' object has no attribute 'is_displayed'
打开账号管理下拉菜单 Traceback:
进入用户管理模块 File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py", line 20, in suite_setup
enter_the_backend()
File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py", line 66, in enter_the_backend
>>> cases\账号管理\用户管理.py safe_click((By.XPATH, '//*[@id="app"]/div/div[1]/div/img[2]'), wd)
File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py", line 87, in safe_click
* 用户新增_001 - 2024-11-02 22:39:11 element = WebDriverWait(wd, 10).until(EC.visibility_of_element_located(element_locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\wait.py", line 96, in until
[ case execution steps ] value = method(self._driver)
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 156, in _predicate
-- 第 1 步 -- 点击【新增】按钮 return _element_if_visible(driver.find_element(*locator))
File "C:\Users\29194\AppData\Local\Programs\Python\Python310\lib\site-packages\selenium\webdriver\support\expected_conditions.py", line 179, in _element_if_visible
return element if element.is_displayed() == visibility else False
-- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com AttributeError: 'NoneType' object has no attribute 'is_displayed'
[ suite teardown ] cases\
清除浏览器
topic,clientId,appToken,companyNumber,cnum,conferenceId,macAddress,authCode,clientId,deviceId
rebootResponseTopic,48134e6047a19a01,AND-2CT-0101,CN-2CT-UBAINS,4b521415d42650a0da515114aa36ab88,220,20:59:20:00:28:01,AND-2CT-0101,,
rebootResponseTopic,48134e6047a19a02,AND-2CT-0102,CN-2CT-UBAINS,6828f107eddcd6c80537e554f1ba6393,221,20:59:20:00:28:02,AND-2CT-0102,,
rebootResponseTopic,48134e6047a19a03,AND-2CT-0103,CN-2CT-UBAINS,694eba1b6f1995d4f7c085c77788ca68,222,20:59:20:00:28:03,AND-2CT-0103,,
rebootResponseTopic,48134e6047a19a04,AND-2CT-0104,CN-2CT-UBAINS,acab665450c5bb91e11881e749934b63,223,20:59:20:00:28:04,AND-2CT-0104,,
rebootResponseTopic,48134e6047a19a05,AND-2CT-0105,CN-2CT-UBAINS,842380cf2573785aa3e74f61c3921e1b,224,20:59:20:00:28:05,AND-2CT-0105,,
rebootResponseTopic,48134e6047a19a06,AND-2CT-0106,CN-2CT-UBAINS,4c02ca0fc3f0947ab2658b6d6b98bbfc,225,20:59:20:00:28:06,AND-2CT-0106,,
rebootResponseTopic,48134e6047a19a07,AND-2CT-0107,CN-2CT-UBAINS,24d712de79b9907304874c1ab158cbab,226,20:59:20:00:28:07,AND-2CT-0107,,
rebootResponseTopic,48134e6047a19a08,AND-2CT-0108,CN-2CT-UBAINS,ef89042cce57dab36475a32f86d515b1,227,20:59:20:00:28:08,AND-2CT-0108,,
rebootResponseTopic,48134e6047a19a09,AND-2CT-0109,CN-2CT-UBAINS,278b2caed091574f88673c784e2e3c70,228,20:59:20:00:28:09,AND-2CT-0109,,
rebootResponseTopic,48134e6047a19a10,AND-2CT-0110,CN-2CT-UBAINS,d1f392aaa472a42399a2e071298ffca8,229,20:59:20:00:28:10,AND-2CT-0110,,
rebootResponseTopic,48134e6047a19a11,AND-2CT-0111,CN-2CT-UBAINS,67ff1af148c6c09ee380a2160b14dd47,230,20:59:20:00:28:11,AND-2CT-0111,,
rebootResponseTopic,48134e6047a19a12,AND-2CT-0112,CN-2CT-UBAINS,c80b3f6669bae8acce37f4902a0243b8,231,20:59:20:00:28:12,AND-2CT-0112,,
rebootResponseTopic,48134e6047a19a13,AND-2CT-0113,CN-2CT-UBAINS,0b94554e203736514af9de41d68b5f37,232,20:59:20:00:28:13,AND-2CT-0113,,
rebootResponseTopic,48134e6047a19a14,AND-2CT-0114,CN-2CT-UBAINS,dc7c8d24f0e2b5e545223199dc76818b,233,20:59:20:00:28:14,AND-2CT-0114,,
rebootResponseTopic,48134e6047a19a15,AND-2CT-0115,CN-2CT-UBAINS,0a5846605b9d3b99a6623b8230870a5b,234,20:59:20:00:28:15,AND-2CT-0115,,
rebootResponseTopic,48134e6047a19a16,AND-2CT-0116,CN-2CT-UBAINS,5b5801447c15748408fa4ca6e2277f5a,235,20:59:20:00:28:16,AND-2CT-0116,,
rebootResponseTopic,48134e6047a19a17,AND-2CT-0117,CN-2CT-UBAINS,968c3946b598c7bb6419ac496c2000f4,236,20:59:20:00:28:17,AND-2CT-0117,,
rebootResponseTopic,48134e6047a19a18,AND-2CT-0118,CN-2CT-UBAINS,24437bdc20f50f62d353e432899e6c87,237,20:59:20:00:28:18,AND-2CT-0118,,
rebootResponseTopic,48134e6047a19a19,AND-2CT-0119,CN-2CT-UBAINS,5409a552f9c917b486d48df5912da1de,238,20:59:20:00:28:19,AND-2CT-0119,,
rebootResponseTopic,48134e6047a19a20,AND-2CT-0120,CN-2CT-UBAINS,9c6e5bdce14c3af47d6427e69a70a680,239,20:59:20:00:28:20,AND-2CT-0120,,
rebootResponseTopic,48134e6047a19a21,AND-2CT-0121,CN-2CT-UBAINS,5d3637f9a2137ca91fae4cfa9eb14161,240,20:59:20:00:28:21,AND-2CT-0121,,
rebootResponseTopic,48134e6047a19a22,AND-2CT-0122,CN-2CT-UBAINS,4c8f155cacbeaeae83c6599fc119f731,241,20:59:20:00:28:22,AND-2CT-0122,,
rebootResponseTopic,48134e6047a19a23,AND-2CT-0123,CN-2CT-UBAINS,a1c1e33712c298ff68b1bea640d03027,242,20:59:20:00:28:23,AND-2CT-0123,,
rebootResponseTopic,48134e6047a19a24,AND-2CT-0124,CN-2CT-UBAINS,1e0f1843056a1c4a45a80b7edad52f04,243,20:59:20:00:28:24,AND-2CT-0124,,
rebootResponseTopic,48134e6047a19a25,AND-2CT-0125,CN-2CT-UBAINS,a4b52db6122128240c922b3ee9b4abed,244,20:59:20:00:28:25,AND-2CT-0125,,
rebootResponseTopic,48134e6047a19a26,AND-2CT-0126,CN-2CT-UBAINS,f1b2d3698a082def3c7253ab0204e2e8,245,20:59:20:00:28:26,AND-2CT-0126,,
rebootResponseTopic,48134e6047a19a27,AND-2CT-0127,CN-2CT-UBAINS,fbbd92eb329781f78d5a3cc0f077b0d0,246,20:59:20:00:28:27,AND-2CT-0127,,
rebootResponseTopic,48134e6047a19a28,AND-2CT-0128,CN-2CT-UBAINS,b5c4ec7f5febbe786775b6a4e69b0d13,247,20:59:20:00:28:28,AND-2CT-0128,,
rebootResponseTopic,48134e6047a19a29,AND-2CT-0129,CN-2CT-UBAINS,35dc71aa75e70725cb239052a2f17c36,248,20:59:20:00:28:29,AND-2CT-0129,,
rebootResponseTopic,48134e6047a19a30,AND-2CT-0130,CN-2CT-UBAINS,63fdb9a82a270e58f5e3bb7b64da43d9,249,20:59:20:00:28:30,AND-2CT-0130,,
/uams/android/broadcast,,,,,,,,48134e6047a19a01,aa44e258a4e1e001
/uams/android/broadcast,,,,,,,,48134e6047a19a02,aa44e258a4e1e002
/uams/android/broadcast,,,,,,,,48134e6047a19a03,aa44e258a4e1e003
/uams/android/broadcast,,,,,,,,48134e6047a19a04,aa44e258a4e1e004
/uams/android/broadcast,,,,,,,,48134e6047a19a05,aa44e258a4e1e005
/uams/android/broadcast,,,,,,,,48134e6047a19a06,aa44e258a4e1e006
/uams/android/broadcast,,,,,,,,48134e6047a19a07,aa44e258a4e1e007
/uams/android/broadcast,,,,,,,,48134e6047a19a08,aa44e258a4e1e008
/uams/android/broadcast,,,,,,,,48134e6047a19a09,aa44e258a4e1e009
/uams/android/broadcast,,,,,,,,48134e6047a19a10,aa44e258a4e1e010
/uams/android/broadcast,,,,,,,,48134e6047a19a11,aa44e258a4e1e011
/uams/android/broadcast,,,,,,,,48134e6047a19a12,aa44e258a4e1e012
/uams/android/broadcast,,,,,,,,48134e6047a19a13,aa44e258a4e1e013
/uams/android/broadcast,,,,,,,,48134e6047a19a14,aa44e258a4e1e014
/uams/android/broadcast,,,,,,,,48134e6047a19a15,aa44e258a4e1e015
/uams/android/broadcast,,,,,,,,48134e6047a19a16,aa44e258a4e1e016
/uams/android/broadcast,,,,,,,,48134e6047a19a17,aa44e258a4e1e017
/uams/android/broadcast,,,,,,,,48134e6047a19a18,aa44e258a4e1e018
/uams/android/broadcast,,,,,,,,48134e6047a19a19,aa44e258a4e1e019
/uams/android/broadcast,,,,,,,,48134e6047a19a20,aa44e258a4e1e020
/uams/android/broadcast,,,,,,,,48134e6047a19a21,aa44e258a4e1e021
/uams/android/broadcast,,,,,,,,48134e6047a19a22,aa44e258a4e1e022
/uams/android/broadcast,,,,,,,,48134e6047a19a23,aa44e258a4e1e023
/uams/android/broadcast,,,,,,,,48134e6047a19a24,aa44e258a4e1e024
/uams/android/broadcast,,,,,,,,48134e6047a19a25,aa44e258a4e1e025
/uams/android/broadcast,,,,,,,,48134e6047a19a26,aa44e258a4e1e026
/uams/android/broadcast,,,,,,,,48134e6047a19a27,aa44e258a4e1e027
/uams/android/broadcast,,,,,,,,48134e6047a19a28,aa44e258a4e1e028
/uams/android/broadcast,,,,,,,,48134e6047a19a29,aa44e258a4e1e029
/uams/android/broadcast,,,,,,,,48134e6047a19a30,aa44e258a4e1e031
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论