Posted: 5 Jun 2017 7:38 EDT Last activity: 6 Nov 2018 20:02 EST
Use Class Libraries developed in .Net into Openspan Automation
Hi Team ,
Could you please let us know the detailed procedure how to use the class library created in C#.Net and use this dll reference in openspan project and add the functions defined in automation of openspan project.
**Moderation Team has archived post**
This post has been archived for educational purposes. Contents and links will no longer be updated. If you have the same/similar question, please write a new post.
Once you create your own DLL that inherits from System.ComponentModel.Component (or you create your own class which has Public Static methods), place the dll and any supporting dlls into the installation folder (for Studio this is C:\Program Files (x86)\OpenSpan\OpenSpan Studio for Microsoft Visual Studio 2015) where the rest of the product's dlls reside.
To add it to the Toolbox;
Right-click on an empty area of he Toolbox.
Select Choose Items.
If it is a component, then it should appear on the .Net Framework Components tab. You may use the Filter to locate it easily by entering a few characters of the component name into the text box.
If it is a class with Static methods, you may locate it on the Pega Robotics Static Members tab.
Once it is on the Toolbox, you may drag it out to your automation (or Global Container) and use it as you would any of the other built-in components. Make sure that the any properties, methods, and events that you wish to use are marked as Public for them to be visible to Studio.
Thanks for the way suggested. It is working fine as expected only. But the class which I have written is inherited from System.ComponentModel.Component class contains Static methods and am able to see these static methods in the toolbox of the openspan. But I am unable to see the non static methods.
How to use the non static methods of the class library. can you please suggest me a way for that. Am I missing anything here... in this scenario...
Please refer attached document. I am not able to see non-static public methods while adding the .net class library file into OpenSpan. Also under automation nothing was there to select non-static public methods as mentioned in your image. Cloud you please guide me on this.
The methods in your code are not static. If you mark them as static then they will be visible. If they cannot be static, then you need to create a component (have your class inherit from Component), and add the component to your automation.
Is there any procedure of adding class library in different path. In company environment, everyone does not have admin access. And, due to insufficient privileges, unable to add class library in C drive.
Thank you for posting your query in the PSC. This looks like an inactive post and hence, we suggest you create a new post for your query. Click on the Write a Post button that’s available on the top right pane of this page. Once created, please reply back here with the URL of the new post.
You may also refer this discussion link as a reference in the new thread.