How to get Silverlight control instance from Existing Browser page

2 posts, 0 answers
  1. Harsha
    Harsha avatar
    1 posts
    Member since:
    Sep 2013

    Posted 20 Sep 2013 Link to this post

    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.
  2. Boyan Boev
    Admin
    Boyan Boev avatar
    1040 posts

    Posted 24 Sep 2013 Link to this post

    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
Back to Top