Copy Repository path to clipboard for pasting directly into code.
I find myself copying items in my Ranorex Studio project Repository to the clipboard in the hope that I can then paste a Repository path snippet into a text editor window (such as a user code module editor window, or notepad).
TL;DR: I want to get the full dotted repository path in the code e.g. Repo.Application.Window.SubWindow.Nested.Item.
Sometimes my Repository items are fairly nested in a hierarchy. I was looking for a short-cut to get the full dotted-path item name into my code module. When I then want to make a Property that gives me a short-cut to this Repository item I often type up the path so I can more easily find it in the Repository code module in order to get the correct data type.
So I was hoping multiple clipboard objects could be stored in the clipboard offering different clipboard data formats, perhaps with a plain text format being the item path in the Repository. I'm just after the "Repo.Application.Window.SubWindow.Nested.Item" sort of name rather than the full RxPath.
thank you for your valuable input. It is already possible to drag and drop items from the element tree in Spy directly into code. As a result a variable is created and the the absolute path is assigned to it.
Alternatively (and maybe preferably), repository items should be used in code.
Product Management Team
I understand, it seems like we are talking about different use cases.
It is also possible to drag repository items and drop them in a code file directly at the line of code you want to use it. Please make sure the code file is writable.
Ranorex will then create a variable which get's the repository item assigned.
var repo = androideeeRepository.Instance;
var start = repo.Explorer.Start;
Please give it a try and let us know if this is what you want to achieve.
Ranorex Product Management
Unfortunately that does not help me at all with my workflow. I would have to open and find it in Spy. It's already hard enough to find in Spy whereas I already have it in my neatly configured Repository. My Repository is open alongside my source code. Both windows are full sized, so I can see one or other, and I alternate between them via the tabs at the top of Studio.
So I tried dragging an item from the Repository to my source file in the Projects tree. But that is denied also. Thus I am left to type it out instead.
Oh well :(
Drag-Dropping a repository element into the User Code automatically creates what you are looking for.