How to add automation id property in Radbutton

2 posts, 0 answers
  1. Gaurav
    Gaurav avatar
    21 posts
    Member since:
    Apr 2011

    Posted 09 Jul 2015 Link to this post


    in my application we are creating rad button like this: 

    var tool = new RadRibbonButton()
                    Text = caption,
                    Size = ButtonSize.Large,
                    LargeImage = img


    I am automation engineer. I have to add automation id here. How can I add it? Need help




  2. Kiril Vandov
    Kiril Vandov avatar
    323 posts

    Posted 14 Jul 2015 Link to this post

    Hello Gaurav,

    The AutomationId property is attached one and in order to set it from code you will need to access them through the static class that holds them. Here is an example with the AutomationId property:
    var tool = new RadRibbonButton()
                    Text = caption,
                    Size = ButtonSize.Large,
                    LargeImage = img
    AutomationProperties.SetAutomationId(tool, "SomeId");
    You can find more information on how to set attached properties in this article.

    Kind regards,
    Kiril Vandov
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
Back to Top