selenium 模拟鼠标滚轮,滚动到可见的选项

self.wrap_driver.move_to_element(locator=const_xpath.monitor_select)    #鼠标移动到某个区域
target = self.driver.find_element_by_xpath(const_xpath.insurance[1]) #下拉框中的目标元素
self.driver.execute_script("arguments[0].scrollIntoView(false);", target) #移动到下拉框中的目标元素,让selenium可以点击它。
原文地址:https://www.cnblogs.com/staff/p/14831371.html