button = driver.find_element_by_xpath(’//*[@id=“slider2”]/div/div[2]’) # 找到“蓝色滑块”
action = ActionChains(driver) # 实例化一个action对象
action.click_and_hold(button).perform() # perform()用来执行ActionChains中存储的行为
action.move_by_offset(400, 0).perform()
action.reset_actions()
selenium登录页滑块解锁操作
最新推荐文章于 2024-04-30 13:41:44 发布