Why do I not see all my user code methods in the Library?
-
- Posts: 1
- Joined: Mon Apr 17, 2017 4:43 pm
Why do I not see all my user code methods in the Library?
I am new to Ranorex and am using the Trial version of 7.0...I have been successfully using all the features and the Repository so far...I have edited one of my user code methods today and since I changed the parameters, I got a compile error naturally. I deleted the existing user code action and when I tried to add the edited method, I cannot find the method in the Library....any idea why??
Re: Why do I not see all my user code methods in the Library?
Hello QAEveryday,
I would suggest creating a User Code Collection. This is a file in which you are able to create different user code methods which will be stored in the user code library.
In order to create a User Code Collection, simply choose "Add" --> "New Item" within the context menu of your project. Afterwards, select "User Code Collection". Afterwards, the file can be found in your project browser: Now, you can simply add new user code methods: These methods can be used in each recording by simply adding it from the user Code Library.
Therefore choose "Add new action" --> "User Code" --> "Select from Library" within a recording.
I hope, this helps.
regards,
qwertzu
I would suggest creating a User Code Collection. This is a file in which you are able to create different user code methods which will be stored in the user code library.
In order to create a User Code Collection, simply choose "Add" --> "New Item" within the context menu of your project. Afterwards, select "User Code Collection". Afterwards, the file can be found in your project browser: Now, you can simply add new user code methods: These methods can be used in each recording by simply adding it from the user Code Library.
Therefore choose "Add new action" --> "User Code" --> "Select from Library" within a recording.
I hope, this helps.
regards,
qwertzu
You do not have the required permissions to view the files attached to this post.
-
- Posts: 2
- Joined: Wed Feb 15, 2017 2:04 pm
Re: Why do I not see all my user code methods in the Library?
Hi all!qwertzu wrote:Hello QAEveryday,
I would suggest creating a User Code Collection. This is a file in which you are able to create different user code methods which will be stored in the user code library.
In order to create a User Code Collection, simply choose "Add" --> "New Item" within the context menu of your project. Afterwards, select "User Code Collection". Afterwards, the file can be found in your project browser: Now, you can simply add new user code methods: These methods can be used in each recording by simply adding it from the user Code Library.
Therefore choose "Add new action" --> "User Code" --> "Select from Library" within a recording.
I hope, this helps.
regards,
qwertzu
Could I use another types (different from string) for parameters in methods from UserCollection?
When I try to add no-string parameters to my method, it becomes unavailable from User code library.
BR.
Re: Why do I not see all my user code methods in the Library?
Hi Vladimir,
Could you please explain what exactly you want to achieve in your method?
Please post the code you are using, so we can give you further hints.
regards,
qwertzu
Could you please explain what exactly you want to achieve in your method?
Please post the code you are using, so we can give you further hints.
regards,
qwertzu
Re: Why do I not see all my user code methods in the Library?
Hey,
I had similar issues when 7.0 dropped. Here is the info that I got then, it looks to still be pretty accurate now.
https://www.ranorex.com/forum/new-code- ... 10323.html
I had similar issues when 7.0 dropped. Here is the info that I got then, it looks to still be pretty accurate now.
https://www.ranorex.com/forum/new-code- ... 10323.html
Re: Why do I not see all my user code methods in the Library?
I created a new user code collection but still i am not seeing anything in the Library.
Please help!
Please help!
Re: Why do I not see all my user code methods in the Library?
Hi joyarjit ,
Are you sure, you created a method within the UserCode Libraray?
An easy way to do so, is right click --> insert new usercode method. Afterwards, you should be able to find this method within your usercode library.
regards, qwertzu
Are you sure, you created a method within the UserCode Libraray?
An easy way to do so, is right click --> insert new usercode method. Afterwards, you should be able to find this method within your usercode library.
regards, qwertzu
You do not have the required permissions to view the files attached to this post.
Re: Why do I not see all my user code methods in the Library?
Hi Qwertzu,
If I myself define the method rather right clicking(as in your screenshot) it does not work.
But, when I define method using the way you mentioned then I am able to see the method in user code library.
Regards.
If I myself define the method rather right clicking(as in your screenshot) it does not work.
But, when I define method using the way you mentioned then I am able to see the method in user code library.
Regards.
Re: Why do I not see all my user code methods in the Library?
Hi,
[UserCodeMethod]
Without this line, the method is not recognized as UserCodeCollection method. So the method should look like this:
In my opinion, you forgot to add this line right before the definition of your method...joyarjit wrote:Hi Qwertzu,
If I myself define the method rather right clicking(as in your screenshot) it does not work.
[UserCodeMethod]
Without this line, the method is not recognized as UserCodeCollection method. So the method should look like this:
Code: Select all
[UserCodeMethod]
public static void UserCodeMethod()
{
}
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: Why do I not see all my user code methods in the Library?
Yes, I forgot to mention that in my code.
Thanks
Thanks