According to the Ranorex API documentation I can use the Mouse.ScrollWheel method to simulate scrolling of the the mouse wheel. However, after I set the focus on my application the following code does not scroll the mouse wheel in either firection. Any ideas? Thanks
Mouse.ScrollWheel(-120);
Report.Info("Mouse Scroll Down");
Mouse.ScrollWheel(120);
Report.Info("Mouse Scroll Up");
Problem with Mouse.ScrollWheel
Re: Problem with Mouse.ScrollWheel
I've not ever tried it myself, however... did you try a mouse.click on the object before using the scroll?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem with Mouse.ScrollWheel
Hi,
Would it be possible to send us a Ranorex Snapshot of the whole application to check what you are trying to do?
Thanks in advance.
Regards,
Peter
Ranorex Team
Would it be possible to send us a Ranorex Snapshot of the whole application to check what you are trying to do?
Thanks in advance.
Regards,
Peter
Ranorex Team
Re: Problem with Mouse.ScrollWheel
I'm trying a similar thing and can't seem to get Mouse.ScrollWheel(-500); to do anything either.
I'm using this as I can't seem to get the scrollbar element via the Spytool.
This is on chrome.
Any thoughts?
I'm using this as I can't seem to get the scrollbar element via the Spytool.
This is on chrome.
Any thoughts?
Re: Problem with Mouse.ScrollWheel
I have the same issue: unable to scroll mouse on chrome in both manual and user code modes.
During these attempts chrome is often displaying message: Ranorex Extension become unresponsive. Would you like to continue waiting? - and the same appears each time if I agree to wait.
Latest Chrome version.
During these attempts chrome is often displaying message: Ranorex Extension become unresponsive. Would you like to continue waiting? - and the same appears each time if I agree to wait.
Latest Chrome version.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem with Mouse.ScrollWheel
Hello,
Please note that the application needs to have the focus by using a mouse click e.g.
Could you please try to create a new recording, click on our forum webpage and perform scroll actions?
Do you see this behavior in other browsers as well?
Which Ranorex version do you use?
Could you please send us a Ranorex Snapshot?
This would help us to analyze your issue.
Please take a look at Creating Ranorex Snapshot Files in our User Guide.
Thank you in advance.
Regards,
Markus (T)
Please note that the application needs to have the focus by using a mouse click e.g.
Could you please try to create a new recording, click on our forum webpage and perform scroll actions?
Do you see this behavior in other browsers as well?
Which Ranorex version do you use?
Could you please send us a Ranorex Snapshot?
This would help us to analyze your issue.
Please take a look at Creating Ranorex Snapshot Files in our User Guide.
Thank you in advance.
Regards,
Markus (T)
Re: Problem with Mouse.ScrollWheel
I can't speak for sergii but I'm not currently in a position to send a snapshot.
I have essentially 2 lines of C# code...the first clicks on an element on the screen...the next attempts to scroll down....that's it....but stepping through the code it just sails straight through with no scrolling.
I'm using Ranorex 4.0.4 and Chrome 27.
I have essentially 2 lines of C# code...the first clicks on an element on the screen...the next attempts to scroll down....that's it....but stepping through the code it just sails straight through with no scrolling.
I'm using Ranorex 4.0.4 and Chrome 27.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem with Mouse.ScrollWheel
Hello,
The method Mouse.ScrollWheel(int delta) specifies the amount of wheel movement. I suppose you have one method similar to the following
You could split this single action into several actions with a smaller value (e.g. 50) to scroll slowly.
Would that be a possible solution for you?
Regards,
Markus (T)
The method Mouse.ScrollWheel(int delta) specifies the amount of wheel movement. I suppose you have one method similar to the following
Mouse.ScrollWheel(-500);Since the high delta (500) is used in the code, the scroll operation is quite fast.
You could split this single action into several actions with a smaller value (e.g. 50) to scroll slowly.
Would that be a possible solution for you?
Regards,
Markus (T)
Re: Problem with Mouse.ScrollWheel
Hi,
It's very weird....the scrollbar just doesn't move at all. The view of the webpage I'm testing doesn't change.
It's essentially as if the Mouse.ScrollWheel(-500); line isn't there at all ...........which given this is a fairly fundamental operation I find very surprising.
There must be something silly going on here. I'll continue to play with this using smaller values.
It's very weird....the scrollbar just doesn't move at all. The view of the webpage I'm testing doesn't change.
It's essentially as if the Mouse.ScrollWheel(-500); line isn't there at all ...........which given this is a fairly fundamental operation I find very surprising.
There must be something silly going on here. I'll continue to play with this using smaller values.
Re: Problem with Mouse.ScrollWheel
Right I've sussed it - I've been a bit dozy and was using .PerformClick() rather than .Click() before scrolling.
using .Click() it now works expected.
:-/
using .Click() it now works expected.
:-/
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Problem with Mouse.ScrollWheel
Hello,
Thanks for the good news
Regards,
Markus (T)
Thanks for the good news

Regards,
Markus (T)