Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Automated Testing and WebUI Test Studio > Telerik Testing Framework > Extended Silverlight RadControls
These forums are read-only and serve as an archive for the previous versions of WebUI Test Studio.
For the current forums please go to the Automated Testing and WebUI Test Studio Forums

Not answered Extended Silverlight RadControls

Feed from this thread
  • Larah Chris avatar

    Posted on Jun 18, 2010 (permalink)

    Hi Team,

     According to the telerik blogs here, the WebAii Testing Framework support extended silverlight RadControls.
     So in the silverlight side, I extended the RadWindow Control, it's seems something like this :
    using Telerik.Windows.Controls;  
    public class STWindow : RadWindow  
    {   
        ....  

    I use it in the xaml file:
    <extended:STWindow x:Name="Alert" ../> 

    Then, in the testing side, I override the RadWindow control mappings like this :
    private void RegisterExtendedFrameworkElement()  
    {            
      MappingsCollection STWindow = new MappingsCollection();  
      STWindow.Add(RadControlMappingKeys.WindowKey, "STWindow");  
      Manager.RegisterMappingsOverride(STWindow, typeof(RadWindow));  

    Finally, in the test method I want to locate my extended RadWindow so I do this :
    [TestMethod]  
    public void RadWindowTest()  

      //click on the button who open the STWindow 
      RadWindow stwindowRad app.Find.ByType<RadWindow>();
      ...

    So the stwindowRad is null

    could I forget to do something?

    thanks in advance
    Larah

    Reply

  • Nelson Sin Nelson Sin admin's avatar

    Posted on Jun 21, 2010 (permalink)

    Hi Larah,

    Thanks for the post, we're looking at the problem and will get back to you with anything we find.

    Greetings,
    Nelson
    the Telerik team
     
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Nelson Sin Nelson Sin admin's avatar

    Posted on Jul 30, 2010 (permalink)

    Hi again Larah,

    I apologize for the very late reply, I missed the notice to suggest the latest WebUI Build here to try to address this problem. I'm also opening this issue up to the forums just in case anyone else may run into this problem.

    Kind regards,
    Nelson
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items

    Reply

  • Karthik avatar

    Posted on May 2, 2012 (permalink)

    Hi,

    I am using the WebAii test framework for the first time and I am trying the approach mentioned above. I am getting an exception. Part of the message is as shown below:

    ....  System.NullReferenceException : Object reference not set to an instance of an object.
        at Telerik.WebAii.Controls.Xaml.RadComboBox.ToggleDropDown()
        at Telerik.WebAii.Controls.Xaml.RadComboBox.SelectItem(String itemText, Boolean openDropDown)


    I am trying to select an item from a custom Telerik.Window.Controls.RadComboBox using WebAii wrappers. The Testing Framework version I am using is 2011.2.1117.0.

    Any help is appreciated.

    Thanks.

    Reply

  • Anthony Anthony admin's avatar

    Posted on May 3, 2012 (permalink)

    Hello Karthik,

    The following code worked for me against this Telerik demo site:

    SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
    Telerik.WebAii.Controls.Xaml.RadComboBox cb = app.Find.ByAutomationId<Telerik.WebAii.Controls.Xaml.RadComboBox>("TechnologySelection");
    Assert.IsNotNull(cb);
     
    cb.SelectItem("Silverlight", true);

    If you prefer Visual Basic, use our code converter.

    Greetings,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings

    Reply

  • Karthik avatar

    Posted on May 3, 2012 (permalink)

    Thanks for the response.

    The code you suggested above works if the silverlight app uses RadComboBox and I try to access it using the method you suggested.

    However, I was describing a scenario where I have a custom combo box say AlphaComboBox which extends RadComboBox that I am using in a silverlight application. If I wanted to find this thru WebAii wrappers for testing, how would I do this? I tried the approach that was suggested above by Larah, and I got the exception I posted above.


    Thanks.

    Reply

  • Anthony Anthony admin's avatar

    Posted on May 3, 2012 (permalink)

    Hello Karthik,

    I found the new location of the blog post mentioned in the original posting. If you follow the approach outlined there and continue to have difficulty, please provide a code sample that demonstrates the issue, preferably against a public site so we can test it directly.

    All the best,
    Anthony
    the Telerik team
    Quickly become an expert in Test Studio, check out our new training sessions!
    Test Studio Trainings

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Automated Testing and WebUI Test Studio > Telerik Testing Framework > Extended Silverlight RadControls
Related resources for "Extended Silverlight RadControls"

WebAii Framework Features  |  Documentation |  Videos  |  Webinars  |  Automated Testing Tools  ]