I am using Ranorex 9 for my web application automation. It is a responsive web app developed using React. Everything is working fine when it is executed manually or even with Selenium, But when I execute my Ranorex script, the web page along with all its elements is getting moved up within the browser. Not sure why it is happening only with Ranorex execution.
Can someone please help me to understand why it is happening? Curious to know the execution process of Ranorex, like any java script is injected during execution or something else.
Thanks,
Suresh.
Web page layout is moving up when Ranorex script executed
-
- Posts: 6
- Joined: Tue Apr 23, 2019 5:59 am
Re: Web page layout is moving up when Ranorex script executed
Hi,
Unfortunately, without seeing your web page, or, at very lest, Ranorex snapshot (NOT screenshot) of the page, and xpath of the element at which action the page goes 'up', it's impossible to tell what's wrong. But my best bet is that the behavior you are describing is caused by Ensure Visible event, which is by default enabled for each recorded repo element. If you know the element, which is causing the problem, you can disable its Use Ensure Visible property in repository:
Unfortunately, without seeing your web page, or, at very lest, Ranorex snapshot (NOT screenshot) of the page, and xpath of the element at which action the page goes 'up', it's impossible to tell what's wrong. But my best bet is that the behavior you are describing is caused by Ensure Visible event, which is by default enabled for each recorded repo element. If you know the element, which is causing the problem, you can disable its Use Ensure Visible property in repository:
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: 6
- Joined: Tue Apr 23, 2019 5:59 am
Re: Web page layout is moving up when Ranorex script executed
Hi odklizec,
Thanks for the response. Yes your solution worked for me.
Also I found another solution to this problem, I have used PerformClick () instead Click() and it worked perfect without disturbing the layout.
So the learning here is better to use PerformClick() or make EnsureVisible to False for Responsive containers/designs.
Thanks for the response. Yes your solution worked for me.
Also I found another solution to this problem, I have used PerformClick () instead Click() and it worked perfect without disturbing the layout.
So the learning here is better to use PerformClick() or make EnsureVisible to False for Responsive containers/designs.
Re: Web page layout is moving up when Ranorex script executed
Hi,
By careful about using PerformClick action! This action does not trigger mouse events, which is especially a problem for web-based apps. And generally speaking, PerformClick is not exactly user-like action. So use it with caution and only if you know for sure, it does not have any side effects
By careful about using PerformClick action! This action does not trigger mouse events, which is especially a problem for web-based apps. And generally speaking, PerformClick is not exactly user-like action. So use it with caution and only if you know for sure, it does not have any side effects

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: 6
- Joined: Tue Apr 23, 2019 5:59 am
Re: Web page layout is moving up when Ranorex script executed
Okay, got you.
Also, Is there any global setting available for all elements of all repositories to make Ensure Visible to False. I got many elements and it would be difficult to do that for each individual element.
Thanks,
Suresh.
Also, Is there any global setting available for all elements of all repositories to make Ensure Visible to False. I got many elements and it would be difficult to do that for each individual element.
Thanks,
Suresh.
Re: Web page layout is moving up when Ranorex script executed
Hi,
Yes, there is such option in Ranorex Settings. You just have to make sure that all repository folders has Use cache parameter set to Default (default setting) and not explicitly set True of False. Default means, that Ranorex uses global configuration from Settings. So if unchecked in Settings, all repo folders will have Use Cache disabled.
Yes, there is such option in Ranorex Settings. You just have to make sure that all repository folders has Use cache parameter set to Default (default setting) and not explicitly set True of False. Default means, that Ranorex uses global configuration from Settings. So if unchecked in Settings, all repo folders will have Use Cache disabled.
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: 6
- Joined: Tue Apr 23, 2019 5:59 am
Re: Web page layout is moving up when Ranorex script executed
Okay, Thank you.