Behavior of Java Tree Children has changed

Bug reports.
User avatar
REB
Posts: 3
Joined: Fri Nov 21, 2014 2:48 pm

Behavior of Java Tree Children has changed

Post by REB » Fri Nov 21, 2014 3:31 pm

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. :?
Attachments
Variables.jpg
Shows that reading from the Tree returns the children and that reading from TreeInfo doesn't
Variables.jpg (136.48 KiB) Viewed 1606 times

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

Re: Behavior of Java Tree Children has changed

Post by Support Team » Mon Nov 24, 2014 4:20 pm

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

User avatar
REB
Posts: 3
Joined: Fri Nov 21, 2014 2:48 pm

Re: Behavior of Java Tree Children has changed

Post by REB » Mon Nov 24, 2014 4:29 pm

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

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

Re: Behavior of Java Tree Children has changed

Post by Support Team » Mon Nov 24, 2014 4:34 pm

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

User avatar
REB
Posts: 3
Joined: Fri Nov 21, 2014 2:48 pm

Re: Behavior of Java Tree Children has changed

Post by REB » Mon Nov 24, 2014 5:04 pm

Marcus,
Please find the Snapshots attached.
Attachments
Ranorex 4.0.5 PS_new_HelperFiles.zip
Created in July with 4.0.5
(4.26 MiB) Downloaded 70 times
Ranorex 5.2 Problem with Tree Item Children.zip
Created Nov with 5.2
(1.6 MiB) Downloaded 72 times

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

Re: Behavior of Java Tree Children has changed

Post by Support Team » Wed Nov 26, 2014 4:17 pm

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