from selenium.webdriver import ActionChains
action = ActionChains(self.driver)
source = self.driver.find_element_by_xpath("//*[@id='yodaBox']")
action.click_and_hold(source)
action.move_by_offset(500, 100)
# 释放滑块
action.release().perform()