Page 1 of 1

Adding User Code Collection to Library

Posted: Wed Jan 31, 2018 1:41 am
by msmith
My user created methods don't show up in the library when selecting User Code -> Select From Library

I've added Automation Helpers to my solution and see them showing when selecting User code as a new action.
I also added my own User Code Collection by following the "Collections and Methods" from the help, but when selecting User Code -> Select From Library, my methods don't show up

I've tried a few things including re-building the solution

Any steps I'm missing?

Re: Adding User Code Collection to Library

Posted: Wed Jan 31, 2018 10:14 pm
by Vega
How did you create these methods? Did you create them from the action table like Add new action --> User code method --> New user code method? It is partial guesswork without actually seeing your solution, unfortunately. Would you be able to show a screenshot by chance? I know your solution probably has sensitive info, so if that is the case would you be able to create a small sample solution which shows the same issue? That way you can show us what is going on without exposing sensitive data.

Re: Adding User Code Collection to Library

Posted: Wed Jan 31, 2018 10:30 pm
by krstcs
If you can't share your actual solution, you could create a small demo solution and share that. Just create the User Code methods the way you normally would, but leave them empty (or just put Report.Info methods in them) and name them with generic names.

As Vega said, it is very hard for us to help without seeing your solution, so a demo solution is the next best thing.

Re: Adding User Code Collection to Library

Posted: Mon Mar 26, 2018 10:04 am
by Shakib
1. right click to user code collection
2. select 'insert new user code method".
3. make it public static.
4. save it.
5. go to the recording module.
6. click on add new action.
7. select use code
8. user defined methods will display

Re: Adding User Code Collection to Library

Posted: Sat Jul 30, 2022 3:04 pm
by michael.wowro
Very old thread, but Google brought me here because I had the same problem.

My solution: The type of argument I used (Ranorex.WebElement) was not protested by Ranorex Studio in any way, but was still not allowed for User Code Methods (see: https://www.ranorex.com/help/latest/ran ... darguments). After changing the type to Ranorex.Adapter, my new User Code Method was also displayed here: New Action -> User Code -> Select From Library.