import sys import os # 获取当前脚本的绝对路径 current_dir = os.path.dirname(os.path.abspath(__file__)) # 构建预定系统的绝对路径 预定系统_path = os.path.abspath(os.path.join(current_dir, '..','..','..')) # 添加路径 sys.path.append(预定系统_path) from 预定系统.Base.base import * def suite_setup(): STEP(1, "初始化浏览器") # 初始化浏览器与系统地址 browser_init("标准版预定系统") wd = GSTORE['wd'] admin_login("admin@ZDH", "Ubains@4321") enter_the_backend() INFO("打开账号管理下拉菜单") safe_click((By.XPATH, "//span[@class='aside_menu menu_account']"), wd) INFO("进入部门管理模块") safe_click((By.XPATH, "//li[contains(text(),'部门管理')]"), wd)