After switching to Python Plugin 3, it’s no longer possible to access Result Listener’s internal properties.
It wasn’t the case in the previous version of the Python Plugin:
for listener in OpenTap.ResultSettings.Current:
self.log.Warning(f"{listener.Name=}")
self.log.Warning(f"{listener.IsConnected=}")
self.log.Warning(f"{listener.GetType()}")
self.log.Warning(f"{listener.my_property}") # doesn't work anymore
1 Like
Hi @geomags123,
That should theoretically still work. What kind of error are you getting?
I’m gettings this error:
Error occurred: 'IResultListener' object has no attribute 'my_property'
Can you share all the logged warnings you got?
I tried to get the FilePath
attribute of the CSV Result Listener from the Python Examples plugin.
It shows an error even though I see this attribute in the code.
@attribute(OpenTap.Display("Result Listener Test", "", Groups=["Test"]))
class ResultListenerTest(TestStep):
def __init__(self):
super().__init__()
def Run(self):
super().Run()
for listener in OpenTap.ResultSettings.Current:
self.log.Warning(f"{listener.Name=}")
self.log.Warning(f"{listener.IsConnected=}")
self.log.Warning(f"{listener.GetType()}")
self.log.Warning(f"{listener.FilePath}")