Commit 070a860c authored by 邱阿朋's avatar 邱阿朋

fix(advert_cost): 处理分页按钮不存在的情况

- 添加判断分页按钮是否存在的逻辑
- 不存在时记录调试日志并跳过翻页操作
- 避免因缺少分页按钮导致的异常或错误
parent a9b532d4
......@@ -89,6 +89,11 @@ class AdvertCost(AutoInterface):
self.page.ele(apply).click()
time.sleep(5)
# 判断分页按钮是否存在
if self.page.ele('#products_view:products_view:pagination-dropdown',timeout=5) is None:
self.logger.debug("分页按钮不存在,跳过翻页")
return
# 点击分页按钮
dropdown = '#products_view:products_view:pagination-dropdown'
self.page.wait.eles_loaded(dropdown)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment