code
b= ActionChains(driver) c= driver.find_element_by_xpath("元素名") b.click_and_hold(c).perform() for i in range(100): try: b.move_by_offset(15,0).perform() except Exception: break #此处可以根据需求来跳出循环 b.reset_actions()
code
b= ActionChains(driver) c= driver.find_element_by_xpath("元素名") b.click_and_hold(c).perform() for i in range(100): try: b.move_by_offset(15,0).perform() except Exception: break #此处可以根据需求来跳出循环 b.reset_actions()