Get HelpText property of silverlight control

4 posts, 0 answers
  1. Vinay
    Vinay avatar
    1 posts
    Member since:
    Jan 2015

    Posted 13 Jan 2015 Link to this post

    I am working on creating test method to fetch the HelpText property of a silver light control using ArtOfTest.Webii.I have tried using the automation property ,but HelpText not appears to be the automation property of FrameworkElement control used to represent any silver light control in telerik testing framework.please help me in this
  2. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 16 Jan 2015 Link to this post

    Hеllo Vinay,

    Instead of using automation property try using an attached property as demonstrated in this forum post.

    If you are still not able to manage this please provide us with a sample demo project so we can take a look.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
  3. Vinay
    Vinay avatar
    16 posts
    Member since:
    Jan 2015

    Posted 02 Feb 2015 Link to this post

    Hi, Sorry for late reply.

    i have tried using GetAttachedProperty() way. But that also did not works for me.
    We have added a automation peer to a silverlight control.
    Now i want to get the automation peer associated with a silverlight custom control using telerik testing framework. HelpText property of automation peer is used to exposed the required information. i want to get that information(HelpText of automation peer) from the custom control.

    i am trying the following way:

    Manager.LaunchNewBrowser(BrowserType.InternetExplorer);
    ActiveBrowser.NavigateTo("http://localhost:1031/SampleSilverlightAppTestPage.aspx");
    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
    Assert.IsNotNull(app);
    FrameworkElement myCustomControl = app.Find.ByName("myCustomControl");
    string helpText = myCustomControl.GetAttachedProperty<double>("String", "HelpText");

    Its throwing me the exception as :

    Test method START.CrossBrowser.Tests.RegressionTesting.RegressionTesting_FullRegressionTest threw exception:
    ArtOfTest.WebAii.Silverlight.ExecuteSilverlightCommandException: [Silverlight Extension Error] Details: ArtOfTest.WebAii.Silverlight.NoSuchPropertyException: Unable to find attached property owner class 'String'
       at Telerik.TestingFramework.XamlExtension.ClientServices.GetAttachedPropertyValue(AutomationProperty property, Object obj)
       at Telerik.TestingFramework.XamlExtension.ClientServices.GetRealProperty(AutomationReference reference, AutomationProperty property)
       at Telerik.TestingFramework.XamlExtension.ClientProcessor.ProcessCommand(String command).


  4. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 05 Feb 2015 Link to this post

    Hello Vinay,

    In order to assist further we will need a sample project against our Silverlight controls that reproduces the issue you are experiencing.

    Thank you for your cooperation in advance.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top
  Cast Your Vote at DevPro Connections! Cast Your Vote at  Win IT Pro Connections!