Page 1 of 1

Unable to access child elements in Treeview control

Posted: Tue Dec 27, 2016 6:59 am
by sagargurao
Hi,

I am trying to access the child elements of a treeview control in a silverlight based application. The Ranorex application version is 4.1.

As long as the Parent elements in treeview control are inside the visiable/viewable area, I am able to identify the child elements individually, however, the problem starts as soon as the parent control goes out of the visible/viewable of the screen, I am not able to identify the individual child elements.

I am using following code to identify the element/s.

Code: Select all

Tree DimensionTree=".//object[#'AppSilverlightControl']/form[@name='Silverlight Control']/form[@classname='Popup']/?/?/tree[@automationid='DimensionsTree']";
TreeItem Measures=DimensionTree.Element.Children[0].Children[4];
foreach(Element eleChild in Measures.Element.Children)
        					{
        						try
        						{
        						Text txtMeasure=(Text)eleChild.Children[3];
        						txtMeasure.Focus();
        						if(txtMeasure.Caption.ToString().Equals(RetroMeasure))
        						{
        							Element MeasuresDropArea=".//object[#'AppSilverlightControl']/form[@name='Silverlight Control']/form[@classname='Popup']/?/?/element[@name='MeasuresDropArea' and @classname='FieldsDropAreaControl']";
		        					txtMeasure.Click();
		        					Mouse.ButtonDown(WinForms.MouseButtons.Left);
		        					Mouse.MoveTo(MeasuresDropArea);
		        					Mouse.ButtonUp(WinForms.MouseButtons.Left);
		        					found=true;
		        					break;
        						}
        						}
        						catch(Exception e)
        						{
									DimensionTree.Focus();
									Mouse.MoveTo(DimensionTree);
									Keyboard.Press("{Down}");
        						}
        					}
Ranorex snapshots are also attached for the reference. TreeView1.rxsnp file contains the child element snapshot when parent nodes are visible on the screen. Whereas TreeView2.rxsnp file contains snapshot of treeview control when the parent nodes are not visible.

Any help will be appreciated.

Re: Unable to access child elements in Treeview control

Posted: Tue Dec 27, 2016 3:03 pm
by krstcs
As has been stated in a previous thread, you must update your Ranorex version to a supported version if you want support. Currently 6.1.1 and 6.2.0 are the only supported versions.

Ranorex 4.1 is outdated and no longer supported.

Re: Unable to access child elements in Treeview control

Posted: Tue Jan 03, 2017 10:48 am
by sagargurao
I downloaded and installed the latest trial version of Ranorex (v.6.2.0). However, the problem still persists.

As long as the Parent elements in treeview control are inside the visiable/viewable area, I am able to identify the child elements individually, however, the problem starts as soon as the parent control goes out of the visible/viewable of the screen, I am not able to identify the individual child elements.

Any suggestion??

Also, attaching the snapshots from latest version of Ranorex.

Re: Unable to access child elements in Treeview control

Posted: Mon Jan 09, 2017 2:54 pm
by Support Team
Hi sagargurao,
Unfortunately, I'd need additional information about the application under test. I think the best way to analyze this in more detail would be having a short remote session.
May I ask you if you could get in touch with me by email ([email protected]).

Regards,
Markus (S)