查到“查看更多”按钮元素,将下一页的元素拖动到可见区域,有两种方式 第一种方式:WebElement对象的方法,源码当中也是调用了js语句arguments[0].scrollIntoView(true),默认与浏览器网页的可是区域顶部对齐 ele.location_once_scrolled_into_view 第二种方式:调用execute_script方法,来执行js语句 js语句:arguments[0].scrollIntoView(true)//arguments[0].click(); driver.execute_script(“arguments[0].scrollIntoView(true)”, ele)