I followed the steps on this url (http://www.ranorex.com/blog/custom-smart-actions) to link a class to my recording module. When i initially followed the steps it didnt work, I tried on another sample project and it worked, so I decided to try again on my "real" and this time it didnt work. Work as in I could not view the methods on the recording module when I added a user code item to the script. The drop down was empty.
This is what I did:
1) Project, create a C# class
2) pasted my method to the class
3) open the <RecordingName>.UserCode.cs file and add a colon followed by the name of the base class to the existing declaration of the class
4) Added a recording module
5) insert a user code, nothing appears in the drop down
6) created a new recording module and nothing happens
What is the proper sequence ? Do i need to create the recording module first?
Custom Action by Inheritance
Re: Custom Action by Inheritance
Hi,
Do you have, by any chance, the class file stored in a folder? In this case, the class name must be preceded with that folder name! What happens, if you start typing after the colon? Do you see the class name in IntelliSense popup screen?
Do you have, by any chance, the class file stored in a folder? In this case, the class name must be preceded with that folder name! What happens, if you start typing after the colon? Do you see the class name in IntelliSense popup screen?
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: Custom Action by Inheritance
I know this thread is a year old, but I ran in to the exact same problem and thought I could offer some insight for anyone coming after me.
In my case, the issue was that one of the parameters had the type Ranorex.Element. I changed it to Ranorex.Adapter and it worked.
I guess there are some object types that Ranorex won't let you use for parameters.
In my case, the issue was that one of the parameters had the type Ranorex.Element. I changed it to Ranorex.Adapter and it worked.
I guess there are some object types that Ranorex won't let you use for parameters.
Re: Custom Action by Inheritance
If you want to pass a repo element to custom method, it must be declared either as "repoiteminfo" (Ranorex.Core.Repository.RepoItemInfo) or "adapter" (Ranorex.Adapter).
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