Verify that autoscrolling took affect to a specific field

Ask general questions here.
LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Verify that autoscrolling took affect to a specific field

Post by LPG » Fri Jan 27, 2012 2:11 am

Hi

I need to check the following functionality in a Windows .NET application:

The application window is long, you have to scroll down to see the lower part of the window.
If you miss some mandatory fields, a warning get displayed to the right of the page. If you click on the warning, it jumps to the field in question. The application does autoscrolling to take you to the field if it is in the lower part of the screen you cannot see.

I need to check the following with Ranorex:
1. Click on the warning (for a field that is in the lower section, so not currently visible)
2. Verify that the autoscrolling took place - that the field in question is now visible on the screen.
3. Verify that the field in question has the focus. (This part was easy, the HasFocus property worked fine).

It is Step 2 that I have trouble with. I checked the "visible" attribute, but this returns true for this field whether it is visible on the screen or not. This is probably because the whole window (long or not) are open (active) at the time, even though the user can't actually SEE the fields on the lower portion of the screen. The "visible" property seem more useful for drop down lists and such.

Is there a property or function I can use to determine if a field is actually in visible VIEW of the user? I basically need to verify that the autoscrolling took place.

Thank you

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

Re: Verify that autoscrolling took affect to a specific field

Post by Support Team » Fri Jan 27, 2012 10:17 am

Hi,

Would it be possible to post us two Ranorex Snapshots of your element?
One if it is visible and one if it isn't visible.

How to create a Ranorex Snapshot

Regards,
Peter
Ranorex Team

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Verify that autoscrolling took affect to a specific field

Post by LPG » Fri Jan 27, 2012 3:40 pm

I can't click on the object to take a snapshot without making the object visible. Let's take a web page for example. If you go to ranorex.com web page, you'll see half of the web page on your monitor. To see the lower half, you have to scroll down. To take a snapsnot of the objects at the bottom of the screen (for example, the "Schedule a Web Demo" button), you first have to scroll down to make that button visible before you can take a snapshot.

I'm not sure how I can take a snapshot of the object without scrolling down to make it visible first. Unless I take a snapshot of the whole form (which might include ALL the objects), but such a snapshot will be too large to send to you, or even upload to your server. I've tried doing that before, and it was too large.

I would probably need to upload the application to your server, that would probably be the easiest? If you can send me your server information, I'll go right ahead and do that. I would need to send a couple of Ranorex scripts to help set up the application to make it useful too.

Thanks

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

Re: Verify that autoscrolling took affect to a specific field

Post by Support Team » Mon Jan 30, 2012 9:39 am

Hi,

I've sent you the FTP information. Please upload your application and also the Ranorex Project to verify your issue.

Thank you in advance.

Regards,
Peter
Ranorex Team

LPG
Posts: 39
Joined: Mon Jul 25, 2011 6:12 pm

Re: Verify that autoscrolling took affect to a specific field

Post by LPG » Tue Feb 07, 2012 6:48 pm

I have sent the information, but the wrong question was answered in the feedback :)

I resent another explanation to your support email on Thursday, hopefully that will be clearer than the first explanation.

Thanks!

User avatar
artur_gadomski
Posts: 207
Joined: Mon Jul 19, 2010 6:55 am
Location: Copenhagen, Denmark
Contact:

Re: Verify that autoscrolling took affect to a specific field

Post by artur_gadomski » Fri Feb 24, 2012 2:25 pm

Have you tried looking at ScreenLocation or ScreenRectangle?
When I was trying it out in a web browser the element that was off screen had Visible attribute set to false.

You can spy on your chosen element while it's on screen. Scroll down and refresh Spy view to see how different values for this element change.