| Version 1 (modified by chenyang, 12 years ago) (diff) |
|---|
帖子页或版块页面内容较长,有时候,我们要操作的元素在滚动条的下面,需要拖动滚动条后,才能操作目标元素,selenium如何滚动无素呢?
首先,从页面中找到目标元素,然后element.location_once_scrolled_into_view, 如下
......
content = driver.find_element_by_id("content")
content.location_once_scrolled_into_view
![(please configure the [header_logo] section in trac.ini)](http://www1.pconline.com.cn/hr/2009/global/images/logo.gif)