How to manually create repository items in repository for CodeModule.cs file

Ask general questions here.
Ekpedeme
Posts: 2
Joined: Wed Sep 12, 2018 3:19 pm

How to manually create repository items in repository for CodeModule.cs file

Post by Ekpedeme » Tue Oct 23, 2018 12:50 pm

Hi,

Its likely this question may have been treated, I really need help with this.
I am new to ranorex but I've been doing record and play back of test. Am looking forward to doing more of code module, but am having difficulties handling the objects within the repository file.

Question: How do I attempt this?
Any guide on how to write a working code module from scratch and create repository items for it variables without any recording?
What are the steps?

Thanks,
Ekpedeme

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to manually create repository items in repository for CodeModule.cs file

Post by odklizec » Wed Oct 24, 2018 10:23 am

Hi,

It's way easier to work with repo elements in recording modules, than in code modules. In recording modules, you can simply drag & drop repo elements to appropriate ranorex actions. But of course, you can still do it. It would just require much more work and the code modules will be much harder to maintain. Check for example this code sample:
https://www.ranorex.com/help/latest/han ... toryincode
Pavel Kudrys
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

Ekpedeme
Posts: 2
Joined: Wed Sep 12, 2018 3:19 pm

Re: How to manually create repository items in repository for CodeModule.cs file

Post by Ekpedeme » Wed Oct 24, 2018 3:37 pm

Hi odklizec,

Thanks for replying.

I will keep looking at the codes as I will like to have control over the code than just recording every part of my test.

Ekpedeme

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: How to manually create repository items in repository for CodeModule.cs file

Post by odklizec » Wed Oct 24, 2018 4:02 pm

Hi,

Of course, it’s your choice ;) But I still think, that using recording modules, makes the whole test automation process in Ranorex faster. Plus the project itself is easier to maintain and read, especially for new users. And the number of coding errors is definitely lower too, because of automatic conversion (and validation) of individual actions to C# code.
Pavel Kudrys
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