Odd Scrolling issue on playback

Ranorex Spy, Recorder, and Studio.
AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Odd Scrolling issue on playback

Post by AccidentReport » Tue Dec 04, 2012 2:38 pm

Hi.

I am trying to record a basic test to login to my web application using the record function. I have created the recording and it has recorded all my steps perfectly. When I look at the script I can see everything and the objects each step is looking for to click on and such. Fine. When I play the recording back though I get an odd issue. When it selects the text box for the username the page seems to scroll down to the bottom. The username and then password are entered correctly into the text boxes but when it tried to click the login button it fails. The script thinks it has but it has only clicked where the login button WAS when the page first loaded and not when it is not the page has scrolled down.

Now, I have no step or code that scrolls down and can't see anything that should cause this but it does. That's problem one. Problem 2 is the fact that I thougt Ranorex would find the object at the time it tries to click on it but it seems like it doesn't.

Does anyone have any ideas or suggestions as to what the problem here is and how to solve it? I am pleased to provide further details but cannot give too much due to the nature of the application and project.

Thanks

Chris :?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Odd Scrolling issue on playback

Post by Support Team » Wed Dec 05, 2012 2:02 pm

Hello,

It could be possible that the path to the object has changed.
Could you please post a Snapshot of your application in order to analyze this issue?
Take a look at section Creating Ranorex Snapshot Files from our User Guide.

Ranorex use RanoreXPath of the object to find it during runtime. If there are changes in RanoreXPath object identification could fail. If you are using e.g. Internet Explorer to record your steps and then using Firefox to play them. This could result in a change in the RanoreXPath.
The solution in this case would be to adjust the RanoreXPath in order to find objects in both browsers.
Please take a look at section RanoreXPath in our User Guide for more information.

Regards,
Markus (T)
.
Image

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: Odd Scrolling issue on playback

Post by AccidentReport » Thu Dec 06, 2012 1:59 pm

Well I managed to solve the identification issue. I needed to edit the object in the repository and add some more attribvutes with which it could identify. Why exactly it couldn't find it straight after I recordered it without changing anything I don't know.

The mystery of the scrolling continues!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11710
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Odd Scrolling issue on playback

Post by Support Team » Thu Dec 06, 2012 5:29 pm

Hello,

Could you please explain how you select your textbox 'username' in your recording?

Ranorex uses specific attributes to identify elements in your application. These attributes are defined in 'Weight Rules' and influcence the RanoreXPath of elements. If values of these attributes change after restart of your application the new RanoreXPath of elements will be changed as well.
If elements have the same attribute (e.g. ID) with the same value Ranorex will execute the specific action on the first found element. This could be a possible cause of your issue.

Could you please set 'Use Ensure Visible' to false in the properties tab of your repository item?
This setting could be responsible for scrolling your page down.

In order to analyze this issue we would need a Snapshot of your application?

Regards,
Markus (T)
.
Image

AccidentReport
Posts: 76
Joined: Tue Dec 04, 2012 2:30 pm

Re: Odd Scrolling issue on playback

Post by AccidentReport » Wed Dec 12, 2012 12:53 pm

Thanks for the 'Use Ensure Visible' idea. I changed it to false in the properties tab as you suggested and now the page doesn't scroll. The scrolling didn't really cause an issue to the functionality of the test but it did bug me and now it's fine. Thanks!