from selenium.webdriver.common.action_chains import ActionChains
#滑动滑块
def slide_slider(self):
try:
button=self.browser.find_element_by_id(‘nc_1_n1z’)#找到“滑块”
action=ActionChains(self.browser)#实例化一个action对象
action.click_and_hold(button).perform()#perform()用来执行ActionChains中存储的行为
action.reset_actions()
action.move_by_offset(300,0).perform()
except:
pass
了解更多分析及数据抓取可查看:
http://cloud.yisurvey.com:9081/html/d8acf20b-342f-4806-8dcc-5e6a8d00881d.html?ly=csdn