Different behaviour when telerik studio/telerik framework and the manual click

9 posts, 0 answers
  1. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 23 May 2011 Link to this post

    I am trying to write  automation scrip to verify the silverlight UI .
    I have menu Home when I expand that it will list two items this one works good when i do manually but i use to get the following error when I try to automate using code or  teststudio at this particular step i get the error.

    below is the code and error message.Thanks in advacne for the help
    Note : I have attached the screenshot of the TestStudio.

     

    public void

    menuHome_UIvalidation()

     

     

     

    {

     

     

    FrameworkElement a = this.App.Find.ByTextContent("Home" ); 

     

    a.User.HoverOver();

    a.User.Click();

     

    var menuSubItem_Approvals = this.App.Find.ByTextContent("Approvals");
    Assert.IsTrue(menuSubItem_Approvals.TextContent == "Approvals");

     

    ClassLibrary2.Homepage_Navigation.menuHome_UIvalidation:
    System.ApplicationException : Exception thrown during the wait for a condition. Error: Unexpected error while waiting on condition. Error: ArtOfTest.WebAii.Exceptions.ExecuteCommandException: ExecuteCommand failed!
    InError set by the client. Client Error:
    System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
       at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)
    BrowserCommand (Type:'Silverlight',Info:'NotSet',Action:'NotSet',Target:'ElementId (tagName: 'object',occurrenceIndex: '0')',Data:'{"Method":null,"Property":null,"Reference":null,"Reference2":null,"Type":12,"Value":null}',ClientId:'Client_6405d7ad-8b7b-4492-add5-0cd10e0c8eed',HasFrames:'False',FramesInfo:'',TargetFrameIndex:'-1',InError:'True',Response:'System.Runtime.InteropServices.COMException (0x80004005): Error HRESULT E_FAIL has been returned from a call to a COM component.
       at System.RuntimeType.InvokeDispMethod(String name, BindingFlags invokeAttr, Object target, Object[] args, Boolean[] byrefModifiers, Int32 culture, String[] namedParameters)
       at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
       at System.Type.InvokeMember(String name, BindingFlags invokeAttr, Binder binder, Object target, Object[] args)
       at ArtOfTest.InternetExplorer.JsObjectWrapper.GetProperty(String property)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessSilverlightCommand(BrowserCommand request)
       at ArtOfTest.InternetExplorer.IECommandProcessor.ProcessCommand(WebBrowserClass ieInstance, BrowserCommand request, IHTMLDocument2 document)')
    InnerException: none.

     

        at ArtOfTest.WebAii.Core.Browser.ExecuteCommandInternal(BrowserCommand request)
       at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
       at ArtOfTest.WebAii.Silverlight.SilverlightProxy.ExecuteSLCommand(SilverlightCommand cmd)
       at ArtOfTest.WebAii.Silverlight.SilverlightProxy.GetAllVisualTrees()
       at ArtOfTest.WebAii.Silverlight.SilverlightApp.RefreshVisualTrees()
       at ArtOfTest.WebAii.Silverlight.VisualFind.RefreshRoot()
       at ArtOfTest.WebAii.Silverlight.VisualWait.WaitForExistsByFindInfo(VisualFindInfo findInfo)
       at ArtOfTest.Common.WaitAsync._worker_DoWork[T,V](Object waitParam)

     

     

     

  2. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 24 May 2011 Link to this post

    can someone please give any idea why its happening?
  3. Stoich
    Admin
    Stoich avatar
    1 posts

    Posted 25 May 2011 Link to this post

    Hello Abrar,
        it seems to me that the code you want to use to get the Silverlight application is not correct. Please check out our tutorial on automating Silverlight applications:
    http://www.telerik.com/automated-testing-tools/support/documentation/user-guide/telerik-testing-framework/silverlight-test-automation/introduction.aspx

    It should give you a good idea on how to get started with Silverlight testing with the Telerik Testing Framework.

    All the best,
    Stoich
    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
  4. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 25 May 2011 Link to this post

    Hello Stoich

    Thanks for the reply.

    If i dont find silverlight application then I should not able to login and  click the "Home " in the first place (see attached screen shot).

    I am getting the error message only  after clicking the "Home".So my code identifies the silverlight application.

    Even the automation record tool Teststudio throws the same message (please see the attachment of my previous post).But when I load the application and click manually I am able to expand and see the menu items.

    In between I will have a  look into the link which u send to see If I can find any answers from that.
  5. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 25 May 2011 Link to this post

    Control PanelbarPanel ...? how can I find this in silverlight using WebAii ? because all my RadpanelbarItems are under PanelBarPanel..
  6. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 29 May 2011 Link to this post

    any update on this, are you able to find out ?
  7. Vladislav
    Admin
    Vladislav avatar
    277 posts

    Posted 30 May 2011 Link to this post

    Hello Abrar,

    What version of RadControls for Silverlight you are using?
    We have encountered such issue in the past, caused by the RadPanelBar control, but it is already fixed.
    Can you please try to upgrade your version of the RadControls for Silverlight and let us know if you still experience this issue?

    All the best,
    Vladislav
    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
  8. Abrar
    Abrar avatar
    8 posts
    Member since:
    May 2011

    Posted 30 May 2011 Link to this post

    Thanks for the information provided.

    We are using version Q2 2009.what is the latest version or which version I should upgrade?

    Also please suggest if we upgrade to newer version is there will be any impact other Rad Controls ..?

    Thanks
    Abrar
  9. Vladislav
    Admin
    Vladislav avatar
    277 posts

    Posted 31 May 2011 Link to this post

    Hello Abrar,

    You are using an outdated version of the RadControls for Silverlight. This is why I'd suggest you to try
    our latest official release 2011 Q1 SP1, released on 19 of April.
    Please note, that there are many improvements and bug fixes for most of the RadControls for Silverlight in this version. This is why depending on the scale and the complexity of your project(s), there might be some problems in the process of upgrading your version.

    But we will definitely do our best to assist you during this upgrade and help you with any problem you could encounter.

    Kind regards,
    Vladislav
    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
Back to Top