How to click on scroll bar
Home › Forums › Ask Expert › How to click on scroll bar
- This topic has 3 replies, 2 voices, and was last updated 2 years, 7 months ago by Sasha ZAP.
-
AuthorPosts
-
October 14, 2021 at 12:40 am #32858Adil KamalParticipant
I have menu on left and by clicking Menu item, there is scroll bar appearing which i have to scroll. I have created new Object of that scroll bar but when i use click event of that object it clicks on the right hand side main scroll bar. How can i do scrolling?
Attachments:October 14, 2021 at 1:31 am #32859Sasha ZAPModeratorHello Adil,
To do scrolling it is best to use the “ScrollTo” method – Please check the following explanation of this method at:
https://www.zaptest.com/user-zone/product-training/zaptest/methods/method-scrolltoAlso you can use the “ScrollWheel” method which enables you to scroll the mouse’s wheel for a specific scroll bar, for example:
Application(“ABC”).View(“ABC”).Object(“Object with caption”).Object(“ScrollBar”).Click
Application(“ABC”).ScrollWheel x, y, z, k, TruePlease check the following explanation about the “ScrollWheel” method at:
https://www.zaptest.com/user-zone/product-training/zaptest/methods/method-scrollwheelAlso you can find most of ZAPTEST subjects and methods at the How-To page at:
https://www.zaptest.com/user-zone/product-trainingHope this helps.
Thanks,
ZAPTEST TeamOctober 14, 2021 at 5:34 pm #32860Adil KamalParticipantHi Karma,
Thanks for getting back to me, but I am having problem with the click. I have created the Object and using the Click method but it doesn’t recognize this scroll bar where I am trying to click, it clicks on the main scroll bar on right hand side. I need to know how do i capture this object scroll bar when creating object.
Here is the code:
Application(“Wealth360”).View(“ScrollView”).Object(“ObjScrollBar”).ClickOctober 14, 2021 at 6:42 pm #32861Sasha ZAPModeratorHello Adil,
Because the Scroll Bar is an image type object (Object which does not have any caption in it) you must use different techniques so ZAPTEST will be able to locate the object as expected:
You need to set a Relative Object and probably to use the Area and Image type objects – Please check this video:Hope this helps,
Thanks,
ZAPTEST Team -
AuthorPosts
- You must be logged in to reply to this topic.