How to bring element to visible to user

Ask general questions here.
kiran
Posts: 5
Joined: Tue Jun 23, 2009 6:53 am

How to bring element to visible to user

Post by kiran » Thu Jul 09, 2009 9:58 am

I have a web document screen which has elements and scroll bar along with it.
Please find the images that i have uploaded.
Image
or
http://img25.imageshack.us/gal.php?g=element1m.jpg

First image has Scan Options label which has checked boxes which i need to select
Second image i scrolled down to get that checked boxes with mouse wheel move or scroll bar down

How can i make this as automated so that user scrolls down until get that element and then check the element.

When i try to see with Ensure Visible its true.

Can you let me know how??

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: How to bring element to visible to user

Post by Support Team » Thu Jul 09, 2009 2:59 pm

Hi kiran,
if EnsureVisible doesn't work, you have to scroll down by using the Keyboard class until the checkbox gets visible. To scroll down using the keyboard use the following code:
Keyboard.Press(System.Windows.Forms.Keys.Down);
// or to scroll down a page
Keyboard.Press(System.Windows.Forms.Keys.PageDown);
Regards,
Christian
Ranorex Support Team