Page 1 of 1

XPath changes

Posted: Wed Feb 20, 2013 11:24 am
by UgaAga
Hi,
sadly i can't reproduce this issue well enough, but sometimes my ranorex tests are stopping to work. This is because of a change in the xpath which occurs suddenly after running a ranorex test. When ranorex gets in touch with the form elements, "something" is happening. Are you already aware of this issue?

Bye

Re: XPath changes

Posted: Wed Feb 20, 2013 4:10 pm
by Ciege
Can you post an example of two XPaths that have changed (both for the same element)? Off the cuff, it sounds like maybe you are using the auto generated ID instead of a uniquely identifiable attribute.

Re: XPath changes

Posted: Wed Feb 27, 2013 5:04 pm
by UgaAga
Hi Ciege,
sorry for my late reply. My question was asked unclear. The xpath doesn't really change. If i look at my elements in the repository, then i can highlight them. But if i have for example three buttons in a test, then the first button is pressed, but the second button will not be found. But i can press the second button in a new test and the third will not be found...

Bye

Re: XPath changes

Posted: Wed Feb 27, 2013 5:08 pm
by Ciege
What type of AUT is it?

Could it be that when you press a button (say button one) the page changes, therefore the xpath to the other buttons are no longer valid?

I would check the path to the buttons before and after a press of one of the other buttons and make sue that the path has not changed.

Also, make sure that this is not a timing issue, like the page has not refreshed by the time you are looking for the next button.

Without seeing your AUT, code, error messages or a RanorexSpy snapshot it will be hard to diagnose with the brief information you have provided.

Re: XPath changes

Posted: Wed Feb 27, 2013 6:00 pm
by UgaAga
Hi,
thanks for your reply. I will check your suggestions. Meantime i was able to encircle the problem. It appears when another application is loaded into my original app. The new application is a child process and embedded into the parent or shown as child dialog. And the buttons are part of the child process. So the related process of the buttons changes, but i always use the buttons in the content of the parent process.

Bye

Re: XPath changes

Posted: Wed Feb 27, 2013 6:02 pm
by UgaAga
Ok the path doesn't change and it isn't a timing problem.

Re: XPath changes

Posted: Wed Feb 27, 2013 6:23 pm
by Ciege
Well, if you can't figure it out, and don't want to publicly share your code and RanorexSpy snapshot I think this is the proper place for the Support Team to step in and help you figure it out.

Re: XPath changes

Posted: Fri Mar 01, 2013 2:02 pm
by Support Team
Hi,

Could you send us the report file which includes the error messages?
Could you please try the following:
Click the first button and then search in code for the second button, but please use the full RxPath without the help of one of the repository items. Search for the second button after you clicked on the first one.

Are you using repository folders and did you enable the caching for the folders?
If yes, please set the Use Cache property to false.

Regards,
Markus

Re: XPath changes

Posted: Wed Mar 13, 2013 3:02 pm
by UgaAga
Hi Markus,
disabling the folder caching didn't work but the full rxPath did it.

Thanks a lot

Re: XPath changes

Posted: Thu Mar 14, 2013 12:41 pm
by Support Team
Hi,

You're welcome!
Are you sure you disabled it for all folders (especially for the rooted folder)?

Regards,
Markus

Re: XPath changes

Posted: Fri Mar 15, 2013 5:29 pm
by UgaAga
Hi,
Global Settings -> Repository Defaults -> Uncheck "Enable folder caching" is what i did. So i would appreciate it if there was another way to get this working, because using the full path isn't the best way to do it.

Bye

Re: XPath changes

Posted: Mon Mar 18, 2013 2:06 pm
by Support Team
Hi,

This setting will just change the default values for new repositories not for existing ones.
You have to open your repository and manually change the "Use Cache" property for each of your folders, there is no such property for "Simple Folders".

Regards,
Markus