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

Method scrollPageToBottom

lib/helper/Playwright.js:1663–1669  ·  view source on GitHub ↗

* {{> scrollPageToBottom }}

()

Source from the content-addressed store, hash-verified

1661 * {{> scrollPageToBottom }}
1662 */
1663 async scrollPageToBottom() {
1664 return this.executeScript(() => {
1665 const body = document.body
1666 const html = document.documentElement
1667 window.scrollTo(0, Math.max(body.scrollHeight, body.offsetHeight, html.clientHeight, html.scrollHeight, html.offsetHeight))
1668 })
1669 }
1670
1671 /**
1672 * {{> scrollTo }}

Callers

nothing calls this directly

Calls 2

executeScriptMethod · 0.95
scrollToMethod · 0.45

Tested by

no test coverage detected