Can we access search attributes of already searched element

2 posts, 0 answers
  1. Prachi
    Prachi avatar
    8 posts
    Member since:
    Dec 2010

    Posted 25 Sep 2012 Link to this post


    Can we access search attributes like Automation Id, Name from a already searched element at runtime?

    For Example - 
    If I have a control with automationID and Name attributes associated with it.
    return Get<ArtOfTest.WebAii.Silverlight.UI.Button>("AutomationId=SearchButton","Name=SButton","XamlTag=button");

    Is there any way so that during run time i can print the AutomationId, Name, XamlTag of the control?

  2. Plamen
    Plamen avatar
    8 posts

    Posted 28 Sep 2012 Link to this post

    Hello Prachi,

    Yes, all of these are properties of the FrameworkElement class. See here for more information. You can easily access them during runtime by simply referencing the desired element in the Repository. 

    Here's an example:

    All the best,
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
Back to Top