This is a migrated thread and some comments may be shown as answers.

Get HelpText property of silverlight control

3 Answers 111 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Vinay
Top achievements
Rank 1
Vinay asked on 13 Jan 2015, 07:48 AM
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

3 Answers, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 16 Jan 2015, 07:25 AM
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
 
0
Vinay
Top achievements
Rank 1
answered on 02 Feb 2015, 11:28 PM
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).


0
Ivaylo
Telerik team
answered on 05 Feb 2015, 02:09 PM
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
 
Tags
General Discussions
Asked by
Vinay
Top achievements
Rank 1
Answers by
Ivaylo
Telerik team
Vinay
Top achievements
Rank 1
Share this question
or