美文网首页我爱编程
selenium 自动化滑动条的操作

selenium 自动化滑动条的操作

作者: 放开那个电扇 | 来源:发表于2018-03-24 02:31 被阅读0次

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