How to... Scrool the screen?

Best practices, code snippets for common functionality, examples, and guidelines.
User avatar
Posts: 13
Joined: Fri Dec 13, 2019 5:31 pm

How to... Scrool the screen?

Post by Vanderson » Thu Feb 13, 2020 12:41 pm

Hi Guys!
Good Morning/evening/night to all.

I have one beginner question: In my AUT I have one routine like setup: Validation, next, validation, next, fill one field, next...etc. In one specific screen, I need to choose a time zone (in one screen with several options) and I choose Mouse wheel action (Orientation Vertical, Delta -1300) to scroll down the screen to find the correct time zone. It's ok but if the mouse pointer isn't over the AUT screen, the mouse wheel function don't works and the test fail.

My question is:
1 - How to put the mouse over the AUT screen to Mouse wheel function work's correct?
2 - Another intelligent solution to perform this action?

My system:
OS: Windows 10 [Ver 10.0.17763.973]
Ranorex version: 9.2.1+git37787e16
Hardware: HP Zbook with 3 screens

Thanks in advance for any help.

Vanderson Araujo
Porto - Portugal
You do not have the required permissions to view the files attached to this post.
Best Regards,

Vanderson Araujo

User avatar
Ranorex Guru
Ranorex Guru
Posts: 7464
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to... Scrool the screen?

Post by odklizec » Thu Feb 13, 2020 12:57 pm


Could you please post complete xpath to the element you are looking for? The snapshot you posted shows no screenshots and entire DOM appears to be invisible.

Generally speaking, I would use EnsureVisible action, instead of scrolling screen, which may be unreliable. EnsureVisible should bring the "out of screen" element to visible area of screen.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration