MCPcopy
hub / github.com/codeceptjs/CodeceptJS / scrollPageToBottom

Method scrollPageToBottom

lib/helper/Puppeteer.js:909–915  ·  view source on GitHub ↗

* {{> scrollPageToBottom }}

()

Source from the content-addressed store, hash-verified

907 * {{> scrollPageToBottom }}
908 */
909 scrollPageToBottom() {
910 return this.executeScript(() => {
911 const body = document.body
912 const html = document.documentElement
913 window.scrollTo(0, Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight))
914 })
915 }
916
917 /**
918 * {{> scrollTo }}

Callers 4

testsFunction · 0.45

Calls 2

executeScriptMethod · 0.95
scrollToMethod · 0.45

Tested by

no test coverage detected