我有一个python脚本,它贯穿整个UI并填充很多页面。我拍了一张截图,但是如果页面比屏幕长,那么我会错过一半的页面。我尝试了更长的篇幅,但对于普通的页面,这是荒谬的,无法使用。我尝试使用ashot,但不知道如何将其添加到pycharm中的项目中
有什么智慧或其他想法吗?谢谢
更新尝试过但不起作用的内容(页面上未出现任何问题:
actions = ActionChains(driver)
actions.move_to_element(continuebtn)
此外:
chrome_options.add_argument('--enable-javascript')
driver.execute_script("window.scrollTo(0, document.body.scrollHeight);")
driver.execute_script("window.scrollTo(0, 1080);")
您可以拍摄多个屏幕截图并滚动浏览整个页面
一个简单的例子是:
相关问题 更多 >
编程相关推荐