How can I access parent properties in the child step? [Python]

I have a simple parent step with some property that I would like to access in chilstep. However I receive the following error: ‘ITestStepParent’ object has no attribute ‘some_prop’.

I try to access the property in the following manner: self.Parent.some_prop in the child class.

Hi @cliff and welcome to the forum!

It’s a bit unfortunate that the .net/python gets confused with this…

I gave an answer here: Reading multiple test step outputs (python) - #8 by jb111

Basically you need to get C# to give you the concrete type instead of an interface type ITestStep.

parent = self.GetParent[MyParentType]()

I will try to investigate if this is something we can fix. But for now you can use this.

Thank you so much. This did the trick!