Dynamic Test Step Properties

Is it possible to create properties based on the selection from the available list of values?

For example, I have a step that lists options such as “Option A”, “Option B”. When the user selects an option such as Option A, the plugin would get a list of sub-categories (Param1, Param2, Param3) that must be displayed as individual fields (Display Name and a text box to enter a value) under "Test Step Settings ".

2 Likes

Hi @priram, welcome to the forum. Check out this related post on dynamic properties.

1 Like

@priram a simple way to do is this if the other values are known is with the EnabledIf attribute. This allows you to show additional options based on a previous selection:

        [Display("Radio Standard", Group: "DUT Setup", Order: 1)]
        public RadioStandard Standard { get; set; }

        // This setting is only enabled when Standard == LTE || Standard == WCDMA.
        [Display("Measurement Bandwidth", Group: "DUT Setup", Order: 2.1)]
        [EnabledIf("Standard", RadioStandard.Lte, RadioStandard.Wcdma)]
        public double Bandwidth { get; set; }

As @david-wsd said, the topic he linked goes into other options for truly dynamic properties and more advanced controls.

Thank you. I will try it out.

1 Like

Thank you. This option would have worked perfectly if the parameter list is fixed.

1 Like

Hi David, I checked on the IControlProvider in the Examples (PictureControlProvider) and thought of giving it a try.

I am unable to use IControlProvider and it complains of missing assembly. Am I missing any dependency?

1 Like

@priram Yes, you’ll need to add reference to Keysight.OpenTap.Wpf. For me, it’s located here:
C:\Program Files\Keysight\Test Automation\Packages\WPF Controls\Keysight.OpenTap.Wpf.dll

Then add this using statement:
using Keysight.OpenTap.Wpf;

1 Like