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
XPath changes
Re: XPath changes
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.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: XPath changes
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
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
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.
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.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
Re: XPath changes
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
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
Last edited by UgaAga on Wed Feb 27, 2013 6:13 pm, edited 2 times in total.
Re: XPath changes
Ok the path doesn't change and it isn't a timing problem.
Re: XPath changes
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.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!
Ciege...
Ciege...
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: XPath changes
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
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
Hi Markus,
disabling the folder caching didn't work but the full rxPath did it.
Thanks a lot
disabling the folder caching didn't work but the full rxPath did it.
Thanks a lot
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: XPath changes
Hi,
You're welcome!
Are you sure you disabled it for all folders (especially for the rooted folder)?
Regards,
Markus
You're welcome!
Are you sure you disabled it for all folders (especially for the rooted folder)?
Regards,
Markus
Re: XPath changes
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
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
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: XPath changes
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
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