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

How to get Silverlight control instance from Existing Browser page

1 Answer 7 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Harsha
Top achievements
Rank 1
Harsha asked on 20 Sep 2013, 01:17 PM
Hi Telerik Team,

How to get Silverlight control instance from Existing Browser page. For example, I have already opened a browser page which is having Silverlight content in it, how to get the instance of this content for automation.

For the new instance you have showed as below

Settings.Current.Web.EnableSilverlight = true;
06. 
07.// Launch a browser instance
08.Manager.LaunchNewBrowser();
09. 
10.// Navigate to the page
11.ActiveBrowser.NavigateTo("http://localhost:5697/SilverlightApplication1Web/SilverlightApplication1TestPage.html");
12. 
13.// Get an instance of our Silverlight app.
14.SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
15. 
16.// Set the text of the text box
17.app.FindName<TextBox>("myName").Text = "Telerik";

Similarly I want to do this for existing browser page.

1 Answer, 1 is accepted

Sort by
0
Boyan Boev
Telerik team
answered on 24 Sep 2013, 11:20 AM
Hello Harsha,

Thank you for contacting us.

Unfortunately you cannot connect to already existing browser instance via code. This is possible only in Test Studio standalone version.

If you need additional assistance do not hesitate to contact us. 

Regards,
Boyan Boev
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Harsha
Top achievements
Rank 1
Answers by
Boyan Boev
Telerik team
Share this question
or