Scroll Up in web ui katalon

Hi @tioagung92, Would something like this help you?
Copy all of the following to a new test case and then run it.

import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI

WebUI.openBrowser('')
WebUI.navigateToUrl('https://en.wikipedia.org/wiki/Main_Page')

//Scroll to bottom of page
WebUI.delay(3)
WebUI.executeJavaScript('window.scrollTo(0, document.body.scrollHeight);', null)

//Scroll to Top of page
WebUI.delay(3)
WebUI.executeJavaScript('window.scrollTo(0, -document.body.scrollHeight);', null)

//Scroll midway on page
WebUI.delay(3)
WebUI.executeJavaScript('window.scrollTo(0, 1200);', null)

//Scroll to top of page
WebUI.delay(3)
WebUI.executeJavaScript('window.scrollTo(0, 0);', null)

//Scroll to bottom of page
WebUI.delay(3)
WebUI.executeJavaScript('window.scrollTo(0, 999999);', null)
3 Likes