Coded UI Silverlight - Locate elements - Handed Coded UI RRS feed

  • Question

  • Hello , 

    I am learning to automate Silverlight Apps using handed Coded UI,  I am really new to this world of automation and I have minimum knowledge about software development... 

    I have already automated some html apps using selenium IDE and Coded UI... And everything was going fine.. but when it comes to silverlight its very dificulty to me...

    I am using a software called silverlight spy by First Floor  to identify objects... but I am find that the objects in the app i am automating don't have any Automation  properties... ( AcceleratorKey, AccessKey,Automation ID... etc).   

    This is the code i am using for automation with silverligh is:

    I have already installed Miscrosoft Visual Studio Feature Pack 2


    using System;
    using System.Collections.Generic;
    using System.Text.RegularExpressions;
    using System.Windows.Input;
    using System.Windows.Forms;
    using System.Drawing;
    using Microsoft.VisualStudio.TestTools.UITesting;
    using Microsoft.VisualStudio.TestTools.UnitTesting;
    using Microsoft.VisualStudio.TestTools.UITest.Extension;
    using Microsoft.VisualStudio.TestTools.UITest.Common;
    using Microsoft.VisualStudio.TestTools.UITest.Extension.Silverlight;
    using Microsoft.VisualStudio.TestTools.UITesting.SilverlightControls;
    using Keyboard = Microsoft.VisualStudio.TestTools.UITesting.Keyboard;
    using Microsoft.VisualStudio.TestTools.UITesting.HtmlControls;
    using Mouse = Microsoft.VisualStudio.TestTools.UITesting.Mouse;

                 SilverlightTabItem textbox = new SilverlightTabItem(browser);
              textbox.TechnologyName = "Silverlight";
              textbox.SearchProperties.Add(SilverlightTabItem.PropertyNames.ControlType, "TextBlock");

    I have to know if i am using the requied references to automate silverlight , and if

    that is the way to localte an object...

    I am trying to click a textbox , in the silverlight spy this element appears like a Grid > Border> TextBoxView,  but the object doesn't have any automation identification..  the only I know is that the only propertie available is  type: TextBlock.

    this is very confusing,   can i have some advises?

    Friday, June 7, 2013 8:39 PM