Hi, Im testing a webpage. It has more elements and needs scroll around the page to choose the elements. So i need to scroll up and down multiple times
Im using scrollToPosition(999999,999999) to scroll to the bottom and scrollToPosition(0,0) to scroll up
This perfectly works fine for the first time
When im using the same script again to scroll down/up, it s not working.
It retains in the middle of the page and it fails.
My product webpage will be like in the attachment
It will have set of 30 elements on left side and user can choose based on the their wish .the selected ones will display on right one by one.
At the first sight, all the 30 elements couldnt be visible. just u can see 25 elements. we need to scroll down to choose the last 5 elements.
Also, after the user choosen nearly 3 elements, we need to scroll up and down to choose all the selected elements
Yea like @Timo_Kuisma said, you shouldnt need to scroll for anything, It may not be visible to the current screen but its still technically present so it will just scroll for you.
so Focus() followed by click() will autoscroll the page by finding elements by itself?
as you mentioned, its not visible in current screen but its there technically. How can i make it to be click on those elements?
I tried with above focus() followed by click().
Getting below error:
com.kms.katalon.core.exception.StepFailedException: Unable to click on object ‘Object Repository/Page_Create Form - datahub/a_addBulk Answers’
empTestCase1559460976239.run(TempTestCase1559460976239.groovy:154)
Caused by: org.openqa.selenium.ElementClickInterceptedException: element click intercepted: Element … is not clickable at point (108, 690). Other element would receive the click:
So this is what is causing the error - “Other element would receive the click:”
Have a read of this document, i suggest trying all the solutions that is provides for you. Using JS will solve all your problems so i highly recommend getting used to it. It will help you in the future