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

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

上级 f5ca9ae3
......@@ -187,48 +187,57 @@ class Mqtt:
return list(reader)
@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 topic: 消息主题
:return: 消息字典
"""
if not isinstance(current_time, str) or not isinstance(topic, str):
raise ValueError("current_time and topic must be strings")
client_id = configs.get('clientID', '')
app_token = configs.get('appToken', '')
company_number = configs.get('companyNumber', '')
cnum = configs.get('cnum', '')
conference_name = configs.get('conferenceName', '测试会议室')
conference_id = int(configs.get('conferenceID', 0))
mac_address = configs.get('macAddress', '')
auth_code = configs.get('authCode', '')
presence_state = configs.get('presence_state','')
kaiguan = configs.get('kaiguan', '')
julishezhi = configs.get('julishezhi', '')
lingmindushezhi = configs.get('lingmindushezhi', '')
wifi_mac = configs.get('wifi_mac', '')
ble_mac = configs.get('ble_mac', '')
sn = configs.get('sn', '')
ip = configs.get('ip', '')
try:
#安卓信息设备上报
if topic == "rebootResponseTopic":
message = {
return {
"method": "/system/readSystemInfo",
"clientId": client_id,
"clientId": config['clientId'],
"result": json.dumps({
"result": {
"buildInfo": {
"appToken": app_token,
"companyNumber": company_number,
"cnum": cnum,
"conferenceName": conference_name,
"conferenceId": conference_id,
"appToken": config['appToken'],
"companyNumber": config['companyNumber'],
"cnum": config['cnum'],
"conferenceName": "测试会议室",
"conferenceId": int(config['conferenceId']),
"defaultQrCodeUrl": "http://192.168.5.218:8888/group1/M00/00/21/wKgFyGNBWZmADtnNAAAwrxR0X8s016.png",
"aliasName": "zt",
"serverBaseUrl": "http://192.168.5.218:8996/",
......@@ -253,7 +262,7 @@ class Mqtt:
"internalAvailableSize": 4306395136,
"internalTotalSize": 4877451264,
"ipAddress": "192.168.5.129",
"macAddress": mac_address,
"macAddress": config['macAddress'],
"networkType": "NETWORK_ETHERNET",
"processCpuUsage": "0.82%",
"resolution": "1280x800",
......@@ -268,46 +277,41 @@ class Mqtt:
"sysSupportedSensors": ["Accelerometer sensor", "Gyroscope sensor",
"Game Rotation Vector Sensor",
"Gravity Sensor"],
"authCode": auth_code,
"conferenceName": conference_name
"authCode": config['authCode'],
"conferenceName": "测试会议室"
}
})
}
return message
#安卓信息心跳上报
elif topic == "/uams/android/broadcast":
message = {
"type": "heartbeat",
"clientId": client_id,
"appId": "com.ubains.uniplatform",
"deviceId": client_id
}
return json.dumps(message)
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" : client_id,
"presence_state" : presence_state,
"kaiguan" : kaiguan,
"julishezhi" : julishezhi,
"lingmindushezhi" : lingmindushezhi,
"client_id" : config['client_id'],
"presence_state" : config['presence_state'],
"kaiguan" : config['kaiguan'],
"julishezhi" : config['julishezhi'],
"lingmindushezhi" : config['lingmindushezhi'],
"led":1,
"wifi_mac" : wifi_mac,
"ble_mac" : ble_mac,
"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" : sn,
"ip" : ip
"sn" : config['sn'],
"ip" : config['ip']
}
})
except (ValueError, TypeError) as e:
raise ValueError(f"Error building message: {e}")
def send_and_receive_messages(self, topic, message, num_times=1, timeout=5, interval=0.2):
"""
发送并接收消息
......
import logging
from hytest import *
from selenium import webdriver
from selenium.common import TimeoutException, NoSuchElementException, ElementNotInteractableException
from selenium.webdriver.common.by import By
from selenium.webdriver.support.wait import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
......@@ -12,7 +13,8 @@ def browser_init():
wd = webdriver.Chrome(options=options)
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()
GSTORE['wd'] = wd
......@@ -24,14 +26,10 @@ def handle_ssl_warning():
INFO("'----------' 正在处理SSL证书警告 '----------'")
# 等待并点击“详细信息”按钮
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable((By.XPATH, '//*[@id="details-button"]'))
).click()
safe_click((By.XPATH, '//*[@id="details-button"]'), wd)
# 等待并点击“继续”链接,以忽略 SSL 警告
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable((By.XPATH, '//*[@id="proceed-link"]'))
).click()
safe_click((By.XPATH, '//*[@id="proceed-link"]'), wd)
# 等待页面加载完成
WebDriverWait(wd, 10).until(
......@@ -48,55 +46,52 @@ def handle_ssl_warning():
def admin_login():
wd = GSTORE['wd']
INFO("输入用户名:admin@czj")
INFO("输入用户名:admin@ZDH")
# 等待元素刷新
WebDriverWait(wd, 10).until(
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")
safe_send_keys((By.XPATH, "//input[@placeholder='请输入账号或手机号或邮箱号']"),'admin@ZDH', wd)
INFO("输入密码:Ubains@4321")
WebDriverWait(wd, 10).until(
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")
safe_send_keys((By.XPATH, "//input[@placeholder='请输入密码']"), "Ubains@4321", wd)
INFO("输入验证码:csba")
WebDriverWait(wd, 10).until(
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")
safe_send_keys((By.XPATH, "//input[@placeholder='请输入图形验证码']"), "csba", wd)
wd.implicitly_wait(5)
INFO("点击登录按钮")
WebDriverWait(wd, 10).until(
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()
safe_click((By.XPATH, "//input[@value='登 录']"), wd)
def enter_the_backend():
INFO("进入后台")
wd = GSTORE['wd']
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[1]/div/img[2]')
)).click()
safe_click((By.XPATH, "//img[@title='后台系统']"), wd)
INFO("打开账号管理下拉菜单")
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[2]/div[1]/ul/li[3]/div/span[1]')
)).click()
safe_click((By.XPATH, "//span[@class='aside_menu menu_account']"), wd)
INFO("进入用户管理模块")
WebDriverWait(wd, 10).until(
EC.element_to_be_clickable(
(By.XPATH, '//*[@id="app"]/div/div[2]/div[1]/ul/li[3]/ul/li/ul/li[4]')
)).click()
safe_click((By.XPATH, "//li[contains(text(),'用户管理')]"), wd)
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 browser_quit():
INFO("清除浏览器")
......
......@@ -23,3 +23,6 @@
- 将原有pytest框架代码改为hytest框架使用,优化了脚本执行效率,并对应增加异常处理。
- MQTT相关模块目前调整了Mqtt_Send.py文件中封装的方法优化,增加异常处理。处理了登录成功断言失败的问题。
- 补充用户管理模块的新增用户部分代码,当前存在新增界面弹窗后定位失败问题。
7. 2024-11-04
- 将用户管理模块的代码进行重构,将新增用户、删除用户、修改用户等公用的操作封装到base目录下,方便后续管理。
- 使用元素定位插件进行定位,解决定位失败的问题。
\ No newline at end of file
......@@ -21,7 +21,7 @@ except ModuleNotFoundError as e:
current_dir = os.path.dirname(os.path.abspath(__file__))
# 构建CSV文件的绝对路径
csv_file_path = os.path.join(current_dir, '../../测试数据/MQTT安卓上报数据.csv')
csv_file_path = os.path.join(current_dir, '../../测试数据/MQTT安卓上报与心跳上报.csv')
if __name__ == "__main__":
# 读取配置文件
......
import sys
import os
import time
from logging import ERROR
from time import sleep
from selenium.common.exceptions import TimeoutException, NoSuchElementException, ElementNotInteractableException, \
NoSuchWindowException
from selenium.common.exceptions import TimeoutException, NoSuchElementException, ElementNotInteractableException, NoSuchWindowException
from hytest import *
from selenium.webdriver.support.select import Select
# 获取当前脚本的绝对路径
current_dir = os.path.dirname(os.path.abspath(__file__))
......@@ -23,44 +20,7 @@ except ModuleNotFoundError as e:
DEFAULT_WAIT_TIME = 20
# 默认等待时间(秒),用于元素加载或操作之间的等待
CLASS_MESSAGE_CONTENT = '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_MESSAGE_CONTENT = "//p[@class='el-message__content']"
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')
)).click()
sleep(1)
handle_modal_popup(wd)
# wd = handle_modal_popup(wd)
STEP(2,
f"输入账号:{account},用户名:{username},密码:{password},确认密码: {check_password},手机号:{phone},邮箱:{email}")
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:
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:
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:
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, '//*[@id="cascader-menu-1727-0-0"]/span'), wd)
safe_click((By.XPATH, '/html/body/div[5]/div/div[2]/div[6]/div/label[1]/span[2]'), wd)
safe_click((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请选择']"), 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, "//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, '/html/body/div[5]/div/div[2]/div[8]/div/input'), email, wd)
safe_send_keys((By.XPATH, "//input[@placeholder='手机']"), phone, wd)
safe_send_keys((By.XPATH, "//input[@placeholder='邮箱']"), email, wd)
SELENIUM_LOG_SCREEN(wd)
STEP(3, "点击【确定】按钮")
time.sleep(2)
safe_click((By.XPATH, '/html/body/div[5]/div/div[3]/span/button/span'), wd)
safe_click((By.XPATH, "//div[@aria-label='添加用户']//span[contains(text(),'确定')]"), wd)
time.sleep(2)
try:
notify_text = WebDriverWait(wd, DEFAULT_WAIT_TIME).until(
EC.presence_of_element_located((By.XPATH, CLASS_MESSAGE_CONTENT))
).text
SELENIUM_LOG_SCREEN(wd)
except Exception as e:
INFO(f"Exception occurred: {e}")
......
此差异已折叠。
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:14:15</td>
<td>2024/11/03 10:16:18</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:14:26</td>
<td>2024/11/03 10:16:56</td>
</tr>
<tr>
<td>耗时</td>
<td>11.111</td>
<td>38.072</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</div>
......@@ -442,7 +442,7 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 ABORT</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 class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
......@@ -452,11 +452,21 @@ function next_error(){
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</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:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 252, 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()
AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 278, in teststeps
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
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>
......@@ -465,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:05:59</td>
<td>2024/11/03 10:23:03</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:06:10</td>
<td>2024/11/03 10:23:36</td>
</tr>
<tr>
<td>耗时</td>
<td>11.108</td>
<td>33.301</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,13 +419,17 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</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 class="info">进入用户管理模块</div>
</div>
</div>
</div>
......@@ -438,7 +442,7 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 ABORT</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 class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
......@@ -448,11 +452,21 @@ function next_error(){
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</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:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 252, 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()
AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 282, in teststeps
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
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>
......@@ -461,7 +475,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_xpath'
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:22:21</td>
<td>2024/11/03 11:01:11</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:22:44</td>
<td>2024/11/03 11:02:22</td>
</tr>
<tr>
<td>耗时</td>
<td>22.767</td>
<td>71.630</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</div>
......@@ -442,7 +442,7 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 ABORT</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 class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
......@@ -452,63 +452,23 @@ function next_error(){
<span class="tag">步骤 #1</span>
<span>点击【新增】按钮</span>
</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">
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div class="info error-info">Message:
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]
<div class="info error-info">'NoneType' object has no attribute 'find_element'
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:
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]
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 287, in teststeps
safe_send_keys((By.XPATH, '/html/body/div[5]/div/div[2]/div[2]/div/input'), username, wd)
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\用户管理.py&quot;, line 27, 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>
......@@ -517,7 +477,7 @@ Stacktrace:
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:08:06</td>
<td>2024/11/04 09:30:57</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:08:16</td>
<td>2024/11/04 09:31:06</td>
</tr>
<tr>
<td>耗时</td>
<td>9.684</td>
<td>9.140</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,7 +419,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</div>
......@@ -427,11 +427,80 @@ function next_error(){
<div class="info">输入验证码:csba</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:
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py&quot;, line 21, in suite_setup
wd.find_element_by_link_text('账号管理').click()
AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text'
File &quot;D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\cases\账号管理\__st__.py&quot;, line 20, in suite_setup
enter_the_backend()
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>
......@@ -439,7 +508,7 @@ AttributeError: 'WebDriver' object has no attribute 'find_element_by_link_text'
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
此差异已折叠。
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:29:28</td>
<td>2024/11/04 10:03:53</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:31:39</td>
<td>2024/11/04 10:04:27</td>
</tr>
<tr>
<td>耗时</td>
<td>130.549</td>
<td>33.157</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,15 +419,14 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</div>
<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 class="info">进入用户管理模块</div>
</div>
......@@ -442,7 +441,7 @@ function next_error(){
<div class="folder_header">
<span class="label caselabel">用例 FAIL</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 class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
......@@ -457,33 +456,33 @@ function next_error(){
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div>
<img class="screenshot" src="imgs/20241102223102566579.png" width="aa">
<img class="screenshot" src="imgs/20241104100401180929.png" width="aa">
</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>点击【登录】按钮</span>
<span>点击【确定】按钮</span>
</div>
<div class="info">Exception occurred: Message:
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]
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0D9FA15]
(No symbol) [0x00007FF6E0D9FC6C]
(No symbol) [0x00007FF6E0DEBB07]
(No symbol) [0x00007FF6E0DC753F]
(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>
......@@ -498,7 +497,7 @@ Stacktrace:
</div>
<div class="info error-info">
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>
</div>
</div>
......@@ -507,7 +506,7 @@ Traceback:
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 22:25:26</td>
<td>2024/11/04 10:08:50</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 22:25:48</td>
<td>2024/11/04 10:09:26</td>
</tr>
<tr>
<td>耗时</td>
<td>21.883</td>
<td>35.790</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -333,11 +333,11 @@ function next_error(){
</tr>
<tr>
<td>失败</td>
<td style="">0</td>
<td style="color:red">1</td>
</tr>
<tr>
<td>异常</td>
<td style="color:red">1</td>
<td style="">0</td>
</tr>
<tr>
<td>阻塞</td>
......@@ -369,15 +369,15 @@ function next_error(){
</div>
</div>
<div class="barchar_item">
<span>用例失败 0% : 0</span>
<span>用例失败 100% : 1</span>
<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 class="barchar_item">
<span>用例异常 100% : 1</span>
<span>用例异常 0% : 0</span>
<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 class="barchar_item">
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -419,15 +419,14 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">输入用户名:admin@czj</div>
<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 class="info">进入用户管理模块</div>
</div>
......@@ -438,11 +437,11 @@ function next_error(){
<span class="label">进入文件</span>
<span>cases\账号管理\用户管理.py</span>
</div>
<div class="case abort" id="case_00000001">
<div class="case fail" id="case_00000001">
<div class="folder_header">
<span class="label caselabel">用例 ABORT</span>
<span class="label caselabel">用例 FAIL</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 class="folder_body">
<span class="case_class_path">cases\账号管理\用户管理.py::Add_User_00x</span>
......@@ -456,60 +455,50 @@ function next_error(){
<span class="tag">步骤 #2</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div class="info error-info">Message:
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:
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:
<div>
<img class="screenshot" src="imgs/20241104100900653006.png" width="aa">
</div>
<div class="case_step">
<span class="tag">步骤 #3</span>
<span>点击【确定】按钮</span>
</div>
<div class="info">Exception occurred: Message:
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]
GetHandleVerifier [0x00007FF6E0F1FD55+29557]
(No symbol) [0x00007FF6E0E921F0]
(No symbol) [0x00007FF6E0D4B6EA]
(No symbol) [0x00007FF6E0D9FA15]
(No symbol) [0x00007FF6E0D9FC6C]
(No symbol) [0x00007FF6E0DEBB07]
(No symbol) [0x00007FF6E0DC753F]
(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 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>
......@@ -517,7 +506,7 @@ Stacktrace:
<div class="folder_header">
<span class="label">套件清除</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 class="folder_body">
<div class="info">清除浏览器</div>
......
此差异已折叠。
......@@ -309,15 +309,15 @@ function next_error(){
</tr>
<tr>
<td>开始时间</td>
<td>2024/11/02 20:56:07</td>
<td>2024/11/04 10:12:02</td>
</tr>
<tr>
<td>结束时间</td>
<td>2024/11/02 20:56:19</td>
<td>2024/11/04 10:12:14</td>
</tr>
<tr>
<td>耗时</td>
<td>12.187</td>
<td>11.779</td>
</tr>
<tr>
<td>预备执行用例数量</td>
......@@ -401,7 +401,7 @@ function next_error(){
<div class="folder_header">
<span class="label">套件初始化</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 class="folder_body">
<div class="info">'----------' 正在初始化浏览器 '----------'</div>
......@@ -410,56 +410,75 @@ function next_error(){
</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>
<span class="label">进入文件</span>
<span>cases\登录模块\账号密码登录测试.py</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">登录 UI_0001</span>
<span class="executetime">2024-11-02 20:56:14</span>
<span class="casename">用户新增_001</span>
<span class="executetime">2024-11-04 10:12:07</span>
</div>
<div class="folder_body">
<span class="case_class_path">cases\登录模块\账号密码登录测试.py::Login_000x</span>
<div class="test_steps" id="test_steps 登录 UI_0001">
<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>输入账号: None, 密码: Ubains@4321, 验证码: csba</span>
<span>点击【新增】按钮</span>
</div>
<div class="case_step">
<span class="tag">步骤 #2</span>
<span>点击登录按钮</span>
<span>输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com</span>
</div>
<div>
<img class="screenshot" src="imgs/20241102205617064337.png" width="aa">
<img class="screenshot" src="imgs/20241104101209849452.png" width="aa">
</div>
<div class="info">Alert text: 请输入账号!</div>
<div class="case_step">
<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 class="checkpoint_pass">
<span class="tag">检查点 PASS</span>
<span>弹出提示</span>
</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 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 20:56:17</span>
<span class="executetime">2024-11-04 10:12:12</span>
</div>
<div class="folder_body">
<div class="info">清除浏览器</div>
......
此差异已折叠。
......@@ -34,7 +34,7 @@
========= 测试开始 : 20241102_224704 =========
========= 测试开始 : 20241104_102630 =========
......@@ -49,19 +49,18 @@
>>> cases\账号管理\
[ suite setup ] cases\账号管理\
输入用户名:admin@czj
输入用户名:admin@ZDH
输入密码:Ubains@4321
输入验证码:csba
点击登录按钮
进入后台
进入后台
打开账号管理下拉菜单
进入用户管理模块
>>> cases\账号管理\用户管理.py
* 用户新增_001 - 2024-11-02 22:47:13
* 用户新增_001 - 2024-11-04 10:26:35
[ case execution steps ]
......@@ -70,3 +69,44 @@
-- 第 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 @@
========= 测试开始 : 20241102_224007 =========
========= 测试开始 : 20241104_102540 =========
......@@ -49,24 +49,27 @@
>>> cases\账号管理\
[ suite setup ] cases\账号管理\
输入用户名:admin@czj
输入用户名:admin@ZDH
输入密码:Ubains@4321
输入验证码:csba
点击登录按钮
进入后台
进入后台
打开账号管理下拉菜单
进入用户管理模块
>>> cases\账号管理\用户管理.py
* 用户新增_001 - 2024-11-02 22:40:16
[ case execution steps ]
-- 第 1 步 -- 点击【新增】按钮
-- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com
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
safe_click((By.XPATH, "//img[@title='后台系统']"), wd)
File "D:\GithubData\自动化脚本-3\ubains-module-test\预定系统\Base\base.py", line 87, in safe_click
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
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
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
AttributeError: 'NoneType' object has no attribute 'is_displayed'
[ suite teardown ] cases\
清除浏览器
......@@ -34,7 +34,7 @@
========= 测试开始 : 20241102_223903 =========
========= 测试开始 : 20241104_102244 =========
......@@ -49,24 +49,27 @@
>>> cases\账号管理\
[ suite setup ] cases\账号管理\
输入用户名:admin@czj
输入用户名:admin@ZDH
输入密码:Ubains@4321
输入验证码:csba
点击登录按钮
进入后台
进入后台
打开账号管理下拉菜单
进入用户管理模块
>>> cases\账号管理\用户管理.py
* 用户新增_001 - 2024-11-02 22:39:11
[ case execution steps ]
-- 第 1 步 -- 点击【新增】按钮
-- 第 2 步 -- 输入账号:None,用户名:admin,密码:Ubains@54321,确认密码: Ubains@54321,手机号:13724387311,邮箱:1064963571@qq.com
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
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
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
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
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
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 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论