Unable to access child elements in Treeview control

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
sagargurao
Posts: 10
Joined: Mon May 16, 2016 7:49 am

Unable to access child elements in Treeview control

Post by sagargurao » Tue Dec 27, 2016 6:59 am

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.
You do not have the required permissions to view the files attached to this post.

krstcs
Posts: 2683
Joined: Tue Feb 07, 2012 4:14 pm
Location: Austin, Texas, USA

Re: Unable to access child elements in Treeview control

Post by krstcs » Tue Dec 27, 2016 3:03 pm

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.
Shortcuts usually aren't...

sagargurao
Posts: 10
Joined: Mon May 16, 2016 7:49 am

Re: Unable to access child elements in Treeview control

Post by sagargurao » Tue Jan 03, 2017 10:48 am

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.
You do not have the required permissions to view the files attached to this post.

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Unable to access child elements in Treeview control

Post by Support Team » Mon Jan 09, 2017 2:54 pm

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)