refactor: 优化日志系统及增加定位转换器
- 更新 pytest.ini 统一配置日志格式和基础命令。 - 优化 main.py 增加测试后的日志自动备份与定期清理功能。 - 新增 finder.py 实现定位元素转换机制
This commit is contained in:
29
core/modules.py
Normal file
29
core/modules.py
Normal file
@@ -0,0 +1,29 @@
|
||||
#!/usr/bin/env python
|
||||
# coding=utf-8
|
||||
|
||||
"""
|
||||
@author: CNWei,ChenWei
|
||||
@Software: PyCharm
|
||||
@contact: t6g888@163.com,chenwei@zygj.com
|
||||
@file: modules
|
||||
@date: 2026/1/20 11:54
|
||||
@desc:
|
||||
"""
|
||||
|
||||
from enum import Enum
|
||||
|
||||
class Locator(str, Enum):
|
||||
# --- 原有 Selenium 支持 ---
|
||||
ID = "id"
|
||||
NAME = "name"
|
||||
CLASS = "class"
|
||||
TAG = "tag"
|
||||
LINK_TEXT = "link_text"
|
||||
PARTIAL_LINK_TEXT = "partial_link_text"
|
||||
CSS = "css"
|
||||
XPATH = "xpath"
|
||||
# --- Appium 特有支持 ---
|
||||
ACCESSIBILITY_ID = "accessibility_id"
|
||||
AID = "aid" # 简写
|
||||
ANDROID_UIAUTOMATOR = "android_uiautomator"
|
||||
IOS_PREDICATE = "ios_predicate"
|
||||
Reference in New Issue
Block a user