修改重启驱动设置手机不熄屏;设置下载数据为3个月
This commit is contained in:
@@ -177,8 +177,10 @@ class MoreDownloadPage:
|
||||
def _swipe_year_wheel(self):
|
||||
"""滑动年份选择器的滚轮"""
|
||||
try:
|
||||
# 获取年份选择器滚轮元素
|
||||
year_wheel = self.driver.find_element(AppiumBy.ID, "com.bjjw.cjgc:id/wheelView1")
|
||||
# # 获取年份选择器滚轮元素
|
||||
# year_wheel = self.driver.find_element(AppiumBy.ID, "com.bjjw.cjgc:id/wheelView1")
|
||||
# 获取月份选择器滚轮元素
|
||||
year_wheel = self.driver.find_element(AppiumBy.ID, "com.bjjw.cjgc:id/wheelView2")
|
||||
|
||||
# 获取滚轮的位置和尺寸
|
||||
location = year_wheel.location
|
||||
@@ -191,7 +193,7 @@ class MoreDownloadPage:
|
||||
# 计算滑动距离 - 滚轮高度的1/5
|
||||
swipe_distance = size['height'] // 5
|
||||
|
||||
for i in range(1):
|
||||
for i in range(3):
|
||||
# 执行滑动操作 - 从中心向上滑动1/5高度
|
||||
self.driver.swipe(center_x, center_y - swipe_distance, center_x, center_y, 500)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user