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

How to expose the automation peer of a silverlight custom control in Telerik testing framework

1 Answer 52 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Vinay
Top achievements
Rank 1
Vinay asked on 15 Jan 2015, 12:38 PM
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");

After this i am using GetProperty method to get the "HelpText" property as :

string helpText = (string)myCustomControl.GetProperty(new AutomationProperty("HelpText", typeof(string))); 


But it gives me error saying : "HelpText" property is not a valid automation property.

How can i exposed the automation peer of silverlight control in telerik testing framework.?




1 Answer, 1 is accepted

Sort by
0
Ivaylo
Telerik team
answered on 20 Jan 2015, 08:00 AM
Hello,

We have already answered this in your duplicate forum post. Please provide any additional information in the discussion you have opened.

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
Share this question
or