Is there a way to automate C1 WinForm controls via teststack.white?

Posted by: Jeff.Huckins on 18 March 2019, 5:34 am EST

  • Posted 18 March 2019, 5:34 am EST

    We're using teststack.white for our UI automation testing, so have a need to automate the various C1 Studio controls in our application.

    Can this be done?

    Thanks in advance!
  • Replied 18 March 2019, 11:41 pm EST

    Hello Jeff,

    I am discussing your requirement with the developers [ID: 371612] and would get back to you as soon as I have some confirmation.

  • Marked as Answer

    Replied 21 March 2019, 2:00 am EST

    Hi Jeff,

    C1 WinForms Studio controls partially support Automation.

    Some controls fully support Automation, some not.
    You can checkout by yourself with a tool like inspect.exe or

    Or give us a list of controls you're interested in and we'll check if they support automation for you.

    - Alexey
  • Replied 4 September 2019, 7:02 am EST

    Thank you for your response. We need to automate C1FlexGrid.

    I've tried using TestStack.White Table, but it doesn't work. It finds the rows, but indicates zero cells for the rows when there are 4.

    This is really important for us, as we use Component One FlexGrid a lot throughout our application.

  • Replied 4 September 2019, 4:15 pm EST

    Hello Jeff,

    I am getting back to the developer with this information and will come back to you once I have some information.

  • Replied 5 September 2019, 4:11 am EST

    Thank you, Ruchir!
  • Replied 5 September 2019, 7:47 am EST

    Some additional info:
    - I've used Accessibility Insights tool to verify that the control is accessible, including rows and columns
    - I've been using TestStack.White.UIItems.TableItems.Table class, which doesn't seem to provide row/column access to set the text in a cell.

    Is there a different automation class that I should be using?
  • Replied 5 September 2019, 4:58 pm EST

    Hello Jeff,

    As I understand, TestStack.White works on top of UIAutomation framework of .Net. If you intend to have third party controls in your application, you should verify whether these controls are supported by UIA. You can use UIAutomationVerify to check this.
    When any control is supported, the tool would show you the inner details of the control in a tree form.
    To see whether ComponentOne control(s) supports Automation, you may use a tool inspect.exe:

    Again, I'm discussing with the developer about C1FlexGrid's support for Automation.

  • Replied 6 September 2019, 3:05 am EST

    Yes, Ruchir. FYI, inspect-objects is a "legacy" tool, the site suggests using Accessibility Insights and provides a link to get to it.

    And, as I said, the Accessibility Insights tool gets access to the C1FlexGrid object in our app and claims it is accessed as a FlexGrid, however, I can't find a FlexGrid class in UI Automation, so I can't figure out what class to use and/or how to code it to set values in row/column cells.
  • Replied 9 September 2019, 12:52 am EST

    Hi Jeff,

    Like mentioned by Alexey, ComponentOne controls partially support Automation. To confirm how much C1FlexGrid supports UIAutomation, developers are investigating over it. Once they have some conclusion, I'll update you about the same.

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels