Page 1 of 1

Question re changes in a web application

Posted: Thu Apr 10, 2014 10:45 am
by Fergal
Ranorex Studio 5.0.1.17706

I have a suite of 50 tests for a web application. The application includes a menu of folders with items included in the folders. It looks something like the following;

Folder 1
  • Folder 1 - item 1
  • Folder 1 - item 2

Folder 2
  • Folder 2 - item 1
  • Folder 2 - item 2
  • Folder 2 - item 3
Most of my tests are run on Folder 2 and run successfully. However, when I add items to Folder 1 it pushes Folder 2 further down the web page and then the tests for Folder 2 fail. The tests that fail are tests such as to add an item to Folder 2 and they fail because Ranorex can't find the location to add the item. Is there any way for me to fix those tests, without re-recording them?

Thanks!

Re: Question re changes in a web application

Posted: Thu Apr 10, 2014 1:55 pm
by krstcs
Can you provide a snapshot of your application under test?

Can you provide a copy of a sample solution showing the issue?

My guess would be that it is an object identification issue. There may be something in the paths of the objects that is no longer valid when a new object is added, such as using an index, etc.

Re: Question re changes in a web application

Posted: Fri Apr 11, 2014 10:05 am
by Fergal
Thanks for your reply krstcs. The application has not been released yet. When my Ranorex tests are adding items to the application, it searches for buttons and menu items via location, but can no longer find those button or menu items, because their location on the screen has changed. Please see an example below, of a test step that is failing.

Image

Is it possible for me to change the location properties, so that the test looks for the item somewhere else, or even looks for it anywhere on the page?

Thanks!

Re: Question re changes in a web application

Posted: Mon Apr 14, 2014 3:09 pm
by Support Team
Hello Fergal,

Ranorex is searching for the element on the entire screen. The location you mentioned is the location of the click action in relation to the clicked element. Therefore it seems like your issue isn't related to the position of the element but to a wrong index or something similar. It's hard to analyze and resolve your issue without additional information. May I ask you to send a sample solution as well as the already mentioned Ranorex snapshot to [email protected].

Regards,
Robert

Re: Question re changes in a web application

Posted: Tue Apr 15, 2014 7:37 am
by mzperix
Hi Fergal,

Try to check the element's xpath in SPY. When you drag and drop, the hierarchy of the elements are changing. If your xpath contains this heirarchy, then after the first move the script will inevitably fail, since the xpath is not reflecting the cahnge.

A solution is usually to change the xpath so the element will always be found.

Could you show us the xpath of the element you showed us in your screenshot?

Best Regards,
Zoltán Major

Re: Question re changes in a web application

Posted: Wed Apr 16, 2014 12:09 pm
by Fergal
Thanks Zoltán, I need to learn more about xpath and Spy.

Thanks also Robert, I have sent an email to support.