Hello,
Is there a way to write my own repository without a record and make a dynamic mapping of a interface?
I wanna work without recordings only with files "UserCodeModulex.cs" and I need to write my own repository.
Thank you.
Ranorex Repository
Re: Ranorex Repository
Hi,
The only other way, how to create repository items (besides Recording), is using Track feature from Repository view/Ranorex Spy or add the repo elements manually.
May I ask you why do you want to use only codemodules? What do you see as a downside, while using Recordings? From my point of view, using recordings makes the development much faster? I only rarely use recording facility in these days, but I still use Recording modules (simply drag&drop repo elements to recording modules). Recording modules are easier to create and maintain and definitely easier to read and understand for Ranorex newcomers. Plus each recorded/manually added Ranorex action automatically adds a report log! And of course, Ranorex automatically produces valid C# code for each action, so there is no chance for coding mistakes. So all in all, I don't see any real disadvantage of using recordings? I'm using codemodules only when it's easier to do something from code.
The only other way, how to create repository items (besides Recording), is using Track feature from Repository view/Ranorex Spy or add the repo elements manually.
May I ask you why do you want to use only codemodules? What do you see as a downside, while using Recordings? From my point of view, using recordings makes the development much faster? I only rarely use recording facility in these days, but I still use Recording modules (simply drag&drop repo elements to recording modules). Recording modules are easier to create and maintain and definitely easier to read and understand for Ranorex newcomers. Plus each recorded/manually added Ranorex action automatically adds a report log! And of course, Ranorex automatically produces valid C# code for each action, so there is no chance for coding mistakes. So all in all, I don't see any real disadvantage of using recordings? I'm using codemodules only when it's easier to do something from code.
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Ranorex Repository
I have a xml file(contains informations about my tests) and I want to use it in a script to navigate on my app and get reports. This script will generate automatically the files for Ranorex based on xml file. I want to use just RUN from Ranorex to get reports.
Thank you for your answer!
Thank you for your answer!
Re: Ranorex Repository
Hi,
Even without seeing your xml, I seriously doubt there is a way to achieve what you want. There is definitely no way to automatically create repo elements and then use them for your code modules. I just don't see a way to do this all by just one xml file, describing your test?
You see, there are multiple problems...
At first, to be able to create a repo element, the GUI must be in state that the element in question is available. Who will navigate it to that state? Since there is no script yet, you will have to do this manually. And then you will have to create a new repository item, either by recording the action or tracking the element manually.
At second, you must somehow associate the repo elements with actions. How do you expect Ranorex would do that?
Even without seeing your xml, I seriously doubt there is a way to achieve what you want. There is definitely no way to automatically create repo elements and then use them for your code modules. I just don't see a way to do this all by just one xml file, describing your test?
You see, there are multiple problems...
At first, to be able to create a repo element, the GUI must be in state that the element in question is available. Who will navigate it to that state? Since there is no script yet, you will have to do this manually. And then you will have to create a new repository item, either by recording the action or tracking the element manually.
At second, you must somehow associate the repo elements with actions. How do you expect Ranorex would do that?
Pavel Kudrys
Ranorex explorer at Descartes Systems
Please add these details to your questions:
Ranorex explorer at Descartes Systems
Please add these details to your questions:
- Ranorex Snapshot. Learn how to create one >here<
- Ranorex xPath of problematic element(s)
- Ranorex version
- OS version
- HW configuration
Re: Ranorex Repository
You could, however, dynamically create instances of RxPath in UserCode and use those:
But there are probably two or three approaches that prove to be more sensible in the long run.
Code: Select all
Ranorex.Unknown thing = null;
String sTmp += "//a[@" + pAttribute + "='" + sVal + "']"; //----Your code here
Host.Local.TryFindSingle<Ranorex.Unknown>(new RxPath(sTmp), 12500, out thing);
Vorsprung durch Wahnsinn
www.Doktor-Andy.de
www.Doktor-Andy.de
Re: Ranorex Repository
Thank you very much for all your responses. I found a solution which seems with Andymann's solution.
Best regards!
Best regards!