This is a migrated thread and some comments may be shown as answers.

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

8 Answers 156 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abrar
Top achievements
Rank 1
Abrar asked on 23 May 2011, 05:58 AM
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)

 

 

 

8 Answers, 1 is accepted

Sort by
0
Abrar
Top achievements
Rank 1
answered on 24 May 2011, 07:31 AM
can someone please give any idea why its happening?
0
Stoich
Telerik team
answered on 25 May 2011, 02:48 PM
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
0
Abrar
Top achievements
Rank 1
answered on 26 May 2011, 01:28 AM
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.
0
Abrar
Top achievements
Rank 1
answered on 26 May 2011, 04:05 AM
Control PanelbarPanel ...? how can I find this in silverlight using WebAii ? because all my RadpanelbarItems are under PanelBarPanel..
0
Abrar
Top achievements
Rank 1
answered on 30 May 2011, 12:36 AM
any update on this, are you able to find out ?
0
Vladislav
Telerik team
answered on 30 May 2011, 01:01 PM
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
0
Abrar
Top achievements
Rank 1
answered on 31 May 2011, 12:52 AM
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
0
Vladislav
Telerik team
answered on 31 May 2011, 02:09 PM
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
Tags
General Discussions
Asked by
Abrar
Top achievements
Rank 1
Answers by
Abrar
Top achievements
Rank 1
Stoich
Telerik team
Vladislav
Telerik team
Share this question
or