Page 1 of 1

Element.Children seems not to return invisble children

Posted: Wed Jan 30, 2013 10:21 am
by jabelshauser
Element.Children seems not to return invisble children
Are there any adjustments necessary, e.g. filter ?

Regards Jörg

Re: Element.Children seems not to return invisble children

Posted: Wed Jan 30, 2013 4:11 pm
by Ciege
Does RanorexSpy show element children that are not visible? Possibly your non visible elements are descendants and not children?
Can you post a RanorexSpy snapshot of your AUT and point out which non visible children are not being returned by your children find?

Re: Element.Children seems not to return invisble children

Posted: Thu Jan 31, 2013 8:45 am
by jabelshauser
yes, Spy show also the invisible children, but in Debugger child-count = 0
see. attached .png

Re: Element.Children seems not to return invisble children

Posted: Thu Jan 31, 2013 4:14 pm
by Ciege
can you post a RanorexSpy snapshot and your line(s) of code making the find call?

Re: Element.Children seems not to return invisble children

Posted: Mon Feb 04, 2013 3:38 pm
by jabelshauser
simplified code:
Element el_row = table.Children; //returns an invisible row and should have some also invisible cells
el_row.Children.Count // = 0 -> but el_row has invisible Children (cells)

Here you can download the snapshot:
http://dl.dropbox.com/u/27488736/gridControl.rxsnp

table: ../gridSegmentConfMeasurements/../gridcontrol
row: Codia row1
Cell: Label


thanks in advance
Jörg

Re: Element.Children seems not to return invisble children

Posted: Mon Feb 04, 2013 4:22 pm
by Ciege
Bummer, I can't open that Snapshot... I really need to get around to updating my Ranorex installation...
Maybe support can chime in here until I get Ranorex installation updated...

Re: Element.Children seems not to return invisble children

Posted: Tue Feb 05, 2013 2:46 pm
by Support Team
Hello Jörg,

I have seen, that you are using a HelperClass to get the element in your code.
Would you please try to use the RxPath to get the row?
Maybe there is something missing in your HelperClass.
Example:
Row row = "/form[@controlname='ContainerForm']//element/table/row[@accessiblename='Codia row 1']";
Ranorex.Report.Info("Rows: " + row.Children.Count.ToString());
Do you also get a the same value for the counter?

Regards,
Bernhard

Re: Element.Children seems not to return invisble children

Posted: Wed Feb 06, 2013 12:40 pm
by jabelshauser
Solution:
Configuration.Current["plugins.msaa.FilterEnabled"] = false;
only necessary in case of invisible children ?!?

Support should give further explanation...

Re: Element.Children seems not to return invisble children

Posted: Thu Feb 07, 2013 9:33 am
by Support Team
jabelshauser wrote:Configuration.Current["plugins.msaa.FilterEnabled"] = false;
It looks like you changed that Msaa plugin setting in Spy to "false":
Msaa_Settings.PNG
This is a per machine setting and if you change it on one machine, you also need to import the settings on the machine running the test. Alternatively, you can change the setting in code as you did:
Ranorex.Plugin.MsaaFlavor.Instance.FilterEnabled = false;
A similar setting to filter invisible Msaa elements existed in Ranorex 1.X (Element.IgnoreInvisible).

Regards,
Alex
Ranorex Team