tmahender12
8 years agoFrequent Contributor
Scroll a Panel
how to scroll atached panel using Name mapping. can u please help
Simply call object.scrollIntoView(true) right before you interact with whatever object is.
how to scroll atached panel using Name mapping. can u please help
Simply call object.scrollIntoView(true) right before you interact with whatever object is.
FYI TestComplete scrolls web pages automatically before interacting with objects that are out of view. So, say, if you have obj.Click() and obj is currently out of view, TestComplete will automatically bring it into view and there's no need to scroll the page explicitly.
I would contradict HKosova rarely... but this is one case. :)
If it's the whole page, TestComplete does things very well. However, if it's a scroll bar in a panel on the page where, you need to make an explicit call to make sure that the sub-panel scrolls since the whole page will not.
First of all, you have capture the navigation pane into your namemapping.
For ex:
you have mapped the navigation pane as ObjectNav then you can use below code scroll up and scroll down
ObjectNav.Position = ObjectNav.Max
ObjectNav.Position = ObjectNav.Min
ObjectNav.Position = ObjectNav.Position + 100
You probably don't need to scroll the panel necessarily. If you want to access a particular object that is currently scrolled out of view, call "scrollIntoView" on that object and that should bring it into view for being able to operate.