Page 1 of 1

Edit Repo-Paths

Posted: Wed Dec 14, 2011 9:56 am
by anja
Hi Ranorex-Team,

we've got a very special problem and hope you can help us.

Following situation:
There exist different frame applications. The frame-applications are used to display information from devices. The information of the devices are saved in so called DTMs. The DTMs have their own GUI.
The frame has to implement a "container", where the DTMs can be displayed.
The content within the "container" is in every frame the same, but the path to the container is different within each frame.

What we want to do:
We want to create a repository for the DTMs, which should be independend from the frame.
The path to the "container" for the DTMs should be possible to set in dependency of the frame.

Is it possible to influence a basepath from within code or is there another possibility how to implement this situation with Ranorex.

Thank you very much
Anja

Re: Edit Repo-Paths

Posted: Wed Dec 14, 2011 1:53 pm
by Support Team
Hi

I hope that I understood your problem correctly - try the following solution.

Create a Rooted Folder which has the path of your frame. Below the Rooted Folder, which is your base, add all your elements below this folder.
Make the path of your rooted folder variable. Do this with making the item variable.
Bind this variable to some data from a data source.

If I misunderstood your problem, please provide more details.

Regards,
Martin
Ranorex Support Team

Re: Edit Repo-Paths

Posted: Fri Dec 16, 2011 1:19 pm
by anja
Hi Ranorex-Team,

I think I have to explain it a lettle bit more in detail....

I already tried what you proposed to do but our paths do not only differ in the properties but even in structure.
I will try to give you an example. The following paths are the paths to the container. The decendants after these paths are equal:

1. Frame:

Code: Select all

/form[@controlname='MDIParent2']/element[@controltypename='MdiClient']/form/container/element[@controlname='_dtmControl']
2. Frame:

Code: Select all

/form[@name='Dtm Window']/element/element[@automationid='dtmHostingGuiControl']/tabpagelist/tabpage/element/container/element/container[@controlname='']
Like you can see the paths are very different.

Are there any possibilities to set a complete path?

Thank you very much.
Anja

Re: Edit Repo-Paths

Posted: Mon Dec 19, 2011 9:33 am
by Support Team
Hi Anja,

it is possible to define a common base path here - but due to the last elements are not the same and the difference in the depth of the paths and the only common base path for these two paths would be

Code: Select all

/form/element//YOURELEMENTS
Which means that within /form/element there are somewhere YOURELEMENTS.


If the depth would be the same for the two paths, it would be possible to write

Code: Select all

/form/element/*/*//YOURELEMENTS
Which means that in the third layer under /form/element/ there are YOURELEMENTS.


If the last element of the base path would be the same, it would be possible to write

Code: Select all

/form/element/*/*/container/YOURELEMENTS
Which means within the third layer under /form/element/ there is a container holding YOURELEMENTS.

Best Regards,
Martin
Ranorex Support Team