Repository items to rooted folders - automatically

Ask general questions here.
loonquawl
Posts: 53
Joined: Wed Nov 22, 2017 10:08 am

Repository items to rooted folders - automatically

Post by loonquawl » Wed Jan 24, 2018 3:33 pm

\advertisement
Please vote for better Ranorex documentation!
https://uservoice.ranorex.com/forums/15 ... studio-api \advertisment

On to my current problem:( Ranorex Studio 8.0.0, Win7 64bit)
I'd like to send an application, including all its children, into the repository, from Spy. This is easy via right-click.
It's about 1000 elements.
I then would like to make every rXpath node a rooted folder, without having to manually select and bunch them. IS that possible, if yes, how so?

loonquawl
Posts: 53
Joined: Wed Nov 22, 2017 10:08 am

Re: Repository items to rooted folders - automatically

Post by loonquawl » Fri Jan 26, 2018 9:10 am

2018-01-26 09_00_07-Greenshot.png
Side-by-side comparison of the Spy representation and the repository result
2018-01-26 09_00_07-Greenshot.png (87.38 KiB) Viewed 363 times
I seem to have read somewhere in the forum, but can't find it right now, that setting the property "Simple" in the "RanoreXPath generation mode" would accomplish what i want, but for me it only produces a "flat" tree, with some Root Folders near the AppRoot, and then just all the elements flat beside each other in those.

"Reduce" and "StepCostReduce" do the same, with shorter XPaths but close to no differnce in the folder structure.

Deselecting "Enable Folder autogeneration" leads to all the elements flat under the AppRoot, somehow expectedly, still would have been nice to read about it in a manual...

To reiterate: I'd like to have a folder structure in the Repository that mirrors either the folder structure seen in the Spy-Browser or the Spy-Path structure (meaning the Path would look: AppRoot/RootFolder1/RootFolder2/RootFolder3/Element in my mind both solutions are the same (at least for the "simple" path setting), but if they're not, i'm not picky.

User avatar
RobinHood42
Posts: 240
Joined: Fri Jan 09, 2015 3:24 pm

Re: Repository items to rooted folders - automatically

Post by RobinHood42 » Tue Jan 30, 2018 1:49 pm

Hey loonquawl,
"I'd like to send an application, including all its children, into the repository, from Spy. This is easy via right-click.
It's about 1000 elements.
I then would like to make every rXpath node a rooted folder, without having to manually select and bunch them. IS that possible, if yes, how so?"
Why would you want to do that?
I'd like to have a folder structure in the Repository that mirrors either the folder structure seen in the Spy-Browser or the Spy-Path structure (meaning the Path would look: AppRoot/RootFolder1/RootFolder2/RootFolder3/Element in my mind both solutions are the same (at least for the "simple" path setting), but if they're not, i'm not picky.
Unfortunately, this is not possible. Ranorex automatically groups the elements based on their path into several containers aka rooted folders. It's not possible to disable this functionality.

Cheers,
Robin

loonquawl
Posts: 53
Joined: Wed Nov 22, 2017 10:08 am

Re: Repository items to rooted folders - automatically

Post by loonquawl » Tue Jan 30, 2018 4:02 pm

Why would you want to do that?
I like the structure that would result, it is very intuitive to me.

If i dont do it like this, i have the following problem:

Consider two elements, that look like this (AF =AppFolder, Nx =Node(in Spy), RFx is Root Folder in Repository, Ex is Element):
AF/Na/Nb/Nc/Nd/E1
AF/Na/Nb/Nc/Nk/E2 (so same exact path to 3. node, just different last node and element at the end)
AF/Na/Nx/Ny/Nz/E3 (only first Node is the same as from E1/E2)

Now i get them into Repository, at different times, in different manners (Spy, direct Recording...):
AF/RF1/E1
AF/E2
AF/RF3/E3

There is nothing to indicate that E1 and E2 are logical brethren. R1 and R2 both lead to the same logical node, but because they were created at different times, they got different Root Folders.
I noticed, that when most of the Application is "mapped", that is, if there is already a plethora of RF, then the incidence of newly added Elements getting completely new paths (and thereby new RF) is very low.
AF/RF1/RF2/RF3/E1
AF/RF1/RF2/RF4/E2
AF/RF5/RF6/RF7/E1 (yes this could mean that there might be a single element in RF7, and RF7 alone in RF6, but so what?)
So that is why i would like to have the whole tree from the start. Pruning it is very easy, but making it from scratch, fusing different RF (even knowing which to fuse!) is very painful.

Ranorex automatically groups the elements based on their path into several containers aka rooted folders. It's not possible to disable this functionality.
I want to supercharge that functionality, not disable it! i want more RF.

User avatar
RobinHood42
Posts: 240
Joined: Fri Jan 09, 2015 3:24 pm

Re: Repository items to rooted folders - automatically

Post by RobinHood42 » Fri Feb 02, 2018 1:43 pm

Hi,

Thank you for the additional information.
Consider two elements, that look like this (AF =AppFolder, Nx =Node(in Spy), RFx is Root Folder in Repository, Ex is Element):
AF/Na/Nb/Nc/Nd/E1
AF/Na/Nb/Nc/Nk/E2 (so same exact path to 3. node, just different last node and element at the end)
AF/Na/Nx/Ny/Nz/E3 (only first Node is the same as from E1/E2)

Now i get them into Repository, at different times, in different manners (Spy, direct Recording...):
AF/RF1/E1
AF/E2
AF/RF3/E3
This usually happens, when the AUT (application under test) is not in the exact same state, like for example another instance of the AUT is running, etc.

So that is why i would like to have the whole tree from the start.
You can already add all items to the repository at once, then Ranorex will try to logically creates folders. There, is no possibility to add the items in the same hierarchy as shown within the Spy. I would consider this as a feature request. To create a new feature request, have a look at their UserVoice platform: uservoice.ranorex.com/forums/150109-ide ... ve-ranorex

Cheers,
Robin