matmanjs / matman

Web 端对端测试(E2E,End-to-End Testing)解决方案
https://matmanjs.github.io/matman
MIT License
46 stars 10 forks source link

puppeteer 如何滚动到底部 #230

Open helinjiang opened 3 years ago

helinjiang commented 3 years ago

比如测试图片懒加载或者分页加载时,需要将页面滚动到底部

helinjiang commented 3 years ago
page.evaluate(_ => {
  window.scrollBy(0, window.innerHeight);
});