1 2 3 4 5 6 7 8 9 10 11 12 13
| driver = webdriver.Remote("http://127.0.0.1:4723/wd/hub", caps) width_x = driver.get_window_size()["width"] width_y = driver.get_window_size()["height"] print("等待开始······") time.sleep(10) print("等待结束······") count = 0 while count <= 1800: driver.swipe(width_x * 4 / 5, width_y * 1 / 9, width_x * 2 / 5, width_y * 1 / 9, duratio count += 1
|