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

Combobox thrown an exception

1 Answer 18 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Nazar
Top achievements
Rank 1
Nazar asked on 29 Oct 2013, 01:34 PM
Hello, 

Could you please take a look on the following issue: Telerik Testing framework cannot work with ComboBox. On code:

Elements.ComboBox_Relation.ToggleDropDown();

Exception is thrown: 
Failure Information: 
~~~~~~~~~~~~~~~
Was not able to match a segment within the path. Expected:canvas , Found:FrameworkElement , Path:/popup:-1:7478741/canvas:0:199809/browserwindowpresenter:1:25639961/popupwindow:0:29433063/grid:0:41527260/contentcontrol:2:34025648/contentpresenter:0:13531482/grid:0:54674477/contentcontrol:1:61729402/contentpresenter:0:31325900/grid:0:13497647/scrollviewer:0:29690827/border:0:37736931/grid:0:41475694/scrollcontentpresenter:0:54369966/contentcontrol:0:4088064/contentpresenter:0:36792583/addpartieswizardview:0:62697791/grid:0:29689838/contentcontrol:0:48941135/contentpresenter:0:22660844/addpartiesselectionview:0:2621005/grid:0:2807653/gridview:3:7768501/border:0:35471519/grid:0:11397820/scrollviewerwithactionbutton:5:55129473/grid:0:22986004/scrollcontentpresenter:6:62206324/gridviewvirtualizingpanel:0:51627108/gridviewrow:0:63849983/border:0:11181736/selectivescrollinggrid:0:16155496/detailspresenter:9:51737965/border:0:57655996/border:0:49141917/contentpresenter:0:39624072/radrowdetailswithbuttons:0:21072335/stackpanel:0:57162270/contentpresenter:0:66741197/border:0:63799869/grid:0:43688924/watermarkedcombobox:7:6599579 
InnerException:
System.Exception: Was not able to match a segment within the path. Expected:canvas , Found:FrameworkElement , Path:/popup:-1:7478741/canvas:0:199809/browserwindowpresenter:1:25639961/popupwindow:0:29433063/grid:0:41527260/contentcontrol:2:34025648/contentpresenter:0:13531482/grid:0:54674477/contentcontrol:1:61729402/contentpresenter:0:31325900/grid:0:13497647/scrollviewer:0:29690827/border:0:37736931/grid:0:41475694/scrollcontentpresenter:0:54369966/contentcontrol:0:4088064/contentpresenter:0:36792583/addpartieswizardview:0:62697791/grid:0:29689838/contentcontrol:0:48941135/contentpresenter:0:22660844/addpartiesselectionview:0:2621005/grid:0:2807653/gridview:3:7768501/border:0:35471519/grid:0:11397820/scrollviewerwithactionbutton:5:55129473/grid:0:22986004/scrollcontentpresenter:6:62206324/gridviewvirtualizingpanel:0:51627108/gridviewrow:0:63849983/border:0:11181736/selectivescrollinggrid:0:16155496/detailspresenter:9:51737965/border:0:57655996/border:0:49141917/contentpresenter:0:39624072/radrowdetailswithbuttons:0:21072335/stackpanel:0:57162270/contentpresenter:0:66741197/border:0:63799869/grid:0:43688924/watermarkedcombobox:7:6599579 
   at ArtOfTest.WebAii.Silverlight.VisualFind.ByReference(AutomationReference reference, Boolean throwIfNotFound)
   at ArtOfTest.WebAii.Silverlight.FrameworkElement.Refresh()
   at Telerik.WebAii.Controls.Xaml.RadComboBox.ToggleDropDown()
   at Telerik.WebAii.Design.Translators.Xaml.ComboBox.ComboToggleDropDownAction.Execute(IApplication appHost)
   at ArtOfTest.WebAii.Design.Extensibility.XamlActionDescriptor.Execute(IAutomationHost autoHost)
   at ArtOfTest.WebAii.Design.Execution.ExecutionEngine.ExecuteStep(Int32 order)

1 Answer, 1 is accepted

Sort by
0
Mario
Telerik team
answered on 01 Nov 2013, 05:07 PM
Hello Nazar,

Thank you for contacting Telerik Support.

What kind of ComboBox control are you testing against? I was not able to reproduce such an issue in my local environment against our public samples. Are you able to reproduce the behavior against our Silverlight demos?

The exception you are getting, the path or logic to find this control may not be correct at the moment you call to ToggleDropDown(). As a result, instead finding canvas it finds a FrameworkElement. One thing you can try is to call the RefreshVisualTrees() method of the app right before the ComboBox.ToggleDropDown() method.

If my suggestion does not help and you are not able to reproduce such behavior against our demo, please provide us with direct access to your application along with a copy of your framework test. If direct access is not possible (eg. app is local and/or private), we can instead attempt to "simulate" your app through a captured Fiddler trace which you can also attach to this ticket in a zip. If you are unfamiliar with how to create one, this link will provide you with step-by-step instructions for download and use. Alongside the previous instructions, please make sure to enable the 'Store binaries' and 'Decrypt HTTPS traffic' options prior to starting the capture.

Thank you for helping us advise you.


Regards,
Mario
Telerik
Quickly become an expert in Test Studio, check out our new training sessions!
Test Studio Trainings
Tags
General Discussions
Asked by
Nazar
Top achievements
Rank 1
Answers by
Mario
Telerik team
Share this question
or