b= ActionChains(driver)
c= driver.find_element_by_xpath("元素名")
b.click_and_hold(c).perform()
for iin range(100):
try:
b.move_by_offset(15,0).perform()
except Exception:
break #此处可以根据需求来跳出循环
b.reset_actions()
b= ActionChains(driver)
c= driver.find_element_by_xpath("元素名")
b.click_and_hold(c).perform()
for iin range(100):
try:
b.move_by_offset(15,0).perform()
except Exception:
break #此处可以根据需求来跳出循环
b.reset_actions()
本文标题:selenium 自动化滑动条的操作
本文链接:https://www.haomeiwen.com/subject/czwfcftx.html
网友评论