Page 1 of 1

Behavior of Java Tree Children has changed

Posted: Fri Nov 21, 2014 3:31 pm
by REB
I just upgraded from 4.1 to 5.2 and am seeing a difference in how the Java Tree attribute "children" is validated.
I am unable to load the Spy Snapshot as it is over 1MB (Zipped)

So here is the output from the original test created using 4.1
01:09.629 Info Validation (Optional Action)
Validating AttributeEqual (children=$task_child_Order) on item 'Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.Tasks'.
01:09.692 Success Validation Attribute 'children' of element for item 'Smoke_TestRepository.Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.Tasks' does match the specified value.

and here is the output from the same test run using 5.2.0.20272
00:55.516 Info Validation (Optional Action)
Validating AttributeEqual (children=$task_child_Order) on item 'Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.Tasks'.
00:55.545 Failure Validation Attribute 'children' of element for item 'Smoke_TestRepository.Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.Tasks' does not match the specified value (actual='[2, 0, 1, 4, 3]', expected='(null)').

No changes were made in the code. I find it interesting that the "expected" (Which is passed by a variable from a spreadsheet) is a '(null)'.

I can see the value I want to compare in Spy at
/form[@title~'^Productivity\ Suite\ Progra']/container[@type='ContentContainer']/container[@type='MainContainer']//container[@name='DockedHiddenContainer']/container[@type='ContainerContainer']/?/?/container[@name='a']/container[@type='ContainerContainer']/container[1]/?/?/element[@name='Task Management']/?/?/container[@name='null.layeredPane']/container[@name='null.contentPane']//container[@name='viewport']/tree[@name='i']/?/?/treeitem[@text='Tasks']
Children [2, 0, 1, 4, 3]

Troubleshooting on this end, I converted the Test Step into User Code and stepped into it to verify the variable is being passed, exists and contains the correct data. In this case "[2, 0, 1, 4, 3]"
This is the code
try {
                Report.Log(ReportLevel.Info, "Validation", "(Optional Action)\r\nValidating AttributeEqual (children=$task_child_Order) on item 'Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.Tasks'.", repo.Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.TasksInfo, new RecordItemIndex(4));
                Validate.Attribute(repo.Productivity_Suite.ProductivitySuiteProgrammingSoftware.DockedHiddenContainer1.Task_Management_Objects.Tm_Task_Tree_Items.TasksInfo, "children", task_child_Order, Validate.DefaultMessage, false);
                Delay.Milliseconds(0);
            } catch(Exception ex) { Report.Log(ReportLevel.Warn, "Module", "(Optional Action) " + ex.Message, new RecordItemIndex(4)); }
Then I modified the code to read from the Tree. If I read from TreeInfo as noted above the list is empty and I do not see the Children. If instead read from the Tree item itself I can see the list of Children.

This leads me to believe there is a problem with the implementation of the Tree object in this version of Ranorex. Our Java version has not changed and we install Java with our executable into it's own folder apart from the usual Java home.

Now instead of looking at all of the children all at once, I need to modify my code to iterate through the list and re-create what worked so well before, or revert back to 4.1 and continue as before. :?

Re: Behavior of Java Tree Children has changed

Posted: Mon Nov 24, 2014 4:20 pm
by Support Team
Hi REB,

It is very hard to remotely analyze such issues, may I therefore ask you to send us more information including the snapshot files to [email protected]? Would it also be possible to grant us access to your applicaiton under test?

Please don't forget to add your Customer ID (Invoice Number) to your email, thanks :)!

Thanks,
Markus

Re: Behavior of Java Tree Children has changed

Posted: Mon Nov 24, 2014 4:29 pm
by REB
Hey Markus,
The information requested (Snapshot) was attached to a Support Query on Friday afternoon. I will wait for Support to contact me for the next steps.

Thank You

Re: Behavior of Java Tree Children has changed

Posted: Mon Nov 24, 2014 4:34 pm
by Support Team
Hi Ray,

We have the email but there wasn't a snapshot attached, could you please also send us the snapshots?
One created with 4.1 and one created with 5.2?

Thanks,
Markus

Re: Behavior of Java Tree Children has changed

Posted: Mon Nov 24, 2014 5:04 pm
by REB
Marcus,
Please find the Snapshots attached.

Re: Behavior of Java Tree Children has changed

Posted: Wed Nov 26, 2014 4:17 pm
by Support Team
Hi Ray,

Thanks for the snapshots!
I am currently analyzing the issue with your applicaiton on my machine.
I will get back to you as soon as I know more about the issue.

Regards,
Markus