Forum Discussion

rjamison's avatar
rjamison
Occasional Contributor
14 years ago

How do you move VScrollBar in IE9 or resize IE9

I have a web page that has a floating panel that covers the button object that my test must click.  I've used the FindChild()   (Thanks to Helen Kosova)  to locate the object, and since it puts it in the viewable screen, that should do it, however our floating panel always floats at the bottom of the page and covers the button I have to have the script click.



I've tried to find a way to scroll the page up 5-10% but TestComplete's Object Spy can't seem to identify the Vertical Scroll bar, so I'm not sure how to manage it.



I also thought about resizing the page by 5 or 10% less on height to see if FindChild() can move the found panel in a position as to allow the button to be clicked.



I am able to capture and show the height and width of the page, but can't seem to find a way to change the size.

 

Set page = iexplore.pageShowRainChainsCom


' This piece searches for the panel of the item we're looking for


Set panel = page.FindChild(Array("ObjectType", "ObjectIdentifier"), _


   Array("ImageButton", "rlMainATC_" & sku_item & "_AC_addToCartBtn"), 100)




Set myPic = Aliases.iexplore.pageShowRainChainsCom


msgbox("Height is: " & myPic.height & " Width is: " & myPic.Width)





Any assistance would be greatly appreciated.

  • Hi,


    To scroll up/down the page, you can use the following statement:




    page.MouseWheel(-2);   


    To change the size of web page elements, you can use the following code:




    page.MouseWheel(-3, skCtrl);