How to scroll for browser
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
How to scroll for browser
Hi,
I am using ranorex version 8.3.1, chrome version 79.0.3945.117 , window 10 64bit
I use action " mouse wheel " but it don't work.
In selenium use javascript to scroll, can ranorex use it? If yes, please show me the sample code
Any idea as what could be the issue and how to resolve it?
Thanks
I am using ranorex version 8.3.1, chrome version 79.0.3945.117 , window 10 64bit
I use action " mouse wheel " but it don't work.
In selenium use javascript to scroll, can ranorex use it? If yes, please show me the sample code
Any idea as what could be the issue and how to resolve it?
Thanks
Re: How to scroll for browser
Hi,
Could you please add a bit more details about what exactly is not working (error message, entire report, snapshot of problematic element,...) and how exactly you implemented the mouse wheel action?
Sadly, Ranorex 8.3.1 is way too old and no longer supported. On the other hand, mouse wheel action should work even in this old version and I don't remember any specific problem with mouse wheel in 8.3.1. So, my guess is, that it's either your implementation of the mouse wheel action or the element you are trying to scroll does not support mouse wheel action?
Also, Java Script action could be invoked by using below script:
Could you please add a bit more details about what exactly is not working (error message, entire report, snapshot of problematic element,...) and how exactly you implemented the mouse wheel action?
Sadly, Ranorex 8.3.1 is way too old and no longer supported. On the other hand, mouse wheel action should work even in this old version and I don't remember any specific problem with mouse wheel in 8.3.1. So, my guess is, that it's either your implementation of the mouse wheel action or the element you are trying to scroll does not support mouse wheel action?
Also, Java Script action could be invoked by using below script:
Code: Select all
webDocument.ExecuteScript("java.script.code.you.want.to.use;");
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
I wrote a method as image attach
But it isn't display in list library of action "user code"
But it isn't display in list library of action "user code"
- Attachments
-
- Capture.PNG (5.51 KiB) Viewed 522 times
Re: How to scroll for browser
Hi,
I'm not quite sure if user code methods supports methods with WebDocument as parameter? Have you tried it without this parameter?
I'm not quite sure if user code methods supports methods with WebDocument as parameter? Have you tried it without this parameter?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
i tried it without this parameter, but it don't work 

- Attachments
-
- Capture.PNG (7.69 KiB) Viewed 501 times
Re: How to scroll for browser
Hi,
Does not work what exactly? The method is still not visible in the list of available methods or it does not scroll?
I've just tried the code you posted with DOM element of this forum (in FF, via Spy and ExecuteScript) and it happily scrolled the page to bottom. So if it does not scroll your page, the problem is either with the page (does not support scroll) or the browser you are using? Have you tried KeyShortcut action and "End" shortcut? Another possibility could be, that there is a bug in 8.3.1, related to ExecuteScript. But since 8.3.1 is no longer supported, you will have to try it with 9.2.1. There is no way around this.
BTW, I see you are using Chrome browser? Please examine the given web page in Chrome, using Ranorex Spy. Is the page available in Spy as DOM element? If not, then you have your answer. The problem is, that the Ranorex plugin is most probably not installed in Chrome or the existing plugin installation is broken. Try to uninstall/reinstall Chrome plugin and try it again. Oh and make sure Chrome is not running in background after closing Chrome window! It's a default Chrome behavior and must be changed in its Settings.
If the method is not available in the list of methods, then it's most probably not defined correctly? In this case, please post here your entire solution. And as above, try it with 9.2.1. Version 8.3.1 is a dead horse
Thanks.
Does not work what exactly? The method is still not visible in the list of available methods or it does not scroll?
I've just tried the code you posted with DOM element of this forum (in FF, via Spy and ExecuteScript) and it happily scrolled the page to bottom. So if it does not scroll your page, the problem is either with the page (does not support scroll) or the browser you are using? Have you tried KeyShortcut action and "End" shortcut? Another possibility could be, that there is a bug in 8.3.1, related to ExecuteScript. But since 8.3.1 is no longer supported, you will have to try it with 9.2.1. There is no way around this.
BTW, I see you are using Chrome browser? Please examine the given web page in Chrome, using Ranorex Spy. Is the page available in Spy as DOM element? If not, then you have your answer. The problem is, that the Ranorex plugin is most probably not installed in Chrome or the existing plugin installation is broken. Try to uninstall/reinstall Chrome plugin and try it again. Oh and make sure Chrome is not running in background after closing Chrome window! It's a default Chrome behavior and must be changed in its Settings.
If the method is not available in the list of methods, then it's most probably not defined correctly? In this case, please post here your entire solution. And as above, try it with 9.2.1. Version 8.3.1 is a dead horse

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
Hi,
I tried my code on version 9.2.0 but it sill do not scroll the page to bottom.
My page has support scroll
I had disable "Continue running background apps when Google Chrome is closed" in setting of chrome
Please help me
Thanks you verry much
I tried my code on version 9.2.0 but it sill do not scroll the page to bottom.
My page has support scroll
I had disable "Continue running background apps when Google Chrome is closed" in setting of chrome
Please help me
Thanks you verry much
Re: How to scroll for browser
Hi,
Have you examined the page with Spy, as I suggested in my previous post? Is the page visible as DOM element?
Also, have you tried to run the script via Spy? Try it both with your page and for example Ranorex page, to see if the script is working. I tried it with Ranorex page and it works OK for me (with Chrome).
BTW, a most recent version of Ranorex is 9.2.1. Although I don't think that 9.2.0 is causing your issue, it's definitely good idea to use the most recent version.
Have you examined the page with Spy, as I suggested in my previous post? Is the page visible as DOM element?
Also, have you tried to run the script via Spy? Try it both with your page and for example Ranorex page, to see if the script is working. I tried it with Ranorex page and it works OK for me (with Chrome).
BTW, a most recent version of Ranorex is 9.2.1. Although I don't think that 9.2.0 is causing your issue, it's definitely good idea to use the most recent version.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
Hi,
My page is visible as DOM element in Spy
I tried run script with Ranorex Forum and it worked but My page don't work
I run on version 9.2.1
My page is visible as DOM element in Spy
I tried run script with Ranorex Forum and it worked but My page don't work
I run on version 9.2.1
Re: How to scroll for browser
Hi,
So, if Ranorex page works and your don't, then I'm afraid, your page (its implementation) is a most probable cause of the problem?
BTW, have you tried to use Shortcut Key action (with key 'End'), as I suggested in previous post?
So, if Ranorex page works and your don't, then I'm afraid, your page (its implementation) is a most probable cause of the problem?
BTW, have you tried to use Shortcut Key action (with key 'End'), as I suggested in previous post?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
Hi,
I tried use Shortcut Key action (with key 'End') as your suggest but I need click a any point of screen then it work
However my page display list data , so when I select a any point on page,a any data will be selected, impact my data test
Any idea as what could be the issue and how to resolve it?
Thanks
I tried use Shortcut Key action (with key 'End') as your suggest but I need click a any point of screen then it work
However my page display list data , so when I select a any point on page,a any data will be selected, impact my data test
Any idea as what could be the issue and how to resolve it?
Thanks
Re: How to scroll for browser
Hi,
Send the End shortcut to browser's main form, instead of sending it to DOM element. Simply create a new repo element, with xpath like this:
/form[@processname='chrome'] and then use this repo element in KeySequence action. Hope this helps?
Send the End shortcut to browser's main form, instead of sending it to DOM element. Simply create a new repo element, with xpath like this:
/form[@processname='chrome'] and then use this repo element in KeySequence action. Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
Thanks for your support, I resolved issue
Re: How to scroll for browser
Hi,
You are welcome. Could you please share your solution? Thanks
You are welcome. Could you please share your solution? Thanks

Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
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
-
- Posts: 18
- Joined: Fri Dec 27, 2019 12:16 pm
Re: How to scroll for browser
I double click a any position of screen, before use action Shortcut Key action (with key 'End'), it work good and not impact any data is displayed on screen 
