Index: .idea/shelf/更改1/shelved.patch
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/shelf/更改1/shelved.patch b/.idea/shelf/更改1/shelved.patch
new file mode 100644
--- /dev/null (date 1735806911111)
+++ b/.idea/shelf/更改1/shelved.patch (date 1735806911111)
@@ -0,0 +1,277 @@
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\ndef suite_setup():\r\n wd = GSTORE['wd']\r\n user_login(\"admin@pgy\", \"ub@123456\", \"csba\")\r\n enter_system()\r\n enter_manage()\r\n enter_areafuntion_manage()\r\n\r\n# def suite_teardown():\r\n# INFO('进行清除操作')\r\n# wd = GSTORE['wd']\r\n# wd.quit()\r\n\r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py b/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py (date 1735806568100)
+@@ -10,8 +10,8 @@
+ enter_manage()
+ enter_areafuntion_manage()
+
+-# def suite_teardown():
+-# INFO('进行清除操作')
+-# wd = GSTORE['wd']
+-# wd.quit()
++def suite_teardown():
++ INFO('进行清除操作')
++ wd = GSTORE['wd']
++ wd.quit()
+
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreafuntionAdd001:\r\n name = 'Areafuntion_add_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击新增按钮')\r\n areafuntion_add = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'新增')]\"))\r\n )\r\n areafuntion_add.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写功能名称')\r\n funtion_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入功能名称']\"))\r\n )\r\n funtion_name.clear()\r\n funtion_name.send_keys(\"测试功能1\")\r\n\r\n STEP(3, '填写排序')\r\n funtion_sort = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='排序']\"))\r\n )\r\n funtion_sort.clear()\r\n funtion_sort.send_keys(\"123\")\r\n\r\n STEP(4, '填写备注')\r\n funtion_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='备注']\"))\r\n )\r\n funtion_remark.clear()\r\n funtion_remark.send_keys(\"功能备注测试\")\r\n\r\n STEP(5, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(6, '验证是否新增成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py (date 1735806754678)
+@@ -3,50 +3,68 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreafuntionAdd001:
+- name = 'Areafuntion_add_001'
++# 构建 CSV 文件的绝对路径
++csv_path = os.path.abspath(
++ os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '05区域功能', '新增区域功能.csv'))
++
++class AreafuntionAdd:
++ tag = ['新增区域功能']
++ ddt_cases = read_csv_data(csv_path)
+ def teststeps(self):
+ wd = GSTORE['wd']
+
++ #从self.para中解构出数据
++ name = self.name
++ funtion_name, sort, remark, info= self.para
++
+ STEP(1, '点击新增按钮')
+ areafuntion_add = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+ )
+ areafuntion_add.click()
+- sleep(2)
++ sleep(1)
+
+- STEP(2, '填写功能名称')
+- funtion_name = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入功能名称']"))
++ STEP(2, f'填写功能名称:{funtion_name}')
++ funtion_name_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入功能名称']"))
+ )
+- funtion_name.clear()
+- funtion_name.send_keys("测试功能1")
++ funtion_name_input.clear()
++ funtion_name_input.send_keys(funtion_name)
+
+- STEP(3, '填写排序')
++ STEP(3, f'填写排序:{sort}')
+ funtion_sort = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='排序']"))
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='排序']"))
+ )
+ funtion_sort.clear()
+- funtion_sort.send_keys("123")
++ funtion_sort.send_keys(sort)
+
+- STEP(4, '填写备注')
++ STEP(4, f'填写备注:{remark}')
+ funtion_remark = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+ (By.XPATH, "//input[@placeholder='备注']"))
+ )
+ funtion_remark.clear()
+- funtion_remark.send_keys("功能备注测试")
++ funtion_remark.send_keys(remark)
+
+ STEP(5, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
+ )
+ commit.click()
+
+ STEP(6, '验证是否新增成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located(
++ (By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == info)
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass areafuntionDel001:\r\n name = 'areafuntion_del_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '搜索对应的区域功能')\r\n areafuntion_search= WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//input[contains(@placeholder,'请输入区域功能')])[1]\"))\r\n )\r\n areafuntion_search.clear()\r\n areafuntion_search.send_keys(\"修改-测试功能1\")\r\n\r\n STEP(2, '勾选区域功能')\r\n areafuntion_select = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//span[contains(@class,'el-checkbox__inner')])[2]\"))\r\n )\r\n areafuntion_select.click()\r\n\r\n STEP(3, '点击删除按钮')\r\n areafuntion_mod = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'删除')]\"))\r\n )\r\n areafuntion_mod.click()\r\n sleep(2)\r\n\r\n STEP(4, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(5, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py (date 1735806794306)
+@@ -10,34 +10,43 @@
+
+ STEP(1, '搜索对应的区域功能')
+ areafuntion_search= WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域功能')])[1]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//input[@placeholder='请输入功能名称']"))
+ )
+ areafuntion_search.clear()
+ areafuntion_search.send_keys("修改-测试功能1")
+
+ STEP(2, '勾选区域功能')
+ areafuntion_select = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//span[contains(@class,'el-checkbox__inner')])[2]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "(//span[@class='el-checkbox__inner'])[2]"))
+ )
+ areafuntion_select.click()
+
+ STEP(3, '点击删除按钮')
+ areafuntion_mod = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'删除')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//span[contains(text(),'删除')]"))
+ )
+ areafuntion_mod.click()
+- sleep(2)
++ sleep(1)
+
+ STEP(4, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "(//span[contains(text(),'确 定')])[3]"))
+ )
+ commit.click()
+
+ STEP(5, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located(
++ (By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass areafuntionMod001:\r\n name = 'areafuntion_mod_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '搜索对应的区域功能')\r\n areafuntion_search= WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//input[contains(@placeholder,'请输入区域功能')])[1]\"))\r\n )\r\n areafuntion_search.clear()\r\n areafuntion_search.send_keys(\"测试功能1\")\r\n\r\n STEP(2, '勾选区域功能')\r\n areafuntion_select = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//span[contains(@class,'el-checkbox__inner')])[2]\"))\r\n )\r\n areafuntion_select.click()\r\n\r\n STEP(3, '点击编辑按钮')\r\n areafuntion_mod = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'编辑')]\"))\r\n )\r\n areafuntion_mod.click()\r\n sleep(2)\r\n\r\n STEP(4, '修改区域功能内容')\r\n funtion_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域功能']\"))\r\n )\r\n funtion_name.clear()\r\n funtion_name.send_keys(\"修改-测试功能1\")\r\n\r\n STEP(5, '修改排序')\r\n funtion_sort = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='排序']\"))\r\n )\r\n funtion_sort.clear()\r\n funtion_sort.send_keys(\"999\")\r\n\r\n STEP(6, '修改备注信息')\r\n funtion_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='备注']\"))\r\n )\r\n funtion_remark.clear()\r\n funtion_remark.send_keys(\"修改-功能备注\")\r\n\r\n STEP(7, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(8, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py (date 1735806777108)
+@@ -3,41 +3,46 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class areafuntionMod001:
+- name = 'areafuntion_mod_001'
++class areafuntionMod:
++ name = 'areafuntion_mod'
+ def teststeps(self):
+ wd = GSTORE['wd']
+
+ STEP(1, '搜索对应的区域功能')
+ areafuntion_search= WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域功能')])[1]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//input[@placeholder='请输入功能名称']"))
+ )
+ areafuntion_search.clear()
+- areafuntion_search.send_keys("测试功能1")
++ areafuntion_search.send_keys("语音翻译")
+
+ STEP(2, '勾选区域功能')
+ areafuntion_select = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//span[contains(@class,'el-checkbox__inner')])[2]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "(//span[@class='el-checkbox__inner'])[2]"))
+ )
+ areafuntion_select.click()
+
+ STEP(3, '点击编辑按钮')
+ areafuntion_mod = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'编辑')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//span[contains(text(),'编辑')]"))
+ )
+ areafuntion_mod.click()
+- sleep(2)
++ sleep(1)
+
+ STEP(4, '修改区域功能内容')
+ funtion_name = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域功能']"))
++ EC.presence_of_element_located(
++ (By.XPATH, "//div[contains(@class,'dialog-input')]//input[contains(@placeholder,'请输入功能名称')]"))
+ )
+ funtion_name.clear()
+ funtion_name.send_keys("修改-测试功能1")
+
+ STEP(5, '修改排序')
+ funtion_sort = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='排序']"))
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[contains(@placeholder,'排序')]"))
+ )
+ funtion_sort.clear()
+ funtion_sort.send_keys("999")
+@@ -52,14 +57,20 @@
+
+ STEP(7, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "(//span[contains(text(),'确 定')])[2]"))
+ )
+ commit.click()
+
+ STEP(8, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located(
++ (By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
Index: .idea/shelf/.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/shelf/.xml b/.idea/shelf/.xml
new file mode 100644
--- /dev/null (date 1735807179362)
+++ b/.idea/shelf/.xml (date 1735807179362)
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
Index: .idea/shelf/1.xml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/shelf/1.xml b/.idea/shelf/1.xml
new file mode 100644
--- /dev/null (date 1735807179364)
+++ b/.idea/shelf/1.xml (date 1735807179364)
@@ -0,0 +1,4 @@
+
+
+
+
\ No newline at end of file
Index: .idea/shelf/更改/shelved.patch
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/.idea/shelf/更改/shelved.patch b/.idea/shelf/更改/shelved.patch
new file mode 100644
--- /dev/null (date 1735806491572)
+++ b/.idea/shelf/更改/shelved.patch (date 1735806491572)
@@ -0,0 +1,1628 @@
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py
+deleted file mode 100644
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/01新增区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,52 +0,0 @@
+-import sys
+-import os
+-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+-from 运维集控.项目测试.运维标准版.lib.base import *
+-
+-class AreafuntionAdd001:
+- name = 'Areafuntion_add_001'
+- def teststeps(self):
+- wd = GSTORE['wd']
+-
+- STEP(1, '点击新增按钮')
+- areafuntion_add = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+- )
+- areafuntion_add.click()
+- sleep(2)
+-
+- STEP(2, '填写功能名称')
+- funtion_name = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入功能名称']"))
+- )
+- funtion_name.clear()
+- funtion_name.send_keys("测试功能1")
+-
+- STEP(3, '填写排序')
+- funtion_sort = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='排序']"))
+- )
+- funtion_sort.clear()
+- funtion_sort.send_keys("123")
+-
+- STEP(4, '填写备注')
+- funtion_remark = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located(
+- (By.XPATH, "//input[@placeholder='备注']"))
+- )
+- funtion_remark.clear()
+- funtion_remark.send_keys("功能备注测试")
+-
+- STEP(5, '点击确认')
+- commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
+- )
+- commit.click()
+-
+- STEP(6, '验证是否新增成功')
+- get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+- )
+- get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py
+deleted file mode 100644
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/02编辑区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,65 +0,0 @@
+-import sys
+-import os
+-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+-from 运维集控.项目测试.运维标准版.lib.base import *
+-
+-class areafuntionMod001:
+- name = 'areafuntion_mod_001'
+- def teststeps(self):
+- wd = GSTORE['wd']
+-
+- STEP(1, '搜索对应的区域功能')
+- areafuntion_search= WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域功能')])[1]"))
+- )
+- areafuntion_search.clear()
+- areafuntion_search.send_keys("测试功能1")
+-
+- STEP(2, '勾选区域功能')
+- areafuntion_select = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//span[contains(@class,'el-checkbox__inner')])[2]"))
+- )
+- areafuntion_select.click()
+-
+- STEP(3, '点击编辑按钮')
+- areafuntion_mod = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'编辑')]"))
+- )
+- areafuntion_mod.click()
+- sleep(2)
+-
+- STEP(4, '修改区域功能内容')
+- funtion_name = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域功能']"))
+- )
+- funtion_name.clear()
+- funtion_name.send_keys("修改-测试功能1")
+-
+- STEP(5, '修改排序')
+- funtion_sort = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='排序']"))
+- )
+- funtion_sort.clear()
+- funtion_sort.send_keys("999")
+-
+- STEP(6, '修改备注信息')
+- funtion_remark = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located(
+- (By.XPATH, "//input[@placeholder='备注']"))
+- )
+- funtion_remark.clear()
+- funtion_remark.send_keys("修改-功能备注")
+-
+- STEP(7, '点击确认')
+- commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
+- )
+- commit.click()
+-
+- STEP(8, '验证是否修改成功')
+- get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+- )
+- get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py b/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py
+deleted file mode 100644
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/03删除区域功能.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,43 +0,0 @@
+-import sys
+-import os
+-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+-from 运维集控.项目测试.运维标准版.lib.base import *
+-
+-class areafuntionDel001:
+- name = 'areafuntion_del_001'
+- def teststeps(self):
+- wd = GSTORE['wd']
+-
+- STEP(1, '搜索对应的区域功能')
+- areafuntion_search= WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域功能')])[1]"))
+- )
+- areafuntion_search.clear()
+- areafuntion_search.send_keys("修改-测试功能1")
+-
+- STEP(2, '勾选区域功能')
+- areafuntion_select = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "(//span[contains(@class,'el-checkbox__inner')])[2]"))
+- )
+- areafuntion_select.click()
+-
+- STEP(3, '点击删除按钮')
+- areafuntion_mod = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'删除')]"))
+- )
+- areafuntion_mod.click()
+- sleep(2)
+-
+- STEP(4, '点击确认')
+- commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
+- )
+- commit.click()
+-
+- STEP(5, '验证是否修改成功')
+- get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+- )
+- get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
+Index: .idea/shelf/_2024_12_25_15_22____.xml
+===================================================================
+diff --git a/.idea/shelf/_2024_12_25_15_22____.xml b/.idea/shelf/_2024_12_25_15_22____.xml
+deleted file mode 100644
+--- a/.idea/shelf/_2024_12_25_15_22____.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,4 +0,0 @@
+-
+-
+-
+-
+\ No newline at end of file
+Index: .idea/shelf/_2024_12_25_15_28____.xml
+===================================================================
+diff --git a/.idea/shelf/_2024_12_25_15_28____.xml b/.idea/shelf/_2024_12_25_15_28____.xml
+deleted file mode 100644
+--- a/.idea/shelf/_2024_12_25_15_28____.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,4 +0,0 @@
+-
+-
+-
+-
+\ No newline at end of file
+Index: .idea/shelf/在进行更新之前于_2024_12_25_15_22_取消提交了更改_[更改]/shelved.patch
+===================================================================
+diff --git a/.idea/shelf/在进行更新之前于_2024_12_25_15_22_取消提交了更改_[更改]/shelved.patch b/.idea/shelf/在进行更新之前于_2024_12_25_15_22_取消提交了更改_[更改]/shelved.patch
+deleted file mode 100644
+--- a/.idea/shelf/在进行更新之前于_2024_12_25_15_22_取消提交了更改_[更改]/shelved.patch (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,66 +0,0 @@
+-Index: .idea/workspace.xml
+-IDEA additional info:
+-Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+-<+>\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n {\r\n "associatedIndex": 6\r\n}\r\n \r\n \r\n \r\n \r\n \r\n {\r\n "keyToString": {\r\n "RunOnceActivity.ShowReadmeOnStart": "true",\r\n "git-widget-placeholder": "develop",\r\n "last_opened_file_path": "C:/Users/EDY/Desktop/git/ubains-module-test/ubains-module-test"\r\n }\r\n}\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1735027895112\r\n \r\n \r\n 1735027895112\r\n \r\n \r\n \r\n 1735028100490\r\n \r\n \r\n \r\n 1735028100490\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
+-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+-<+>UTF-8
+-===================================================================
+-diff --git a/.idea/workspace.xml b/.idea/workspace.xml
+---- a/.idea/workspace.xml (revision b57d56b8584255c28e848a0ed183e36a51541a57)
+-+++ b/.idea/workspace.xml (date 1735111282242)
+-@@ -4,11 +4,7 @@
+-
+-
+-
+--
+--
+--
+--
+--
+-+
+-
+-
+-
+-@@ -16,12 +12,14 @@
+-
+-
+-
+--
+-
+- {
+- "associatedIndex": 6
+- }
+-
+-+
+-+
+-+
+-
+-
+-
+-@@ -57,7 +55,15 @@
+-
+- 1735028100490
+-
+--
+-+
+-+
+-+ 1735111241853
+-+
+-+
+-+
+-+ 1735111241853
+-+
+-+
+-
+-
+-
+-@@ -85,6 +91,7 @@
+-
+-
+-
+--
+-+
+-+
+-
+-
+-\ No newline at end of file
+Index: .idea/shelf/在进行更新之前于_2024_12_25_15_28_取消提交了更改_[更改]/shelved.patch
+===================================================================
+diff --git a/.idea/shelf/在进行更新之前于_2024_12_25_15_28_取消提交了更改_[更改]/shelved.patch b/.idea/shelf/在进行更新之前于_2024_12_25_15_28_取消提交了更改_[更改]/shelved.patch
+deleted file mode 100644
+--- a/.idea/shelf/在进行更新之前于_2024_12_25_15_28_取消提交了更改_[更改]/shelved.patch (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,27 +0,0 @@
+-Index: .idea/workspace.xml
+-IDEA additional info:
+-Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+-<+>\r\n\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n
+-Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+-<+>UTF-8
+-===================================================================
+-diff --git a/.idea/workspace.xml b/.idea/workspace.xml
+---- a/.idea/workspace.xml (revision a74bfa17dd939dc6790e420e64b1e73aba2262d4)
+-+++ b/.idea/workspace.xml (date 1735111706578)
+-@@ -4,15 +4,7 @@
+-
+-
+-
+--
+--
+--
+--
+--
+--
+--
+--
+--
+-+
+-
+-
+-
+Index: 运维集控/项目测试/运维标准版/testdata/06区域管理/新增区域.csv
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/06区域管理/新增区域.csv b/运维集控/项目测试/运维标准版/testdata/06区域管理/新增区域.csv
+deleted file mode 100644
+--- a/运维集控/项目测试/运维标准版/testdata/06区域管理/新增区域.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,13 +0,0 @@
+-area_group,area_type,area_name,area_ip,remark
+-测试分组1,办公室,测试区域1,192.168.1.1,测试区域1
+-测试分组1-1,大会议室,测试区域2,192.168.1.2,测试区域2
+-测试分组1-2,小会议室,测试区域3,192.168.1.3,测试区域3
+-测试分组1-3,培训室,测试区域4,192.168.1.4,测试区域4
+-测试分组2,办公室,测试区域5,192.168.1.5,测试区域5
+-测试分组2-1,大会议室,测试区域6,192.168.1.6,测试区域6
+-测试分组2-2,小会议室,测试区域7,192.168.1.7,测试区域7
+-测试分组2-3,培训室,测试区域8,192.168.1.8,测试区域8
+-测试分组3,办公室,测试区域9,192.168.1.9,测试区域9
+-测试分组3-1,大会议室,测试区域10,192.168.1.10,测试区域10
+-测试分组3-2,小会议室,测试区域11,192.168.1.11,测试区域11
+-测试分组3-3,培训室,测试区域12,192.168.1.12,测试区域12
+Index: 运维集控/项目测试/运维标准版/testdata/05区域功能/新增区域功能.csv
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/05区域功能/新增区域功能.csv b/运维集控/项目测试/运维标准版/testdata/05区域功能/新增区域功能.csv
+deleted file mode 100644
+--- a/运维集控/项目测试/运维标准版/testdata/05区域功能/新增区域功能.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ /dev/null (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
+@@ -1,7 +0,0 @@
+-funtion_name,sort,remark
+-摄像头,1,摄像头
+-ideahub,2,IdeaHub
+-语音转录,3,语音转录
+-语音识别,4,语音识别
+-语音翻译,5,语音翻译
+-语音合成,6,语音合成
+Index: 运维集控/项目测试/运维标准版/cases/03区域分组/02编辑区域分组.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreagroupMod001:\r\n name = 'Areagroup_modify_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '勾选分组,点击“编辑”按钮')\r\n try:\r\n # 等待页面加载,并查找包含文本“测试”的元素旁边的复选框\r\n checkbox = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//span[contains(text(), '测试区域1')]//span[@class='el-checkbox__inner']\"))\r\n )\r\n areagroup_select = checkbox.find_element(By.XPATH, \"./ancestor::span[contains(@class, 'el-checkbox__input')]//input\")\r\n # 勾选复选框\r\n if not areagroup_select.is_selected():\r\n areagroup_select.click()\r\n finally:\r\n areagroup_modify = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//span[contains(text(),'编辑')]\"))\r\n )\r\n areagroup_modify.click()\r\n sleep(2)\r\n\r\n STEP(2, '修改分组名称')\r\n group_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='长度1-20个字符']\"))\r\n )\r\n group_name.clear()\r\n group_name.send_keys(\"测试区域1-已修改\")\r\n\r\n STEP(3, '修改分组地址')\r\n group_address = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='输入地址不能大于50个字符']\"))\r\n )\r\n group_address.clear()\r\n group_address.send_keys(\"顺恒利大厦-已修改\")\r\n\r\n STEP(4, '修改分组备注')\r\n group_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请输入备注']\"))\r\n )\r\n group_remark.clear()\r\n group_remark.send_keys(\"修改测试分组\")\r\n\r\n STEP(5, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(6, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/03区域分组/02编辑区域分组.py b/运维集控/项目测试/运维标准版/cases/03区域分组/02编辑区域分组.py
+--- a/运维集控/项目测试/运维标准版/cases/03区域分组/02编辑区域分组.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/03区域分组/02编辑区域分组.py (date 1735806194954)
+@@ -3,41 +3,36 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreagroupMod001:
+- name = 'Areagroup_modify_001'
++class AreagroupMod:
++ name = 'Areagroup_modify'
+ def teststeps(self):
+ wd = GSTORE['wd']
+
+ STEP(1, '勾选分组,点击“编辑”按钮')
+- try:
+- # 等待页面加载,并查找包含文本“测试”的元素旁边的复选框
+- checkbox = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//span[contains(text(), '测试区域1')]//span[@class='el-checkbox__inner']"))
+- )
+- areagroup_select = checkbox.find_element(By.XPATH, "./ancestor::span[contains(@class, 'el-checkbox__input')]//input")
+- # 勾选复选框
+- if not areagroup_select.is_selected():
+- areagroup_select.click()
+- finally:
+- areagroup_modify = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//span[contains(text(),'编辑')]"))
+- )
+- areagroup_modify.click()
+- sleep(2)
++ areagroup_select = WebDriverWait(wd, 10).until(
++ EC.element_to_be_clickable((By.XPATH, "(//span[@class='el-checkbox__inner'])[2]"))
++ )
++ areagroup_select.click()
++
++ areagroup_modify = WebDriverWait(wd, 10).until(
++ EC.element_to_be_clickable((By.XPATH, "//span[contains(text(),'编辑')]"))
++ )
++ areagroup_modify.click()
++ sleep(1)
+
+ STEP(2, '修改分组名称')
+ group_name = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='长度1-20个字符']"))
+ )
+ group_name.clear()
+- group_name.send_keys("测试区域1-已修改")
++ group_name.send_keys("深圳分组1-已修改")
+
+ STEP(3, '修改分组地址')
+ group_address = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='输入地址不能大于50个字符']"))
+ )
+ group_address.clear()
+- group_address.send_keys("顺恒利大厦-已修改")
++ group_address.send_keys("深圳-已修改")
+
+ STEP(4, '修改分组备注')
+ group_remark = WebDriverWait(wd, 10).until(
+@@ -45,7 +40,7 @@
+ (By.XPATH, "//input[@placeholder='请输入备注']"))
+ )
+ group_remark.clear()
+- group_remark.send_keys("修改测试分组")
++ group_remark.send_keys("修改深圳分组")
+
+ STEP(5, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+@@ -55,8 +50,12 @@
+
+ STEP(6, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/03区域分组/03删除区域分组.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreagroupDel001:\r\n name = 'Areagroup_delete_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '勾选分组')\r\n checkbox = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//span[contains(text(), '测试区域1')]//span[@class='el-checkbox__inner']\"))\r\n )\r\n areagroup_select = checkbox.find_element(By.XPATH, \"./ancestor::span[contains(@class, 'el-checkbox__input')]//input\")\r\n areagroup_select.click()\r\n sleep(2)\r\n\r\n STEP(2, '点击“删除”按钮')\r\n areagroup_modify = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//span[contains(text(),'删除')]\"))\r\n )\r\n areagroup_modify.click()\r\n sleep(2)\r\n\r\n STEP(3, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//span[contains(text(),'确 定')])[3]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(6, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/03区域分组/03删除区域分组.py b/运维集控/项目测试/运维标准版/cases/03区域分组/03删除区域分组.py
+--- a/运维集控/项目测试/运维标准版/cases/03区域分组/03删除区域分组.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/03区域分组/03删除区域分组.py (date 1735806194950)
+@@ -3,25 +3,24 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreagroupDel001:
+- name = 'Areagroup_delete_001'
++class AreagroupDel:
++ name = 'Areagroup_delete'
+ def teststeps(self):
+ wd = GSTORE['wd']
+
+ STEP(1, '勾选分组')
+- checkbox = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//span[contains(text(), '测试区域1')]//span[@class='el-checkbox__inner']"))
++ areagroup_select = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located((By.XPATH, "(//span[@class='el-checkbox__inner'])[2]"))
+ )
+- areagroup_select = checkbox.find_element(By.XPATH, "./ancestor::span[contains(@class, 'el-checkbox__input')]//input")
+ areagroup_select.click()
+- sleep(2)
++ sleep(1)
+
+ STEP(2, '点击“删除”按钮')
+ areagroup_modify = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//span[contains(text(),'删除')]"))
+ )
+ areagroup_modify.click()
+- sleep(2)
++ sleep(1)
+
+ STEP(3, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+@@ -31,8 +30,11 @@
+
+ STEP(6, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/lib/base.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import pandas as pd\r\nimport csv\r\nimport urllib\r\nimport glob\r\nimport subprocess\r\nimport requests\r\nimport json\r\nimport hmac\r\nimport hashlib\r\nimport base64\r\nimport time\r\nimport logging\r\nfrom hytest import *\r\nimport pandas as pd\r\nfrom selenium import webdriver\r\nfrom datetime import datetime\r\nfrom urllib.parse import urlencode\r\nfrom selenium.webdriver.common.by import By\r\nfrom selenium.webdriver.edge.options import Options\r\nfrom selenium.webdriver.support.wait import WebDriverWait\r\nfrom selenium.webdriver.support import expected_conditions as EC\r\nfrom selenium.common import TimeoutException,ElementNotInteractableException\r\nfrom time import sleep\r\n\r\nlogging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')\r\ndef open_browser():\r\n INFO('打开浏览器')\r\n # wd = webdriver.Chrome()\r\n edge_options = Options()\r\n edge_options.add_argument('--ignore-certificate-errors')\r\n edge_options.add_argument('--disable-blink-features=AutomationControlled')\r\n edge_options.add_argument('--allow-insecure-localhost')\r\n wd = webdriver.Edge(options=edge_options)\r\n GSTORE['wd'] = wd\r\n # wd.get('https://rms.ubainsyun.com/#/login')\r\n wd.get('https://192.168.5.218:8443/#/login')\r\n wd.maximize_window()\r\n wd.implicitly_wait(10)\r\n\r\n\r\ndef user_login(username, password, captcha):\r\n wd = GSTORE['wd']\r\n INFO(f'输入登录账号: {username}')\r\n username_input = WebDriverWait(wd, 3).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入登录账号']\"))\r\n )\r\n username_input.clear()\r\n username_input.send_keys(username)\r\n\r\n INFO(f'输入登录密码: {password}')\r\n password_input = WebDriverWait(wd, 3).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入登录密码']\"))\r\n )\r\n password_input.clear()\r\n password_input.send_keys(password)\r\n\r\n INFO(f'输入验证码:{captcha}')\r\n captcha_input = WebDriverWait(wd, 3).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入验证码(区分大小写)']\"))\r\n )\r\n captcha_input.clear()\r\n captcha_input.send_keys(captcha)\r\n\r\n INFO('点击登录按钮')\r\n login_button = WebDriverWait(wd, 3).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='loginButton']\"))\r\n )\r\n login_button.click()\r\n sleep(2)\r\n\r\ndef validate_input(username, password, captcha):\r\n if not isinstance(username, str) or not isinstance(password, str) or not isinstance(captcha, str):\r\n raise ValueError(\"Invalid input type\")\r\n if len(username) < 1 or len(password) < 1 or len(captcha) < 1:\r\n raise ValueError(\"Input cannot be empty\")\r\n\r\ndef run_login_tests(df):\r\n # 遍历每一行\r\n for index, row in df.iterrows():\r\n username = row.get('username', None)\r\n password = row.get('password', None)\r\n captcha = row.get('captcha', None)\r\n if username and password and captcha:\r\n try:\r\n validate_input(username, password, captcha)\r\n user_login(username, password, captcha)\r\n except ValueError as e:\r\n print(f\"Invalid input at row {index}: {e}\")\r\n\r\ndef main():\r\n # 获取当前脚本的目录\r\n current_dir = os.path.dirname(os.path.abspath(__file__))\r\n csv_file_path = os.path.join(current_dir, '../testdata/01登录模块/登录信息.csv')\r\n try:\r\n if not os.path.exists(csv_file_path):\r\n print(f\"File not found: {csv_file_path}\")\r\n return\r\n df = pd.read_csv(csv_file_path, encoding='utf-8')\r\n run_login_tests(df)\r\n except Exception as e:\r\n print(f\"An error occurred: {e}\")\r\n\r\ndef enter_system():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击系统设置按钮')\r\n try:\r\n enter_sys = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//li[contains(text(),'系统设置')]\"))\r\n )\r\n enter_sys.click()\r\n logging.info('系统设置按钮已点击')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking system settings button: {error}\")\r\n\r\ndef enter_manage():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击管理按钮')\r\n try:\r\n enter_mag = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='el-submenu__title']//span[contains(text(),'管理')]\"))\r\n )\r\n enter_mag.click()\r\n logging.info('管理按钮已点击')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking manage button: {error}\")\r\n\r\ndef enter_user_manage():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击用户管理按钮')\r\n try:\r\n enter_user_mag = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//li[contains(text(),'用户管理')]\"))\r\n )\r\n enter_user_mag.click()\r\n logging.info('打开用户管理页面')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking manage button: {error}\")\r\n\r\ndef enter_areagroup_manage():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击区域分组按钮')\r\n try:\r\n enter_areagroup_mag = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//li[contains(text(),'区域分组')]\"))\r\n )\r\n enter_areagroup_mag.click()\r\n logging.info('打开区域分组页面')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking manage button: {error}\")\r\n\r\ndef enter_areatype_manage():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击区域类型按钮')\r\n try:\r\n enter_areatype_mag = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//li[contains(text(),'区域类型')]\"))\r\n )\r\n enter_areatype_mag.click()\r\n logging.info('打开区域类型页面')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking manage button: {error}\")\r\n\r\ndef enter_areafuntion_manage():\r\n wd = GSTORE['wd']\r\n if wd is None:\r\n raise ValueError(\"WebDriver is not initialized\")\r\n\r\n logging.info('点击区域功能按钮')\r\n try:\r\n enter_areafuntion_mag = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//li[contains(text(),'区域功能')]\"))\r\n )\r\n enter_areafuntion_mag.click()\r\n logging.info('打开区域功能页面')\r\n except (TimeoutException, ElementNotInteractableException) as error:\r\n logging.error(f\"Error clicking manage button: {error}\")\r\n\r\ndef dingding_send_message(test_report_url, title, text, mobile):\r\n \"\"\"\r\n 发送钉钉机器人消息\r\n\r\n :param test_report_url: 测试报告链接\r\n :param title: 消息标题\r\n :param text: 消息内容\r\n :param mobile: 需要@的手机号列表\r\n \"\"\"\r\n # 记录调用此函数的日志\r\n logging.info(\"开始构建并发送钉钉机器人消息\")\r\n\r\n # 钉钉机器人的 Webhook URL 和密钥\r\n webhook_url = 'https://oapi.dingtalk.com/robot/send?access_token=7fbf40798cad98b1b5db55ff844ba376b1816e80c5777e6f47ae1d9165dacbb4'\r\n secret = 'SEC610498ed6261ae2df1d071d0880aaa70abf5e67efe47f75a809c1f2314e0dbd6'\r\n\r\n # 生成时间戳\r\n timestamp = str(round(time.time() * 1000))\r\n\r\n # 生成签名\r\n secret_enc = secret.encode('utf-8')\r\n string_to_sign = f'{timestamp}\\n{secret}'\r\n string_to_sign_enc = string_to_sign.encode('utf-8')\r\n hmac_code = hmac.new(secret_enc, string_to_sign_enc, digestmod=hashlib.sha256).digest()\r\n sign = urllib.parse.quote_plus(base64.b64encode(hmac_code))\r\n\r\n # 构建最终的 Webhook URL\r\n params = {\r\n 'access_token': webhook_url.split('=')[1],\r\n 'timestamp': timestamp,\r\n 'sign': sign\r\n }\r\n encoded_params = urllib.parse.urlencode(params)\r\n final_webhook_url = f'https://oapi.dingtalk.com/robot/send?{encoded_params}'\r\n\r\n # 记录最终的 Webhook URL\r\n logging.info(f\"钉钉机器人Webhook URL: {final_webhook_url}\")\r\n\r\n # 构建消息体\r\n headers = {'Content-Type': 'application/json'}\r\n message = {\r\n 'msgtype': 'link',\r\n 'link': {\r\n 'title': title,\r\n 'messageUrl': test_report_url,\r\n 'text': text\r\n },\r\n \"at\": {\r\n \"atMobiles\": [mobile],\r\n \"isAtAll\": False\r\n }\r\n }\r\n\r\n try:\r\n # 发送 POST 请求\r\n response = requests.post(final_webhook_url, data=json.dumps(message), headers=headers)\r\n\r\n # 检查响应状态码\r\n if response.status_code == 200:\r\n logging.info('消息发送成功!')\r\n logging.info(f'响应内容: {response.text}')\r\n else:\r\n logging.error(f'消息发送失败,状态码: {response.status_code}')\r\n logging.error(f'响应内容: {response.text}')\r\n except requests.exceptions.RequestException as e:\r\n logging.error(f'请求异常: {e}')\r\n\r\n\r\ndef get_latest_report_file(report_dir, base_url):\r\n \"\"\"\r\n 获取指定目录下最新的HTML报告文件,并返回带有基础URL的完整路径。\r\n\r\n :param report_dir: 报告文件所在的目录\r\n :param base_url: 基础URL\r\n :return: 最新的HTML报告文件的完整URL,如果没有找到则返回None\r\n \"\"\"\r\n # 记录调用此函数的日志\r\n logging.info(\"开始调用get_latest_report_file函数获取报告文件\")\r\n\r\n # 确保报告目录存在\r\n if not os.path.exists(report_dir):\r\n logging.error(f\"报告目录 {report_dir} 不存在。\")\r\n return None\r\n\r\n # 获取指定目录下所有符合模式的HTML报告文件\r\n report_files = glob.glob(os.path.join(report_dir, 'report_*.html'))\r\n\r\n # 打印找到的文件列表\r\n logging.debug(f\"找到的报告文件: {report_files}\")\r\n\r\n # 如果没有找到报告文件,记录警告信息并返回None\r\n if not report_files:\r\n logging.warning(\"在指定目录中没有找到报告文件。\")\r\n return None\r\n\r\n # 找到最新修改的报告文件\r\n latest_file = max(report_files, key=os.path.getmtime)\r\n\r\n # 获取最新报告文件的最后修改时间\r\n last_modified_time = datetime.fromtimestamp(os.path.getmtime(latest_file)).strftime('%Y-%m-%d %H:%M:%S')\r\n\r\n # 记录最新报告文件的信息\r\n logging.info(f\"最新报告文件: {latest_file}, 最后修改时间: {last_modified_time}\")\r\n\r\n # 将文件路径转换为相对于基础URL的相对路径\r\n relative_path = os.path.relpath(latest_file, report_dir)\r\n\r\n # 生成完整的URL\r\n full_url = f\"{base_url}/{relative_path}\".replace(\"\\\\\", \"/\")\r\n\r\n # 返回完整的URL\r\n return full_url\r\n\r\n\r\ndef get_reportfile_send_dingding(report_title, report_url_prefix):\r\n try:\r\n # 获取报告文件所在的目录\r\n report_dir = os.path.join(os.path.dirname(os.path.abspath(__file__)), '..','log')\r\n\r\n # 获取基础URL\r\n base_url = report_url_prefix\r\n\r\n # 获取最新的报告文件\r\n latest_report = get_latest_report_file(report_dir, base_url)\r\n\r\n # 如果找到了最新的报告文件,则发送报告链接到钉钉\r\n if latest_report:\r\n logging.info(f\"最新报告文件URL: {latest_report}\")\r\n\r\n try:\r\n # 记录调用钉钉消息通知函数的日志\r\n logging.info(\"开始调用钉钉消息通知函数\")\r\n\r\n # 调用钉钉发送消息接口进行推送测试报告链接\r\n dingding_send_message(latest_report, report_title, f\"{report_title}_执行完成\", \"13169131600\")\r\n\r\n # 记录钉钉消息通知函数调用成功的日志\r\n logging.info(\"钉钉消息通知函数调用成功\")\r\n except Exception as e:\r\n # 记录钉钉消息通知函数调用失败的日志\r\n logging.error(f\"钉钉消息通知函数调用失败: {e}\")\r\n else:\r\n # 记录没有找到报告文件的日志\r\n logging.warning(\"没有找到报告文件以发送。\")\r\n\r\n except subprocess.CalledProcessError as e:\r\n # 处理子进程调用失败的异常\r\n logging.error(f\"命令执行失败,返回码 {e.returncode}: {e.output}\")\r\n except OSError as e:\r\n # 处理操作系统相关的异常\r\n logging.error(f\"发生操作系统错误: {e}\")\r\n finally:\r\n # 无论是否成功,都记录测试结束的日志\r\n logging.info(\"自动化测试完成。\")\r\n\r\n\r\ndef read_csv_data(csv_file_path):\r\n \"\"\"\r\n 读取CSV文件中的数据,并将其转换为一个包含字典的列表,每个字典代表一行测试用例数据。\r\n\r\n 参数:\r\n csv_file_path (str): CSV文件的路径。\r\n\r\n 返回:\r\n list: 包含字典的列表,每个字典包含测试用例的名称和参数。\r\n \"\"\"\r\n # 打开CSV文件,使用只读模式,确保兼容性并处理编码\r\n with open(csv_file_path, mode='r', newline='', encoding='utf-8') as file:\r\n # 创建CSV阅读器\r\n reader = csv.reader(file)\r\n # 读取表头,为后续数据解析做准备\r\n headers = next(reader)\r\n ddt_cases = []\r\n # 遍历CSV文件中的每一行数据\r\n for row in reader:\r\n # 将每一行数据转换为字典,其中包含测试用例的名称和参数\r\n case = {\r\n 'name': row[0],\r\n 'para': row[1:]\r\n }\r\n # 将转换后的测试用例数据添加到列表中\r\n ddt_cases.append(case)\r\n # 日志记录:CSV文件已读取\r\n INFO(\"CSV文件已读取\")\r\n # 返回包含所有测试用例数据的列表\r\n return ddt_cases
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/lib/base.py b/运维集控/项目测试/运维标准版/lib/base.py
+--- a/运维集控/项目测试/运维标准版/lib/base.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/lib/base.py (date 1735806195007)
+@@ -24,7 +24,7 @@
+
+ logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
+ def open_browser():
+- INFO('打开浏览器')
++ INFO('打开默认浏览器')
+ # wd = webdriver.Chrome()
+ edge_options = Options()
+ edge_options.add_argument('--ignore-certificate-errors')
+@@ -349,10 +349,8 @@
+ def read_csv_data(csv_file_path):
+ """
+ 读取CSV文件中的数据,并将其转换为一个包含字典的列表,每个字典代表一行测试用例数据。
+-
+ 参数:
+ csv_file_path (str): CSV文件的路径。
+-
+ 返回:
+ list: 包含字典的列表,每个字典包含测试用例的名称和参数。
+ """
+Index: 运维集控/项目测试/运维标准版/cases/04区域类型/01新增区域类型.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreatypeAdd001:\r\n name = 'Areatype_add_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击新增按钮')\r\n areatype_add = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'新增')]\"))\r\n )\r\n areatype_add.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写区域类型')\r\n type_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域类型']\"))\r\n )\r\n type_name.clear()\r\n type_name.send_keys(\"测试类型1\")\r\n\r\n STEP(3, '填写排序')\r\n type_sort = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='排序']\"))\r\n )\r\n type_sort.clear()\r\n type_sort.send_keys(\"123\")\r\n\r\n STEP(4, '填写备注')\r\n type_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='备注']\"))\r\n )\r\n type_remark.clear()\r\n type_remark.send_keys(\"类型备注测试\")\r\n\r\n STEP(5, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(6, '验证是否新增成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/04区域类型/01新增区域类型.py b/运维集控/项目测试/运维标准版/cases/04区域类型/01新增区域类型.py
+--- a/运维集控/项目测试/运维标准版/cases/04区域类型/01新增区域类型.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/04区域类型/01新增区域类型.py (date 1735806194942)
+@@ -3,39 +3,49 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreatypeAdd001:
+- name = 'Areatype_add_001'
++# 构建 CSV 文件的绝对路径
++csv_path = os.path.abspath(
++ os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '04区域类型', '新增区域类型.csv'))
++
++
++class AreatypeAdd:
++ tag = ['新增区域类型']
++ ddt_cases = read_csv_data(csv_path)
+ def teststeps(self):
+ wd = GSTORE['wd']
+
++ #从self.para中解构出数据
++ name = self.name
++ area_type, sort, remark, info= self.para
++
+ STEP(1, '点击新增按钮')
+ areatype_add = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+ )
+ areatype_add.click()
+- sleep(2)
++ sleep(1)
+
+- STEP(2, '填写区域类型')
++ STEP(2, f'填写区域类型: {area_type}')
+ type_name = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域类型']"))
+ )
+ type_name.clear()
+- type_name.send_keys("测试类型1")
++ type_name.send_keys(area_type)
+
+- STEP(3, '填写排序')
++ STEP(3, f'填写排序:{sort}')
+ type_sort = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='排序']"))
+ )
+ type_sort.clear()
+- type_sort.send_keys("123")
++ type_sort.send_keys(sort)
+
+- STEP(4, '填写备注')
++ STEP(4, f'填写备注:{remark}')
+ type_remark = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+ (By.XPATH, "//input[@placeholder='备注']"))
+ )
+ type_remark.clear()
+- type_remark.send_keys("类型备注测试")
++ type_remark.send_keys(remark)
+
+ STEP(5, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+@@ -45,8 +55,12 @@
+
+ STEP(6, '验证是否新增成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == info)
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/04区域类型/02编辑区域类型.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreatypeMod001:\r\n name = 'Areatype_mod_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '搜索对应的区域类型')\r\n areatype_search= WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//input[contains(@placeholder,'请输入区域类型')])[1]\"))\r\n )\r\n areatype_search.clear()\r\n areatype_search.send_keys(\"测试类型1\")\r\n\r\n STEP(2, '勾选区域类型')\r\n areatype_select = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//span[contains(@class,'el-checkbox__inner')])[2]\"))\r\n )\r\n areatype_select.click()\r\n\r\n STEP(3, '点击编辑按钮')\r\n areatype_mod = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'编辑')]\"))\r\n )\r\n areatype_mod.click()\r\n sleep(2)\r\n\r\n STEP(4, '修改区域类型内容')\r\n type_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域类型']\"))\r\n )\r\n type_name.clear()\r\n type_name.send_keys(\"修改-测试类型1\")\r\n\r\n STEP(5, '修改排序')\r\n type_sort = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='排序']\"))\r\n )\r\n type_sort.clear()\r\n type_sort.send_keys(\"999\")\r\n\r\n STEP(6, '修改备注信息')\r\n type_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='备注']\"))\r\n )\r\n type_remark.clear()\r\n type_remark.send_keys(\"修改类型备注测试\")\r\n\r\n STEP(7, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(8, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/04区域类型/02编辑区域类型.py b/运维集控/项目测试/运维标准版/cases/04区域类型/02编辑区域类型.py
+--- a/运维集控/项目测试/运维标准版/cases/04区域类型/02编辑区域类型.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/04区域类型/02编辑区域类型.py (date 1735806194938)
+@@ -3,7 +3,7 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreatypeMod001:
++class AreatypeMod:
+ name = 'Areatype_mod_001'
+ def teststeps(self):
+ wd = GSTORE['wd']
+@@ -13,7 +13,7 @@
+ EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域类型')])[1]"))
+ )
+ areatype_search.clear()
+- areatype_search.send_keys("测试类型1")
++ areatype_search.send_keys("会议室")
+
+ STEP(2, '勾选区域类型')
+ areatype_select = WebDriverWait(wd, 10).until(
+@@ -33,7 +33,7 @@
+ EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入区域类型']"))
+ )
+ type_name.clear()
+- type_name.send_keys("修改-测试类型1")
++ type_name.send_keys("修改-会议室")
+
+ STEP(5, '修改排序')
+ type_sort = WebDriverWait(wd, 10).until(
+@@ -58,8 +58,12 @@
+
+ STEP(8, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/04区域类型/03删除区域类型.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreatypeDel001:\r\n name = 'Areatype_del_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '搜索对应的区域类型')\r\n areatype_search= WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//input[contains(@placeholder,'请输入区域类型')])[1]\"))\r\n )\r\n areatype_search.clear()\r\n areatype_search.send_keys(\"修改-测试类型1\")\r\n\r\n STEP(2, '勾选区域类型')\r\n areatype_select = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"(//span[contains(@class,'el-checkbox__inner')])[2]\"))\r\n )\r\n areatype_select.click()\r\n\r\n STEP(3, '点击删除按钮')\r\n areatype_mod = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'删除')]\"))\r\n )\r\n areatype_mod.click()\r\n sleep(2)\r\n\r\n STEP(4, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(5, '验证是否修改成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/04区域类型/03删除区域类型.py b/运维集控/项目测试/运维标准版/cases/04区域类型/03删除区域类型.py
+--- a/运维集控/项目测试/运维标准版/cases/04区域类型/03删除区域类型.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/04区域类型/03删除区域类型.py (date 1735806194935)
+@@ -3,7 +3,7 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreatypeDel001:
++class AreatypeDel:
+ name = 'Areatype_del_001'
+ def teststeps(self):
+ wd = GSTORE['wd']
+@@ -13,7 +13,7 @@
+ EC.element_to_be_clickable((By.XPATH, "(//input[contains(@placeholder,'请输入区域类型')])[1]"))
+ )
+ areatype_search.clear()
+- areatype_search.send_keys("修改-测试类型1")
++ areatype_search.send_keys("修改-会议室")
+
+ STEP(2, '勾选区域类型')
+ areatype_select = WebDriverWait(wd, 10).until(
+@@ -30,14 +30,18 @@
+
+ STEP(4, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='dialog-footer']//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable((By.XPATH, "(//span[contains(text(),'确 定')])[3]"))
+ )
+ commit.click()
+
+ STEP(5, '验证是否修改成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/testdata/01登录模块/登录信息.csv
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>username,password,captcha\r\ntest_user1,ub@1234567,csba\r\ntest_user2,ub@123,csba\r\ntest_user3,,csba\r\ntest_user4,ub@1234567,\r\n,ub@1234567,csba
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/01登录模块/登录信息.csv b/运维集控/项目测试/运维标准版/testdata/01登录模块/登录信息.csv
+--- a/运维集控/项目测试/运维标准版/testdata/01登录模块/登录信息.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/testdata/01登录模块/登录信息.csv (date 1735806194905)
+@@ -1,6 +1,7 @@
+-username,password,captcha
+-test_user1,ub@1234567,csba
+-test_user2,ub@123,csba
+-test_user3,,csba
+-test_user4,ub@1234567,
+-,ub@1234567,csba
+\ No newline at end of file
++num,username,password,captcha,info
++用户登录-001-登录账号为空,,ub@1234567,csba,请输入登录账号
++用户登录-002-登录密码为空,test_user3,,csba,请输入登录密码
++用户登录-003-验证码为空,test_user4,ub@1234567,,请输入验证码(区分大小写)
++用户登录-004-登录账号不存在,test_user1,ub@1234567,csba,请检则用户名或密码是否正确!
++用户登录-005-登录密码错误,admin@pgy,ub@1234567,csba,输入的用户或密码不一致,
++用户登录-006-正常登录,admin@pgy,ub@123456,csba,登录成功
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/testdata/02用户管理/新增用户.csv
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>account,user_name,new_passwd,comfire_passwd,limits,user_number,phone,email,remark\r\ntest_user1,test_user1,Ubains@123,Ubains@123,1,13579,13169678901,test1@qq.com,test1\r\ntest_user2,test_user2,Ubains@123,Ubains@123,1,13580,13169678902,test2@qq.com,test2\r\ntest_user3,test_user3,Ubains@123,Ubains@123,1,13581,13169678903,test3@qq.com,test3\r\ntest_user4,test_user4,Ubains@123,Ubains@123,3,13582,13169678904,test4@qq.com,test4\r\ntest_user5,test_user5,Ubains@123,Ubains@123,3,13583,13169678905,test5@qq.com,test5\r\ntest_user6,test_user6,Ubains@123,Ubains@123,3,13584,13169678906,test6@qq.com,test6\r\ntest_user7,test_user7,Ubains@123,Ubains@123,4,13585,13169678907,test7@qq.com,test7\r\ntest_user8,test_user8,Ubains@123,Ubains@123,4,13586,13169678908,test8@qq.com,test8\r\ntest_user9,test_user9,Ubains@123,Ubains@123,4,13587,13169678909,test9@qq.com,test9
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/02用户管理/新增用户.csv b/运维集控/项目测试/运维标准版/testdata/02用户管理/新增用户.csv
+--- a/运维集控/项目测试/运维标准版/testdata/02用户管理/新增用户.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/testdata/02用户管理/新增用户.csv (date 1735806194901)
+@@ -1,10 +1,10 @@
+-account,user_name,new_passwd,comfire_passwd,limits,user_number,phone,email,remark
+-test_user1,test_user1,Ubains@123,Ubains@123,1,13579,13169678901,test1@qq.com,test1
+-test_user2,test_user2,Ubains@123,Ubains@123,1,13580,13169678902,test2@qq.com,test2
+-test_user3,test_user3,Ubains@123,Ubains@123,1,13581,13169678903,test3@qq.com,test3
+-test_user4,test_user4,Ubains@123,Ubains@123,3,13582,13169678904,test4@qq.com,test4
+-test_user5,test_user5,Ubains@123,Ubains@123,3,13583,13169678905,test5@qq.com,test5
+-test_user6,test_user6,Ubains@123,Ubains@123,3,13584,13169678906,test6@qq.com,test6
+-test_user7,test_user7,Ubains@123,Ubains@123,4,13585,13169678907,test7@qq.com,test7
+-test_user8,test_user8,Ubains@123,Ubains@123,4,13586,13169678908,test8@qq.com,test8
+-test_user9,test_user9,Ubains@123,Ubains@123,4,13587,13169678909,test9@qq.com,test9
+\ No newline at end of file
++name,account,user_name,new_passwd,comfire_passwd,authority,user_number,phone,email,remark,info
++新增用户-001-登录名为空,,test_user1,Ubains@123,Ubains@123,普通用户,13579,13169678901,test1@qq.com,test1,请输入登录名
++新增用户-002-用户名称为空,test_user1,,Ubains@123,Ubains@123,普通用户,13579,13169678901,test1@qq.com,test1,请输入用户名称
++新增用户-003-密码为空,test_user1,test_user1,,Ubains@123,普通用户,13579,13169678901,test1@qq.com,test1,密码至少8个字符
++新增用户-004-确认密码为空,test_user1,test_user1,Ubains@123,,普通用户,13579,13169678901,test1@qq.com,test1,两次密码不一致
++新增用户-005-密码和账号相同,test_user1,test_user1,test_user1,Ubains@123,普通用户,13579,13169678901,test1@qq.com,test1,密码不能和账号相同
++新增用户-006-正常创建1,test_user1,test_user1,Ubains@123,Ubains@123,普通用户,13580,13169678902,test2@qq.com,test1,操作成功!
++新增用户-007-登录名重复,test_user1,test_user1,Ubains@123,Ubains@123,普通用户,13581,13169678902,test2@qq.com,test1,登录名已存在,请重新输入
++新增用户-008-正常创建用户2,test_user2,test_user2,Ubains@123,Ubains@123,普通用户,13582,13169678903,test3@qq.com,test2,操作成功!
++新增用户-009-正常创建用户3,test_user3,test_user3,Ubains@123,Ubains@123,普通用户,13583,13169678904,test4@qq.com,test3,操作成功!
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/testdata/03区域分组/新增区域分组.csv
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>area_group,group_name,group_address,remark\r\n,测试分组1,深圳,第一层级\r\n测试分组1,测试分组1-1,深圳,第二层级\r\n测试分组1-1,测试分组1-2,深圳,第三层级\r\n测试分组1-2,测试分组1-3,深圳,第四层级\r\n,测试分组2,广州,第一层级\r\n 测试分组2,测试分组2-1,广州,第二层级\r\n 测试分组2-1,测试分组2-2,广州,第三层级\r\n 测试分组2-2,测试分组2-3,广州,第四层级\r\n ,测试分组3,上海,第一层级\r\n 测试分组3,测试分组3-1,上海,第二层级\r\n 测试分组3-1,测试分组3-2,上海,第三层级\r\n 测试分组3-2,测试分组3-3,上海,第四层级
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/03区域分组/新增区域分组.csv b/运维集控/项目测试/运维标准版/testdata/03区域分组/新增区域分组.csv
+--- a/运维集控/项目测试/运维标准版/testdata/03区域分组/新增区域分组.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/testdata/03区域分组/新增区域分组.csv (date 1735806194898)
+@@ -1,13 +1,13 @@
+-area_group,group_name,group_address,remark
+-,测试分组1,深圳,第一层级
+-测试分组1,测试分组1-1,深圳,第二层级
+-测试分组1-1,测试分组1-2,深圳,第三层级
+-测试分组1-2,测试分组1-3,深圳,第四层级
+-,测试分组2,广州,第一层级
+- 测试分组2,测试分组2-1,广州,第二层级
+- 测试分组2-1,测试分组2-2,广州,第三层级
+- 测试分组2-2,测试分组2-3,广州,第四层级
+- ,测试分组3,上海,第一层级
+- 测试分组3,测试分组3-1,上海,第二层级
+- 测试分组3-1,测试分组3-2,上海,第三层级
+- 测试分组3-2,测试分组3-3,上海,第四层级
+\ No newline at end of file
++name,area_group,group_name,group_address,remark,info
++新增分组-002-创建一级分组-深圳分组1,,深圳分组1,深圳,第一层级,操作成功!
++新增分组-003-创建二级分组-深圳分组2,深圳分组1,深圳分组2,深圳,第二层级,操作成功!
++新增分组-004-创建三级分组-深圳分组3,深圳分组2,深圳分组3,深圳,第三层级,操作成功!
++新增分组-005-创建四级分组-深圳分组4,深圳分组3,深圳分组4,深圳,第四层级,操作成功!
++新增分组-006-创建一级分组-广州分组1,,广州分组1,广州,第一层级,操作成功!
++新增分组-007-创建二级分组-广州分组2,广州分组1,广州分组2,广州,第二层级,操作成功!
++新增分组-008-创建三级分组-广州分组3,广州分组2,广州分组3,广州,第三层级,操作成功!
++新增分组-009-创建四级分组-广州分组4,广州分组3,广州分组4,广州,第四层级,操作成功!
++新增分组-010-创建一级分组-上海分组1,,上海分组1,上海,第一层级,操作成功!
++新增分组-011-创建二级分组-上海分组2,上海分组1,上海分组2,上海,第二层级,操作成功!
++新增分组-012-创建三级分组-上海分组3,上海分组2,上海分组3,上海,第三层级,操作成功!
++新增分组-013-创建四级分组-上海分组4,上海分组3,上海分组4,上海,第四层级,操作成功!
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\ndef suite_setup():\r\n wd = GSTORE['wd']\r\n user_login(\"admin@pgy\", \"ub@123456\", \"csba\")\r\n enter_system()\r\n enter_manage()\r\n enter_areafuntion_manage()\r\n\r\n# def suite_teardown():\r\n# INFO('进行清除操作')\r\n# wd = GSTORE['wd']\r\n# wd.quit()\r\n\r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py b/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py
+--- a/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/05区域功能/__st__.py (date 1735806194932)
+@@ -10,8 +10,8 @@
+ enter_manage()
+ enter_areafuntion_manage()
+
+-# def suite_teardown():
+-# INFO('进行清除操作')
+-# wd = GSTORE['wd']
+-# wd.quit()
++def suite_teardown():
++ INFO('进行清除操作')
++ wd = GSTORE['wd']
++ wd.quit()
+
+Index: 运维集控/项目测试/运维标准版/testdata/04区域类型/新增区域类型.csv
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>area_type,sort,remark\r\n办公室,1,办公室\r\n大会议室,2,大会议室\r\n小会议室,3,小会议室\r\n培训室,4,培训室\r\n展览室,5,展览室
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/testdata/04区域类型/新增区域类型.csv b/运维集控/项目测试/运维标准版/testdata/04区域类型/新增区域类型.csv
+--- a/运维集控/项目测试/运维标准版/testdata/04区域类型/新增区域类型.csv (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/testdata/04区域类型/新增区域类型.csv (date 1735806194894)
+@@ -1,6 +1,8 @@
+-area_type,sort,remark
+-办公室,1,办公室
+-大会议室,2,大会议室
+-小会议室,3,小会议室
+-培训室,4,培训室
+-展览室,5,展览室
+\ No newline at end of file
++name,area_type,sort,remark,info
++新增区域类型-001-名称为空,,1,会议室,请输入类型名称
++新增区域类型-002-排序为空,会议室,,会议室,请输入排序
++新增区域类型-003-会议室,会议室,1,会议室,操作成功!
++新增区域类型-004-大会议室,大会议室,2,大会议室,操作成功!
++新增区域类型-005-小会议室,小会议室,3,小会议室,操作成功!
++新增区域类型-006-培训室,培训室,4,培训室,操作成功!
++新增区域类型-007-展览室,展览室,5,展览室,操作成功!
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/02用户管理/__st__.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\ndef suite_setup():\r\n wd = GSTORE['wd']\r\n user_login(\"admin@pgy\", \"ub@123456\", \"csba\")\r\n enter_system()\r\n enter_manage()\r\n enter_user_manage()\r\n\r\n# def suite_teardown():\r\n# INFO('进行清除操作')\r\n# wd = GSTORE['wd']\r\n# wd.quit()\r\n\r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/02用户管理/__st__.py b/运维集控/项目测试/运维标准版/cases/02用户管理/__st__.py
+--- a/运维集控/项目测试/运维标准版/cases/02用户管理/__st__.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/02用户管理/__st__.py (date 1735806194970)
+@@ -8,10 +8,13 @@
+ user_login("admin@pgy", "ub@123456", "csba")
+ enter_system()
+ enter_manage()
+- enter_user_manage()
++ enter_user_manage() # 修正缩进
+
+-# def suite_teardown():
+-# INFO('进行清除操作')
+-# wd = GSTORE['wd']
+-# wd.quit()
++def suite_teardown():
++ wd = GSTORE['wd']
++ wd.quit()
+
++# 本地启动http微服务
++# python - m http.server 80 - -directory log
++# 输出报告到钉钉
++# get_reportfile_send_dingding("用户管理模块_测试报告", "http://192.168.1.251")
+Index: 运维集控/项目测试/运维标准版/.idea/encodings.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\r\n\r\n \r\n \r\n \r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/.idea/encodings.xml b/运维集控/项目测试/运维标准版/.idea/encodings.xml
+--- a/运维集控/项目测试/运维标准版/.idea/encodings.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/.idea/encodings.xml (date 1735806196219)
+@@ -1,6 +1,0 @@
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/01登录模块/管理员登录.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\n\r\nclass user_login_001:\r\n name = 'login_test_01'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n # 读取 CSV 文件\r\n csv_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '01登录模块', '登录信息.csv'))\r\n\r\n with open(csv_path, newline='', encoding='utf-8') as csvfile:\r\n reader = csv.DictReader(csvfile)\r\n for row in reader:\r\n username = row['username']\r\n password = row['password']\r\n captcha = row['captcha']\r\n\r\n STEP(1, f'用户 {username} 登录')\r\n user_login(username, password, captcha)\r\n\r\n STEP(2, '验证是否登录成功')\r\n try:\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现弹窗', get_menu1 == \"操作成功!\")\r\n except Exception as e:\r\n print(f\"登录失败,原因是: {get_menu1}\")
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/01登录模块/管理员登录.py b/运维集控/项目测试/运维标准版/cases/01登录模块/管理员登录.py
+--- a/运维集控/项目测试/运维标准版/cases/01登录模块/管理员登录.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/01登录模块/管理员登录.py (date 1735806194992)
+@@ -1,33 +1,41 @@
+-import sys
+-import os
+-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
++#构建当前项目路径
++sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
++# 构建 CSV 文件的绝对路径
++csv_path = os.path.abspath(
++ os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '01登录模块', '登录信息.csv'))
+
+-class user_login_001:
+- name = 'login_test_01'
++class User_Login:
++ tags = ['用户登录','管理员登录']
++ #构建框架的数据集格式
++ ddt_cases = read_csv_data(csv_path)
++
+ def teststeps(self):
++ # 获取 WebDriver 实例
+ wd = GSTORE['wd']
+
+- # 读取 CSV 文件
+- csv_path = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '01登录模块', '登录信息.csv'))
++ #从self.para中解构出数据
++ name = self.name
++ username, password, captcha, info= self.para
+
+- with open(csv_path, newline='', encoding='utf-8') as csvfile:
+- reader = csv.DictReader(csvfile)
+- for row in reader:
+- username = row['username']
+- password = row['password']
+- captcha = row['captcha']
+-
+- STEP(1, f'用户 {username} 登录')
+- user_login(username, password, captcha)
++ # 记录当前测试步骤:用户登录
++ STEP(1, f'{username} 用户登录测试')
++ # 使用从 CSV 读取的数据进行登录
++ user_login(username, password, captcha)
+
+- STEP(2, '验证是否登录成功')
+- try:
+- get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+- )
+- get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现弹窗', get_menu1 == "操作成功!")
+- except Exception as e:
+- print(f"登录失败,原因是: {get_menu1}")
+\ No newline at end of file
++ #记录当前测试步骤:输出提示内容
++ STEP(2, f'预期提示内容为:{info}')
++
++ # 记录当前测试步骤:验证是否登录成功
++ STEP(3, '获取登录提示内容')
++ # 等待系统首页的特定元素(如图片)可见
++ get_menu = WebDriverWait(wd, 5).until(
++ EC.visibility_of_element_located((By.XPATH, "//p[@class='el-message__content']"))
++ )
++ get_text = get_menu.text
++
++ # 检查点:验证是否跟预定结果一致
++ CHECK_POINT('校验提示内容是否跟预定结果一致', get_text == info)
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
+Index: 运维集控/项目测试/运维标准版/.idea/modules.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\r\n\r\n \r\n \r\n \r\n \r\n \r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/.idea/modules.xml b/运维集控/项目测试/运维标准版/.idea/modules.xml
+--- a/运维集控/项目测试/运维标准版/.idea/modules.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/.idea/modules.xml (date 1735806196222)
+@@ -1,8 +1,0 @@
+-
+-
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/.idea/misc.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\r\n\r\n \r\n \r\n \r\n \r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/.idea/misc.xml b/运维集控/项目测试/运维标准版/.idea/misc.xml
+--- a/运维集控/项目测试/运维标准版/.idea/misc.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/.idea/misc.xml (date 1735806196224)
+@@ -1,7 +1,0 @@
+-
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/02用户管理/01新增用户.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\n\r\nclass UserAdd001:\r\n name = 'user_add_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击新增按钮')\r\n user_add = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'新增')]\"))\r\n )\r\n user_add.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写登录名')\r\n account_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='登录名以字母开头,长度在5-18之间,只能包含字母、数字和下划线、@']\"))\r\n )\r\n account_input.clear()\r\n account_input.send_keys(\"admin@test1\")\r\n\r\n STEP(3, '填写用户名称')\r\n account_name_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']\"))\r\n )\r\n account_name_input.clear()\r\n account_name_input.send_keys(\"admin@test1\")\r\n\r\n STEP(4, '填写新密码')\r\n passwd_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符']\"))\r\n )\r\n passwd_input.clear()\r\n passwd_input.send_keys(\"ub@123456\")\r\n\r\n STEP(5, '填写确认密码')\r\n sepasswd_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请确认密码']\"))\r\n )\r\n sepasswd_input.clear()\r\n sepasswd_input.send_keys(\"ub@123456\")\r\n\r\n STEP(6, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@aria-label='新增']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(7, '验证是否新增成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.visibility_of_element_located((By.XPATH, \"//p[@class='el-message__content']\"))\r\n )\r\n get_menu1 = get_menu.text\r\n INFO(get_menu1)\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)\r\n\r\n\r\n# class UserAdd002:\r\n# name = 'user_add_002'\r\n# def teststeps(self):\r\n# wd = GSTORE['wd']\r\n#\r\n# STEP(1, '点击新增按钮')\r\n# user_add = WebDriverWait(wd, 10).until(\r\n# EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'新增')]\"))\r\n# )\r\n# user_add.click()\r\n# sleep(2)\r\n#\r\n# STEP(2, '填写登录名')\r\n# account_input = WebDriverWait(wd, 10).until(\r\n# EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='登录名以字母开头,长度在5-18之间,只能包含字母、数字和下划线、@']\"))\r\n# )\r\n# account_input.clear()\r\n# account_input.send_keys(\"admin@test1\")\r\n#\r\n# STEP(3, '填写用户名称')\r\n# account_name_input = WebDriverWait(wd, 10).until(\r\n# EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']\"))\r\n# )\r\n# account_name_input.clear()\r\n# account_name_input.send_keys(\"测试用户2\")\r\n#\r\n# STEP(4, '填写新密码')\r\n# passwd_input = WebDriverWait(wd, 10).until(\r\n# EC.presence_of_element_located(\r\n# (By.XPATH, \"//input[@placeholder='必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符']\"))\r\n# )\r\n# passwd_input.clear()\r\n# passwd_input.send_keys(\"ub@123456\")\r\n#\r\n# STEP(5, '填写确认密码')\r\n# sepasswd_input = WebDriverWait(wd, 10).until(\r\n# EC.presence_of_element_located(\r\n# (By.XPATH, \"//input[@placeholder='请确认密码']\"))\r\n# )\r\n# sepasswd_input.clear()\r\n# sepasswd_input.send_keys(\"ub@123456\")\r\n#\r\n# STEP(6, '点击确认')\r\n# commit = WebDriverWait(wd, 10).until(\r\n# EC.element_to_be_clickable((By.XPATH, \"//div[@aria-label='新增']//span[contains(text(),'确 定')]\"))\r\n# )\r\n# commit.click()\r\n#\r\n# STEP(7, '验证是否正常提示')\r\n# get_menu = WebDriverWait(wd, 10).until(\r\n# EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n# )\r\n# get_menu1 = get_menu.text\r\n# # CHECK_POINT('检查是否出现错误提示弹窗', get_menu1 == \"登录名已存在,请重新输入\")\r\n# CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n# sleep(2)\r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/02用户管理/01新增用户.py b/运维集控/项目测试/运维标准版/cases/02用户管理/01新增用户.py
+--- a/运维集控/项目测试/运维标准版/cases/02用户管理/01新增用户.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/02用户管理/01新增用户.py (date 1735806194984)
+@@ -1,120 +1,119 @@
+-import sys
+-import os
+-sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
++#构建当前项目路径
++sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
++# 构建 CSV 文件的绝对路径
++csv_path = os.path.abspath(
++ os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '02用户管理', '新增用户.csv'))
+
+-class UserAdd001:
+- name = 'user_add_001'
++class UserAdd:
++ tags = ['新增用户']
++ #构建框架的数据集格式
++ ddt_cases = read_csv_data(csv_path)
++
+ def teststeps(self):
+ wd = GSTORE['wd']
+
++ #从self.para中解构出数据
++ name = self.name
++ account, user_name, new_passwd, comfire_passwd, authority, user_number, phone, email, remark, info= self.para
++
+ STEP(1, '点击新增按钮')
+ user_add = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+ )
+ user_add.click()
+ sleep(2)
+
+- STEP(2, '填写登录名')
++ STEP(2, f'填写登录名: {account}')
+ account_input = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='登录名以字母开头,长度在5-18之间,只能包含字母、数字和下划线、@']"))
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='登录名以字母开头,长度在5-18之间,只能包含字母、数字和下划线、@']"))
+ )
+ account_input.clear()
+- account_input.send_keys("admin@test1")
++ account_input.send_keys(account)
+
+- STEP(3, '填写用户名称')
+- account_name_input = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']"))
+- )
+- account_name_input.clear()
+- account_name_input.send_keys("admin@test1")
+-
+- STEP(4, '填写新密码')
+- passwd_input = WebDriverWait(wd, 10).until(
++ STEP(3, f'填写用户名称: {user_name}')
++ user_name_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']"))
++ )
++ user_name_input.clear()
++ user_name_input.send_keys(user_name)
++
++ STEP(4, f'填写新的密码: {new_passwd}')
++ new_passwd_input = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+ (By.XPATH, "//input[@placeholder='必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符']"))
+ )
+- passwd_input.clear()
+- passwd_input.send_keys("ub@123456")
++ new_passwd_input.clear()
++ new_passwd_input.send_keys(new_passwd)
+
+- STEP(5, '填写确认密码')
+- sepasswd_input = WebDriverWait(wd, 10).until(
++ STEP(5, f'填写确认密码: {comfire_passwd}')
++ comfire_passwd_input = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+ (By.XPATH, "//input[@placeholder='请确认密码']"))
+ )
+- sepasswd_input.clear()
+- sepasswd_input.send_keys("ub@123456")
++ comfire_passwd_input.clear()
++ comfire_passwd_input.send_keys(comfire_passwd)
++
++ STEP(6, f'选择权限: {authority}')
++ authority_select = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//span[@class='el-radio__label'][contains(text(),'普通用户')]"))
++ )
++ authority_select.click()
+
+- STEP(6, '点击确认')
++ STEP(7, f'填写用户工号: {user_number}')
++ user_number_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='请输入工号']"))
++ )
++ user_number_input.clear()
++ user_number_input.send_keys(user_number)
++
++ STEP(8, f'填写手机号: {phone}')
++ phone_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='请输入手机号码']"))
++ )
++ phone_input.clear()
++ phone_input.send_keys(phone)
++
++ STEP(9, f'填写邮箱: {email}')
++ email_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='请输入邮箱']"))
++ )
++ email_input.clear()
++ email_input.send_keys(email)
++
++ STEP(10, f'填写备注: {remark}')
++ remark_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located(
++ (By.XPATH, "//input[@placeholder='备注']"))
++ )
++ remark_input.clear()
++ remark_input.send_keys(remark)
++
++ STEP(11, '点击“确认”按钮')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[@aria-label='新增']//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable(
++ (By.XPATH, "//div[@aria-label='新增']//span[contains(text(),'确 定')]"))
+ )
+ commit.click()
+
+- STEP(7, '验证是否新增成功')
++ STEP(12, f'预期提示内容为:{info}')
++
++ STEP(13, '获取页面实际提示内容')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.visibility_of_element_located((By.XPATH, "//p[@class='el-message__content']"))
++ EC.visibility_of_element_located(
++ (By.XPATH, "//p[@class='el-message__content']"))
+ )
+ get_menu1 = get_menu.text
+- INFO(get_menu1)
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+
+-
+-# class UserAdd002:
+-# name = 'user_add_002'
+-# def teststeps(self):
+-# wd = GSTORE['wd']
+-#
+-# STEP(1, '点击新增按钮')
+-# user_add = WebDriverWait(wd, 10).until(
+-# EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+-# )
+-# user_add.click()
+-# sleep(2)
+-#
+-# STEP(2, '填写登录名')
+-# account_input = WebDriverWait(wd, 10).until(
+-# EC.presence_of_element_located((By.XPATH, "//input[@placeholder='登录名以字母开头,长度在5-18之间,只能包含字母、数字和下划线、@']"))
+-# )
+-# account_input.clear()
+-# account_input.send_keys("admin@test1")
+-#
+-# STEP(3, '填写用户名称')
+-# account_name_input = WebDriverWait(wd, 10).until(
+-# EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']"))
+-# )
+-# account_name_input.clear()
+-# account_name_input.send_keys("测试用户2")
+-#
+-# STEP(4, '填写新密码')
+-# passwd_input = WebDriverWait(wd, 10).until(
+-# EC.presence_of_element_located(
+-# (By.XPATH, "//input[@placeholder='必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符']"))
+-# )
+-# passwd_input.clear()
+-# passwd_input.send_keys("ub@123456")
+-#
+-# STEP(5, '填写确认密码')
+-# sepasswd_input = WebDriverWait(wd, 10).until(
+-# EC.presence_of_element_located(
+-# (By.XPATH, "//input[@placeholder='请确认密码']"))
+-# )
+-# sepasswd_input.clear()
+-# sepasswd_input.send_keys("ub@123456")
+-#
+-# STEP(6, '点击确认')
+-# commit = WebDriverWait(wd, 10).until(
+-# EC.element_to_be_clickable((By.XPATH, "//div[@aria-label='新增']//span[contains(text(),'确 定')]"))
+-# )
+-# commit.click()
+-#
+-# STEP(7, '验证是否正常提示')
+-# get_menu = WebDriverWait(wd, 10).until(
+-# EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
+-# )
+-# get_menu1 = get_menu.text
+-# # CHECK_POINT('检查是否出现错误提示弹窗', get_menu1 == "登录名已存在,请重新输入")
+-# CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+-# sleep(2)
++ CHECK_POINT('校验实际提示内容和预期提示内容是否一致', get_menu1 == info)
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/.idea/inspectionProfiles/profiles_settings.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\r\n \r\n \r\n \r\n \r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/profiles_settings.xml b/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/profiles_settings.xml
+--- a/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/profiles_settings.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/profiles_settings.xml (date 1735806196215)
+@@ -1,6 +1,0 @@
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/02用户管理/02查询用户.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\n\r\nclass Userquery001:\r\n name = 'user_query_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击搜索框')\r\n user_query = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n user_query.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写登录名')\r\n account_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n account_input.clear()\r\n account_input.send_keys(\"admin@test1\")\r\n\r\n STEP(3, '校验是否成功检索用户')\r\n get_user = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[normalize-space()='admin@test1']\"))\r\n )\r\n get_username = get_user.text\r\n CHECK_POINT('校验是否成功检索用户', get_username == \"admin@test1\")\r\n sleep(2)\r\n\r\n\r\n # 调用钉钉输出测试报告\r\n # get_reportfile_send_dingding(\"123213_测试报告\", \"http://192.168.1.251\")
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/02用户管理/02查询用户.py b/运维集控/项目测试/运维标准版/cases/02用户管理/02查询用户.py
+--- a/运维集控/项目测试/运维标准版/cases/02用户管理/02查询用户.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/02用户管理/02查询用户.py (date 1735806194979)
+@@ -4,8 +4,8 @@
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+
+-class Userquery001:
+- name = 'user_query_001'
++class Userquery:
++ name = 'user_query'
+ def teststeps(self):
+ wd = GSTORE['wd']
+
+@@ -14,23 +14,21 @@
+ EC.element_to_be_clickable((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+ )
+ user_query.click()
+- sleep(2)
+
+ STEP(2, '填写登录名')
+ account_input = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+ )
+ account_input.clear()
+- account_input.send_keys("admin@test1")
++ account_input.send_keys("test_user1")
+
+ STEP(3, '校验是否成功检索用户')
+ get_user = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[normalize-space()='admin@test1']"))
++ EC.presence_of_element_located((By.XPATH, "//div[normalize-space()='test_user1']"))
+ )
+ get_username = get_user.text
+- CHECK_POINT('校验是否成功检索用户', get_username == "admin@test1")
+- sleep(2)
++ CHECK_POINT('校验是否成功检索用户', get_username == "test_user1")
+
+-
+- # 调用钉钉输出测试报告
+- # get_reportfile_send_dingding("123213_测试报告", "http://192.168.1.251")
+\ No newline at end of file
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ wd.refresh()
+Index: 运维集控/项目测试/运维标准版/.idea/inspectionProfiles/Project_Default.xml
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n \r\n \r\n \r\n
\r\n \r\n \r\n \r\n
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/Project_Default.xml b/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/Project_Default.xml
+--- a/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/Project_Default.xml (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/.idea/inspectionProfiles/Project_Default.xml (date 1735806196217)
+@@ -1,19 +1,0 @@
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+-
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/02用户管理/03编辑用户.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\n\r\nclass UserModify001:\r\n name = 'user_modify_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击搜索框')\r\n user_query = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n user_query.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写登录名')\r\n account_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n account_input.clear()\r\n account_input.send_keys(\"admin@test1\")\r\n\r\n STEP(3, '勾选用户')\r\n select_click= WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//tbody//tr//td//div//label//span//span\"))\r\n )\r\n select_click.click()\r\n sleep(2)\r\n\r\n STEP(4, '点击编辑按钮')\r\n user_update = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[contains(@class,'company-edmit-right')]//span[contains(text(),'编辑')]\"))\r\n )\r\n user_update.click()\r\n sleep(2)\r\n\r\n STEP(5, '填写用户名称')\r\n account_name_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']\"))\r\n )\r\n account_name_input.clear()\r\n account_name_input.send_keys(\"admin@update\")\r\n\r\n STEP(6, '勾选修改密码按钮')\r\n user_passwd_click = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[contains(@class,'dialog-input')]//span[contains(@class,'el-checkbox__inner')]\"))\r\n )\r\n user_passwd_click.click()\r\n sleep(2)\r\n\r\n STEP(6, '填写当前用户密码')\r\n current_passwd = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[contains(@placeholder,'请输当前登录用户的密码')]\"))\r\n )\r\n current_passwd.clear()\r\n current_passwd.send_keys(\"ub@123456\")\r\n\r\n STEP(7, '填写新密码')\r\n newpasswd = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[contains(@placeholder,'必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符')]\"))\r\n )\r\n newpasswd.clear()\r\n newpasswd.send_keys(\"ub@12345678\")\r\n\r\n STEP(8, '填写确认密码')\r\n verify_passwd = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请确认密码']\"))\r\n )\r\n verify_passwd.clear()\r\n verify_passwd.send_keys(\"ub@12345678\")\r\n\r\n STEP(9, '填写用户工号')\r\n sepasswd_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请输入工号']\"))\r\n )\r\n sepasswd_input.clear()\r\n sepasswd_input.send_keys(\"123456\")\r\n\r\n STEP(9, '填写手机号')\r\n phone = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请输入手机号码']\"))\r\n )\r\n phone.clear()\r\n phone.send_keys(\"13169131242\")\r\n\r\n STEP(10, '填写邮箱')\r\n sepasswd_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请输入邮箱']\"))\r\n )\r\n sepasswd_input.clear()\r\n sepasswd_input.send_keys(\"12341@qq.com\")\r\n\r\n STEP(11, '填写备注')\r\n user_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='备注']\"))\r\n )\r\n user_remark.clear()\r\n user_remark.send_keys(\"测试用户\")\r\n\r\n STEP(12, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[contains(@aria-label,'编辑')]//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(13, '验证是否编辑成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.visibility_of_element_located((By.XPATH, \"//p[@class='el-message__content']\"))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/02用户管理/03编辑用户.py b/运维集控/项目测试/运维标准版/cases/02用户管理/03编辑用户.py
+--- a/运维集控/项目测试/运维标准版/cases/02用户管理/03编辑用户.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/02用户管理/03编辑用户.py (date 1735806194976)
+@@ -13,40 +13,31 @@
+ user_query = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+ )
+- user_query.click()
+- sleep(2)
++ user_query.clear()
++ user_query.send_keys("test_user1")
+
+- STEP(2, '填写登录名')
+- account_input = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+- )
+- account_input.clear()
+- account_input.send_keys("admin@test1")
+-
+- STEP(3, '勾选用户')
++ STEP(2, '勾选用户')
+ select_click= WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//tbody//tr//td//div//label//span//span"))
++ EC.presence_of_element_located((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"))
+ )
+ select_click.click()
+- sleep(2)
+
+- STEP(4, '点击编辑按钮')
++ STEP(3, '点击编辑按钮')
+ user_update = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[contains(@class,'company-edmit-right')]//span[contains(text(),'编辑')]"))
++ EC.element_to_be_clickable((By.XPATH, "//span[contains(text(),'编辑')]"))
+ )
+ user_update.click()
+- sleep(2)
+
+- STEP(5, '填写用户名称')
++ STEP(4, '修改用户名称')
+ account_name_input = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//div[@class='el-input el-input--suffix']//input[@placeholder='请输入用户名称']"))
++ EC.presence_of_element_located((By.XPATH, "//div[contains(@class,'dialog-input')]//input[contains(@placeholder,'请输入用户名称')]"))
+ )
+ account_name_input.clear()
+- account_name_input.send_keys("admin@update")
++ account_name_input.send_keys("test_update")
+
+- STEP(6, '勾选修改密码按钮')
++ STEP(5, '勾选修改密码按钮')
+ user_passwd_click = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[contains(@class,'dialog-input')]//span[contains(@class,'el-checkbox__inner')]"))
++ EC.element_to_be_clickable((By.XPATH, "//span[@class='el-checkbox__label']"))
+ )
+ user_passwd_click.click()
+ sleep(2)
+@@ -54,7 +45,7 @@
+ STEP(6, '填写当前用户密码')
+ current_passwd = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+- (By.XPATH, "//input[contains(@placeholder,'请输当前登录用户的密码')]"))
++ (By.XPATH, "//input[@placeholder='请输当前登录用户的密码']"))
+ )
+ current_passwd.clear()
+ current_passwd.send_keys("ub@123456")
+@@ -62,7 +53,7 @@
+ STEP(7, '填写新密码')
+ newpasswd = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+- (By.XPATH, "//input[contains(@placeholder,'必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符')]"))
++ (By.XPATH, "//input[@placeholder='必须包含字母(不区分大小写)、数字和特殊字符,至少8个字符']"))
+ )
+ newpasswd.clear()
+ newpasswd.send_keys("ub@12345678")
+@@ -109,14 +100,17 @@
+
+ STEP(12, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+- EC.element_to_be_clickable((By.XPATH, "//div[contains(@aria-label,'编辑')]//span[contains(text(),'确 定')]"))
++ EC.element_to_be_clickable((By.XPATH, "//div[@aria-label='编辑']//span[contains(text(),'确 定')]"))
+ )
+ commit.click()
+
+ STEP(13, '验证是否编辑成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.visibility_of_element_located((By.XPATH, "//p[@class='el-message__content']"))
++ EC.visibility_of_element_located((By.XPATH, "//p[contains(@class,'el-message__content')]"))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ wd.refresh()
+\ No newline at end of file
+Index: 运维集控/项目测试/运维标准版/cases/02用户管理/04删除用户.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass Userdelete001:\r\n name = 'user_delete_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击搜索框')\r\n user_query = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n user_query.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写登录名')\r\n account_input = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='请输入用户名称']\"))\r\n )\r\n account_input.clear()\r\n account_input.send_keys(\"admin@test1\")\r\n\r\n STEP(3, '勾选用户')\r\n select_click= WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//tbody//tr//td//div//label//span//span\"))\r\n )\r\n select_click.click()\r\n sleep(2)\r\n\r\n STEP(4, '点击删除按钮')\r\n user_update = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//span[contains(text(),'删除')]\"))\r\n )\r\n user_update.click()\r\n sleep(2)\r\n\r\n STEP(5, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//button[contains(@class,'el-button el-button--default el-button--small el-button--primary')]//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n\r\n STEP(6, '验证是否删除成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.visibility_of_element_located((By.XPATH, \"//p[@class='el-message__content']\"))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)\r\n\r\n # 本地启动http微服务\r\n # python - m http.server 80 - -directory log\r\n # 输出报告到钉钉\r\n get_reportfile_send_dingding(\"用户管理模块_测试报告\", \"http://192.168.1.251\")
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/02用户管理/04删除用户.py b/运维集控/项目测试/运维标准版/cases/02用户管理/04删除用户.py
+--- a/运维集控/项目测试/运维标准版/cases/02用户管理/04删除用户.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/02用户管理/04删除用户.py (date 1735806194974)
+@@ -12,29 +12,20 @@
+ user_query = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+ )
+- user_query.click()
+- sleep(2)
++ user_query.clear()
++ user_query.send_keys("test_user3")
+
+- STEP(2, '填写登录名')
+- account_input = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//input[@placeholder='请输入用户名称']"))
+- )
+- account_input.clear()
+- account_input.send_keys("admin@test1")
+-
+- STEP(3, '勾选用户')
++ STEP(2, '勾选用户')
+ select_click= WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.XPATH, "//tbody//tr//td//div//label//span//span"))
++ EC.presence_of_element_located((By.XPATH, "//th[contains(@class,'is-leaf el-table__cell')]//span[contains(@class,'el-checkbox__inner')]"))
+ )
+ select_click.click()
+- sleep(2)
+
+ STEP(4, '点击删除按钮')
+ user_update = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//span[contains(text(),'删除')]"))
+ )
+ user_update.click()
+- sleep(2)
+
+ STEP(5, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+@@ -42,16 +33,13 @@
+ )
+ commit.click()
+
+-
+ STEP(6, '验证是否删除成功')
+ get_menu = WebDriverWait(wd, 10).until(
+ EC.visibility_of_element_located((By.XPATH, "//p[@class='el-message__content']"))
+ )
+ get_menu1 = get_menu.text
+ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+
+- # 本地启动http微服务
+- # python - m http.server 80 - -directory log
+- # 输出报告到钉钉
+- get_reportfile_send_dingding("用户管理模块_测试报告", "http://192.168.1.251")
+\ No newline at end of file
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ wd.refresh()
+Index: 运维集控/项目测试/运维标准版/cases/03区域分组/01新增区域分组.py
+IDEA additional info:
+Subsystem: com.intellij.openapi.diff.impl.patch.BaseRevisionTextPatchEP
+<+>import sys\r\nimport os\r\nsys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))\r\nfrom 运维集控.项目测试.运维标准版.lib.base import *\r\n\r\nclass AreagroupAdd001:\r\n name = 'Areagroup_add_001'\r\n def teststeps(self):\r\n wd = GSTORE['wd']\r\n\r\n STEP(1, '点击新增按钮')\r\n areagroup_add = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='company-edmit-right']//span[contains(text(),'新增')]\"))\r\n )\r\n areagroup_add.click()\r\n sleep(2)\r\n\r\n STEP(2, '填写分组名称')\r\n group_name = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='长度1-20个字符']\"))\r\n )\r\n group_name.clear()\r\n group_name.send_keys(\"测试区域1\")\r\n\r\n STEP(3, '填写分组地址')\r\n group_address = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.XPATH, \"//input[@placeholder='输入地址不能大于50个字符']\"))\r\n )\r\n group_address.clear()\r\n group_address.send_keys(\"顺恒利大厦\")\r\n\r\n STEP(4, '填写分组备注')\r\n group_remark = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located(\r\n (By.XPATH, \"//input[@placeholder='请输入备注']\"))\r\n )\r\n group_remark.clear()\r\n group_remark.send_keys(\"测试分组备注\")\r\n\r\n STEP(6, '点击确认')\r\n commit = WebDriverWait(wd, 10).until(\r\n EC.element_to_be_clickable((By.XPATH, \"//div[@class='dialog-footer']//span[contains(text(),'确 定')]\"))\r\n )\r\n commit.click()\r\n\r\n STEP(7, '验证是否新增成功')\r\n get_menu = WebDriverWait(wd, 10).until(\r\n EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))\r\n )\r\n get_menu1 = get_menu.text\r\n CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == \"操作成功!\")\r\n sleep(2)
+Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
+<+>UTF-8
+===================================================================
+diff --git a/运维集控/项目测试/运维标准版/cases/03区域分组/01新增区域分组.py b/运维集控/项目测试/运维标准版/cases/03区域分组/01新增区域分组.py
+--- a/运维集控/项目测试/运维标准版/cases/03区域分组/01新增区域分组.py (revision b789fc6f1e5a92b7596341cee33aeff2b5a8357e)
++++ b/运维集控/项目测试/运维标准版/cases/03区域分组/01新增区域分组.py (date 1735806194959)
+@@ -3,39 +3,64 @@
+ sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
+ from 运维集控.项目测试.运维标准版.lib.base import *
+
+-class AreagroupAdd001:
+- name = 'Areagroup_add_001'
++#构建当前项目路径
++sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..', '..', '..', '..')))
++# 构建 CSV 文件的绝对路径
++csv_path = os.path.abspath(
++ os.path.join(os.path.dirname(__file__), '..', '..', 'testdata', '03区域分组', '新增区域分组.csv'))
++
++class AreagroupAdd:
++ tag = ['新增区域分组']
++ ddt_cases = read_csv_data(csv_path)
+ def teststeps(self):
+ wd = GSTORE['wd']
++ # 从self.para中解构出数据
++ name = self.name
++ area_group, group_name, group_address, remark, info = self.para
+
+ STEP(1, '点击新增按钮')
+ areagroup_add = WebDriverWait(wd, 10).until(
+ EC.element_to_be_clickable((By.XPATH, "//div[@class='company-edmit-right']//span[contains(text(),'新增')]"))
+ )
+ areagroup_add.click()
+- sleep(2)
+
+- STEP(2, '填写分组名称')
+- group_name = WebDriverWait(wd, 10).until(
++ STEP(2, f'查看并选择区域分组:{area_group}')
++ if area_group:
++ area_group_input = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located((By.XPATH, "// input[ @ placeholder = '请选择分组']"))
++ )
++ area_group_input.clear()
++ area_group_input.send_keys(area_group)
++ sleep(1)
++ #默认选择第一个内容
++ area_group_select = WebDriverWait(wd, 10).until(
++ EC.presence_of_element_located((By.XPATH, "//div[@class='el-cascader__suggestion-panel el-scrollbar']//li[1]//span[1]"))
++ )
++ area_group_select.click()
++ else:
++ print("group_name 为空,不执行选择区域分组的操作")
++
++ STEP(3, f'填写分组名称:{group_name}')
++ group_name_input = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='长度1-20个字符']"))
+ )
+- group_name.clear()
+- group_name.send_keys("测试区域1")
++ group_name_input.clear()
++ group_name_input.send_keys(group_name)
+
+- STEP(3, '填写分组地址')
+- group_address = WebDriverWait(wd, 10).until(
++ STEP(4, f'填写分组地址:{group_address}')
++ group_address_input = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located((By.XPATH, "//input[@placeholder='输入地址不能大于50个字符']"))
+ )
+- group_address.clear()
+- group_address.send_keys("顺恒利大厦")
++ group_address_input.clear()
++ group_address_input.send_keys(group_address)
+
+- STEP(4, '填写分组备注')
++ STEP(5, f'填写分组备注:{remark}')
+ group_remark = WebDriverWait(wd, 10).until(
+ EC.presence_of_element_located(
+ (By.XPATH, "//input[@placeholder='请输入备注']"))
+ )
+ group_remark.clear()
+- group_remark.send_keys("测试分组备注")
++ group_remark.send_keys(remark)
+
+ STEP(6, '点击确认')
+ commit = WebDriverWait(wd, 10).until(
+@@ -45,8 +70,13 @@
+
+ STEP(7, '验证是否新增成功')
+ get_menu = WebDriverWait(wd, 10).until(
+- EC.presence_of_element_located((By.CSS_SELECTOR, '.el-message__content'))
++ EC.visibility_of_element_located((By.XPATH, "//p[@class='el-message__content']"))
+ )
+ get_menu1 = get_menu.text
+- CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == "操作成功!")
+- sleep(2)
+\ No newline at end of file
++ CHECK_POINT('检查是否出现成功提示弹窗', get_menu1 == info )
++
++ # 截图并保存
++ SELENIUM_LOG_SCREEN(wd, "50%")
++ sleep(1)
++ wd.refresh()
++