Thank you for reaching out to us!
Having the app's code and the test in the same solution will not enable you to cast a TestStudio framework object to a specific WPF control type. The app under test and the test itself are quite different entities. You can use the built in wrapper objects or create your own based on the control types you have. Any control property can be accessed via the AutomationObject
wrapper, please note that TestStudio framework only traverses the app's VisualTree so the DataContext property will be returned as string representation of the underlying type(Type.ToString()
), same is true for the routed commands. The API does support method invocation and property setting via the framework, so it really depends on your specific needs and the property types.