How to use the object repository in code module

Ask general questions here.
upendra
Posts: 13
Joined: Tue Oct 06, 2015 11:27 am

How to use the object repository in code module

Post by upendra » Wed Jan 06, 2016 12:33 pm

Hi,
I have been doing the testing in Ranorex Record and playback since past few months.
I am new to the ranorex code module.
I just want to create a simple login script using ranorex code.
Attach is the code for the same.
I have added the few steps .When i trying to run the script , error message is displaying that "particular repository does not contain the definition for the ......" .
Attach the error message for the same.
Also i have added the instance of the repository but this also not working.
Please help me to under stand this ,without record and play back how to add the repository in the code.
I have already gone the code module " how to using repository in the code" but i am not able to succeed.
Please help me to under stand this.
I know this is the basic but if write the initial code then i will be able to write other codes.
Thanks in Advance!.

Regards
Upendra
Attachments
Login error ranorex.jpg
Login error ranorex.jpg (268.67 KiB) Viewed 786 times

Tzahi
Posts: 16
Joined: Sun May 17, 2015 2:24 pm

Re: How to use the object repository in code module

Post by Tzahi » Thu Jan 07, 2016 11:02 am

Hi Upendra,

your error just say it doesn't find this element, are you sure you have it (open it and expand)?
can you add the repository screen shot?
Best Regards
Tzahi Caspi

upendra
Posts: 13
Joined: Tue Oct 06, 2015 11:27 am

Re: How to use the object repository in code module

Post by upendra » Thu Jan 07, 2016 11:19 am

Hi ,
Thanks for your reply!
I have attached the repository.
Please let me know how to add this element in repository if the existing repository does not contain the element.

Regards
Upendra
Attachments
Login.cs
(1.95 KiB) Downloaded 47 times
RMSLoginRepository.cs
(2.3 KiB) Downloaded 48 times

Tzahi
Posts: 16
Joined: Sun May 17, 2015 2:24 pm

Re: How to use the object repository in code module

Post by Tzahi » Thu Jan 07, 2016 1:49 pm

I can't find it, your repository seemed to be empty or I'm missing something.
I can't download .cs file here (security issue), but i saw it in a different p.c.
You can double click the file .rxrec, it will open at the studio.
After it Expend each folder by the + (at the left).
do you use more then one repository? (at the current project I see only one).
Best Regards
Tzahi Caspi