Hello Team,
Kindly assist me how will tool capture scroll option. because recorded scenario gets stuck on scroll option
Thanks
Rammurti pal
Hello Team,
Kindly assist me how will tool capture scroll option. because recorded scenario gets stuck on scroll option
Thanks
Rammurti pal
âScrollâ behavior canât be captured because actually it does not interact with current web page application but browser instead.
You can manually add âScrollâ action after recorded test case is generated.
hi
am using web applications but still unable to scroll please assist how to add steps for scroll page
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser(ââ)
WebUI.navigateToUrl(âhttps://global.crs.org/_auth/Logon.aspx?ru=aHR0cHM6Ly9nbG9iYWwuY3JzLm9yZy8=â)
WebUI.setText(findTestObject(âPage_Logon (1)/input_LogonWidget1SSO_2â), ârpalâ)
WebUI.setText(findTestObject(âPage_Logon (1)/input_LogonWidget1SSO_3â), âPassword@2â)
WebUI.click(findTestObject(âPage_Logon (1)/input_LogonWidget1ssoLoginButtâ))
WebUI.click(findTestObject(âPage_Global Home (1)/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Global Home (1)/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Global Home (1)/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Global Home (1)/span_CRS Worldwideâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/a_CRS Regionâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/a_Nigerâ))
WebUI.click(findTestObject(âPage_Niger/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Niger/span_Pal Rammurtiâ))
WebUI.click(findTestObject(âPage_Niger/span_Sign Outâ))
WebUI.closeBrowser()
Your current test steps donât have any âScroll Toâ step, so please add it first.
Hi,
Unable to move ahead after inserting the âScroll to elementâ.
getting some error see the attached screenshot
import static com.kms.katalon.core.checkpoint.CheckpointFactory.findCheckpoint
import static com.kms.katalon.core.testcase.TestCaseFactory.findTestCase
import static com.kms.katalon.core.testdata.TestDataFactory.findTestData
import static com.kms.katalon.core.testobject.ObjectRepository.findTestObject
import com.kms.katalon.core.checkpoint.Checkpoint as Checkpoint
import com.kms.katalon.core.checkpoint.CheckpointFactory as CheckpointFactory
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as MobileBuiltInKeywords
import com.kms.katalon.core.mobile.keyword.MobileBuiltInKeywords as Mobile
import com.kms.katalon.core.model.FailureHandling as FailureHandling
import com.kms.katalon.core.testcase.TestCase as TestCase
import com.kms.katalon.core.testcase.TestCaseFactory as TestCaseFactory
import com.kms.katalon.core.testdata.TestData as TestData
import com.kms.katalon.core.testdata.TestDataFactory as TestDataFactory
import com.kms.katalon.core.testobject.ObjectRepository as ObjectRepository
import com.kms.katalon.core.testobject.TestObject as TestObject
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WSBuiltInKeywords
import com.kms.katalon.core.webservice.keyword.WSBuiltInKeywords as WS
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUiBuiltInKeywords
import com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords as WebUI
import internal.GlobalVariable as GlobalVariable
import org.openqa.selenium.Keys as Keys
WebUI.openBrowser(ââ)
WebUI.navigateToUrl(âhttps://global.crs.org/_auth/Logon.aspx?ru=aHR0cHM6Ly9nbG9iYWwuY3JzLm9yZy8=â)
WebUI.setText(findTestObject(âPage_Logon/input_LogonWidget1SSO_2â), ârpalâ)
WebUI.setText(findTestObject(âPage_Logon/input_LogonWidget1SSO_3â), âPassword@2â)
WebUI.click(findTestObject(âPage_Logon/input_LogonWidget1ssoLoginButtâ))
WebUI.scrollToElement(findTestObject(âPage_Global Home/div_s4-workspaceâ), 300)
WebUI.click(findTestObject(âPage_Global Home/span_CRS Worldwideâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/div_s4-workspaceâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/a_CRS Regionâ))
WebUI.click(findTestObject(âPage_Worldwide Site Directory/a_Beninâ))
WebUI.click(findTestObject(âPage_Benin/span_Pal Rammurtiâ))
WebUI.click(findTestObject(âPage_Benin/span_zz8_ID_Logoutâ))
WebUI.closeBrowser()

@rpal: I donât see the error screenshot. Have you still faced with this issue?
Hi ,
Can any one please tell me whats the script for scroll a web page, by using katalon studio
I often using
WebUI.scrollToPosition(0, 0)orWebUI.scrollToElement(findTestObject('btn_refreshTable'), 15)
hi,
When I use scrollToElement, it does not scroll and execution ends abruptly that web element is not found. Can anyone please help?
@6432-tamanna
Try providing some wait before scroll. Just provide Thread.sleep(5000) before scroll step for troubleshooting and check if it is working. If yes, you can use better wait conditions accordingly.
Amit Kumar said:
@6432-tamanna
Try providing some wait before scroll. Just provide Thread.sleep(5000) before scroll step for troubleshooting and check if it is working. If yes, you can use better wait conditions accordingly.
It worked for some pages⌠thanks!
Hi all,
Has anyone ever been in a situation like this:
when I use âscroll to a positionâ, page will slides, but it doesnât exactly slide to that position, so I canât click the button on that page.
I have been troubled by this problem for a long time, anyone can help? thanks.
I am having the same issue. It is scrolling but not to the expected object. so it is not able clicking.
Can anyone has any advise?
I kept the wait before scroll too.
@kmeenakshi Where do you âstopâ your scroll? Do you scroll to the specific element or do you scroll to an element above the specific element? Also, is the specific element at the bottom of the web page?
Thanks for the reply.
I scroll to the specific element but it is just passing that element. I need to click on the Launch button which has the unique xpath , just in the place of the red box.
below 3 lines are the specific code I am using for this.
WebUI.delay(10)
WebUI.scrollToElement(findTestObject(âObject Repository/Page_myWorld - My Account/button_Launchâ), 30, FailureHandling.STOP_ON_FAILURE)
WebUI.click(findTestObject(âObject Repository/Page_myWorld - My Account/button_Launchâ))
@kmeenakshi What I was going to suggest is to âstopâ the scroll to an element that is above the specific element (by one or two positions) so that the specific element is in the main viewing area. I have been doing this almost since starting with KS.
Thank you so much, it worked but clicking on the above element means, above elements are not guaranteed to be exist in future runs. so is there any other alternate for this?