feat: 优化定位转换器调整框架结构

- 新增 finder.py 重构定位转换器
- 优化 .gitignore 文件
- 其他优化
This commit is contained in:
2026-01-25 17:24:04 +08:00
parent 92d06dd9cf
commit 5a50eb8289
15 changed files with 342 additions and 126 deletions

View File

@@ -20,7 +20,7 @@ from selenium.webdriver.remote.webdriver import WebDriver
from selenium.webdriver.remote.webdriver import WebElement
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.expected_conditions import visibility_of_element_located
__all__ = ["EC","custom_ec"]
logger = logging.getLogger(__name__)
@@ -97,3 +97,16 @@ def func_4(mark):
if __name__ == "__main__":
print(custom_ec)
from selenium.common.exceptions import StaleElementReferenceException
def luo_ji(locator: Tuple[str, str]):
_ = locator
def _predicate(driver):
try:
_ = driver
raise StaleElementReferenceException()
except StaleElementReferenceException:
return False
return _predicate