In case you have an instrument or a DUT that has a plugin written in C#, you can still use that in a Python plugin very easily.
In the below example, "PowerAnalyzer"
is an C# Instrument Plugin that is provided by "OpenTap.Plugins.Demo.Battery"
. It contains a measure current method.
We can use it in Python as shown below:
- Use
clr.AddReference("<dll name>")
to import the C# dll. - Add the PowerAnalyzer as a setting for the python test step
- Call the PowerAnalyzer methods directly from python