I used in the samples of ranorex and I wrote in my code
using Ranorex.Core.Repository;
GlobalRepositoryrepo=GlobalRepository.Instance;
but i got error messages :
1.The name 'GlobalRepository' does not exist in the current context (CS0103) - C:UsersYoadDocumentsRanorexRanorexStudio Projectstest_for_objectstest_for_objectsRecording1.UserCode.cs:37,34
2.
The type or namespace name 'GlobalRepository' could not be found (are you missing a using directive or an assembly reference?) (CS0246) - C:UsersYoadDocumentsRanorexRanorexStudio Projectstest_for_objectstest_for_objectsRecording1.UserCode.cs:37,10
how I fix error messages?
error messages of GlobalRepository
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: error messages of GlobalRepository
Hello,
This message means that Ranorex cannot find the class GlobalRepository.
Is there a repository with this name available in your project?
In order to get more information how to use a repository in user code please read the section "Using Repository in Code" in our user guide.
Regards,
Bernhard
This message means that Ranorex cannot find the class GlobalRepository.
Is there a repository with this name available in your project?
In order to get more information how to use a repository in user code please read the section "Using Repository in Code" in our user guide.
Regards,
Bernhard
Re: error messages of GlobalRepository
hello Bernhard,
I used your code of website
http://www.ranorex.com/support/user-gui ... html#c3196
in the file check.rxrec-->check.cs
and this is not working
also I can't save your code my project why?
tnx
I used your code of website
http://www.ranorex.com/support/user-gui ... html#c3196
in the file check.rxrec-->check.cs
and this is not working
also I can't save your code my project why?
tnx
Support Team wrote:Hello,
This message means that Ranorex cannot find the class GlobalRepository.
Is there a repository with this name available in your project?
In order to get more information how to use a repository in user code please read the section "Using Repository in Code" in our user guide.
Regards,
Bernhard
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: error messages of GlobalRepository
Hello,
In order to analyze the issue I would like to take a look at your project.
Can you send the project to [email protected] or can you attach it to your next post.
I think this is the fastest way in order to fix the issue.
Thank you!
Regards,
Bernhard
In order to analyze the issue I would like to take a look at your project.
Can you send the project to [email protected] or can you attach it to your next post.
I think this is the fastest way in order to fix the issue.
Thank you!
Regards,
Bernhard
Re: error messages of GlobalRepository
hello Bernhard
I sent my project here
Regards,
Yoad
I sent my project here
Regards,
Yoad
Support Team wrote:Hello,
In order to analyze the issue I would like to take a look at your project.
Can you send the project to [email protected] or can you attach it to your next post.
I think this is the fastest way in order to fix the issue.
Thank you!
Regards,
Bernhard
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: error messages of GlobalRepository
Hello,
Thank you for the project.
As I supposed, the repository in your project is not the same as you call in your code. Please try the following line in order to create an instance of the repository in your user code module.
Regards,
Bernhard
Thank you for the project.
As I supposed, the repository in your project is not the same as you call in your code. Please try the following line in order to create an instance of the repository in your user code module.
test_for_objects.test_for_objectsRepository repo = test_for_objects.test_for_objectsRepository.Instance;Additionally I have seen that your repository is empty. That means that the following lines will also not work.
repo.MyApp.Self.Activate(); Report.Info(repo.MyApp.Self.Active.ToString()); repo.MyApp.Self.Maximize(); . . .In order to get more information how to work with the repository I would suggest to take a look at the section "How to build up and maintain a Repository in Ranorex" in our user guide. There are a lot of videos which will help you to understand how Ranorex works with the repository.
Regards,
Bernhard
Re: error messages of GlobalRepository
it is not working for me
i send you new project with program.cs and codemodule.cs
i send you new project with program.cs and codemodule.cs
You do not have the required permissions to view the files attached to this post.
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: error messages of GlobalRepository
Hello,
Thank you for your project.
In your project is no repository and no test suite. If you do not have a repository in your project you cannot use it in code.
Why do you want to implement the tests in user code? I think it would be easier to use the record and play approach in order to write tests.
Please read the user guide in order to get more information how to work with Ranorex.
However, I changed your first project and added a repository item using the Microsoft calculator.
I really would suggest to read the user guide from the beginning.
Thank you!
Regards,
Bernhard
Thank you for your project.
In your project is no repository and no test suite. If you do not have a repository in your project you cannot use it in code.
Why do you want to implement the tests in user code? I think it would be easier to use the record and play approach in order to write tests.
Please read the user guide in order to get more information how to work with Ranorex.
However, I changed your first project and added a repository item using the Microsoft calculator.
I really would suggest to read the user guide from the beginning.
Thank you!
Regards,
Bernhard
You do not have the required permissions to view the files attached to this post.
Re: error messages of GlobalRepository
thank you