SilverLight: Cannot find Find.ByAutomationId or Text option to find an element

3 posts, 0 answers
  1. Sizy
    Sizy avatar
    2 posts
    Member since:
    Oct 2015

    Posted 05 Oct 2015 Link to this post

    Hi I am evaluating telerik Testing Framework to Automate my test. The page "http://docs.telerik.com/teststudio/testing-framework/write-tests-in-code/silverlight-wpf-automation-wtc/locating-elements" shows that one can use "Automation Id", "ByText" etc except ByName (Which doesn't work, it doesn't find the textbox). 

    Also i used "app.FindName<TextBox>("Password").Text = "xyz";"  But this throws an error saying it cannot find the element.

    Please let me know what I am missing.

  2. Sizy
    Sizy avatar
    2 posts
    Member since:
    Oct 2015

    Posted 05 Oct 2015 in reply to Sizy Link to this post

    Hi, I am sorry, i missed a lot of line i wanted to communicate. 

    I am evaluating Telerik Testing Framework to Automate my test. The page "http://docs.telerik.com/teststudio/testing-framework/write-tests-in-code/silverlight-wpf-automation-wtc/locating-elements" shows that one can use "Automation Id", "ByText" etc but i dont see any of them except ByName (Which doesn't work, it doesn't find the textbox. PFA). 

    Also i used "app.FindName<TextBox>("Password").Text = "xyz";"  But this throws an error saying it cannot find the element.

    Note: my app is build using .XAP Silverlight .

    Please let me know what I am missing.

  3. Ivaylo
    Admin
    Ivaylo avatar
    750 posts

    Posted 07 Oct 2015 Link to this post

    Hello Chandan,

    Yes you can locate elements in Silverlight using the AutomationID and the TextContent.

    Instead of ActiveBrowser.Find you will have to use app.Find.

    Please refer to the screenshot attached for more clarity.

    Regards,
    Ivaylo
    Telerik
     
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings
     
Back to Top