请问appiun如何曲线滑屏
请问怎么滑出曲线,swipe()只能滑出直线# 获得屏幕坐标x,y
def getSize(driver):
x = driver.get_window_size()['width']
y = driver.get_window_size()['height']
return (x, y)
# 屏幕向上滑动屏幕
def swipeUp(driver,t=3):
print('向上滑动屏幕 ')
local = getSize(driver)
x1 = int(local * float('%.2f' % random.uniform(0.40,0.70)))
x2 = int(local * float('%.2f' % random.uniform(0.40,0.70)))
y1 = int(local * float('%.2f' % random.uniform(0.70,0.80)))
y2 = int(local * float('%.2f' % random.uniform(0.20,0.30)))
driver.swipe(x1, y1, x2, y2, random.randint(700,1000))
页:
[1]