Element.Children seems not to return invisble children

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Element.Children seems not to return invisble children

Post by jabelshauser » Wed Jan 30, 2013 10:21 am

Element.Children seems not to return invisble children
Are there any adjustments necessary, e.g. filter ?

Regards Jörg

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Element.Children seems not to return invisble children

Post by Ciege » Wed Jan 30, 2013 4:11 pm

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?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Re: Element.Children seems not to return invisble children

Post by jabelshauser » Thu Jan 31, 2013 8:45 am

yes, Spy show also the invisible children, but in Debugger child-count = 0
see. attached .png
Attachments
invisiblechildren.png
invisiblechildren.png (15.42 KiB) Viewed 1313 times

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Element.Children seems not to return invisble children

Post by Ciege » Thu Jan 31, 2013 4:14 pm

can you post a RanorexSpy snapshot and your line(s) of code making the find call?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Re: Element.Children seems not to return invisble children

Post by jabelshauser » Mon Feb 04, 2013 3:38 pm

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

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: Element.Children seems not to return invisble children

Post by Ciege » Mon Feb 04, 2013 4:22 pm

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...
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Element.Children seems not to return invisble children

Post by Support Team » Tue Feb 05, 2013 2:46 pm

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
.
Image

jabelshauser
Posts: 55
Joined: Thu Aug 23, 2007 12:00 pm

Re: Element.Children seems not to return invisble children

Post by jabelshauser » Wed Feb 06, 2013 12:40 pm

Solution:
Configuration.Current["plugins.msaa.FilterEnabled"] = false;
only necessary in case of invisible children ?!?

Support should give further explanation...

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Element.Children seems not to return invisble children

Post by Support Team » Thu Feb 07, 2013 9:33 am

jabelshauser wrote:Configuration.Current["plugins.msaa.FilterEnabled"] = false;
It looks like you changed that Msaa plugin setting in Spy to "false":
Msaa_Settings.PNG
Msaa_Settings.PNG (60.57 KiB) Viewed 1262 times
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
.
Image