Forum Discussion

albrewer1's avatar
albrewer1
New Contributor
10 days ago
Solved

Interacting with an Infragistics UltraOptionSet

I've been tasked with automating a legacy (desktop MFC/WPF) UI that includes an Infragistics UltraOptionSet. TestComplete is unable to see "inside" this control, and does not provide explicit support for it.

It's possible to call the .NET `set_CheckedIndex` method through script routines, but that is less than ideal as it 1) Does not mimic how a user would actually select an item in the radio button group 2) May not trigger various UI events that update things like validation, visibility, etc. in other controls.

 

What are my options here?

  • You could try putting on the MSAA wildcard (*) - sometimes that helps applications see deeper and identify objects it otherwise can't see. It can be turned on via Tools > Current Project Properties > Open Applications > MSAA, and select the checkbox next to the wildcard asterisk. 

    Otherwise, using an OCR Action may be a good option for selecting the radio button. 

4 Replies

  • You could try putting on the MSAA wildcard (*) - sometimes that helps applications see deeper and identify objects it otherwise can't see. It can be turned on via Tools > Current Project Properties > Open Applications > MSAA, and select the checkbox next to the wildcard asterisk. 

    Otherwise, using an OCR Action may be a good option for selecting the radio button. 

    • albrewer1's avatar
      albrewer1
      New Contributor

      You could try putting on the MSAA wildcard (*)

      That worked!

  • JDR2500's avatar
    JDR2500
    Frequent Contributor

    Based on your description I don't have any great ideas regarding an elegant solution.  Less elegant ideas are calculating positions of the radio button using offsets from the top left of the control.  I've had to do that sort of thing before and don't like it.  There is fragility when running on different environments.

    Another possibility is the IQ Add-in for TestComplete.  It would be able to find all the items.  You could then identify the one you want and click on it.  That would be easiest if clicking on the text also selected the radio button.  If you have to click directly on the radio button then you're back to using offsets.  At least it would only be an offset from the desired item/text string.

    Is there keyboard access to the control?  Maybe you can tab into it, arrow through the items and press the spacebar to select one?  I would think that should still trigger the UI events.

    Sorry I don't have any better ideas.

  • albrewer1's avatar
    albrewer1
    New Contributor

    Is there keyboard access to the control? 

    Fortunately, the control does react as expected to keyboard controls, and that's the way I ended up going. My concerns are just as you said - most approaches to this will be brittle and environmentally dependent. I was hoping for a way to signal to TC that there's more stuff inside the control, but it looks like there's simply no way to do that.