Question

Is it possible to access .NET properties using SilkTest classic (4Test language)? I need to read value of labels that are shown on System.Windows.Forms.DataVisualization.Charting.Chart control.

I can't use GetProperty or DynamicInvoke because when they return something, 4Test automatically converts it to string. So if I call GetProperty("Legends"), I'll get just Legends.ToString(), not the actual LegendCollection object.

Était-ce utile?

La solution

As described in this article you can use cascading dynamicInvoke-calls to access the elements in the LegendCollection.

You can then also access properties of that element if the default ToString() is not appropriate for you.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top