How do I use those methods created in UI connector C# class in an automation?
for example I get pre generated "Public string GetItems(bool gdi) method in C# class, but I will not be able to see those methods for that control in object explorer. Though I can see the methods in tester targets.
And also I have added additional methods in C# class, but these methods I am not able to see in tester target and also in object explorer.
Any assistance will be of great help.
***Edited by Moderator: Pallavi to update platform capability tags***
If the control is a dotnet control, you can expose already existing methods by referring to Page 8 on the UI Connector document - "Discover Native Control Members"
If you have written a custom method for a dotnet control (through a UI Connector), you have to re-build the solution and re-interrogate the control before the method shows in the object explorer.
Often a UI Connector is more than you need. I recommend using a UI Type Extension which is basically the same as a UI Connector but you don't have to implement the interface and it only applies to a specific type of control (ex. Infragistics.Win.UltraWinGrid.UtlraGrid). You also don't need to re-interrogate the control after making the extension - just re-build!
I was able to create a type extension for the component and find those extension methods in object explorer and use them in automation for execution.
But for the UI Connectors, I tried deleting the control, re-build and re-interrogate the control, The interrogated control property was attached to the respective UI connector
ex : UIConnectorType :UiConnectors.ComboBoxConnector (Property Value after re-interrogation)
and still I was not able to find the custom methods in object explorer and in Target Tester, and also Public string GetItems(bool gdi) method which was seen in Target Tester but not in object explorer.
Posted: 3 years ago
Posted: 11 Feb 2019 8:49 EST
Mitchell Vega (Mitchell)
Software Engineer, Robotics Engine