Page 1 of 1

TreeItem.Expand does not work correctly

Posted: Wed Apr 20, 2016 4:20 pm
by besagon
Hi

I am automating Eclipse and faced with next problem:
When "Use Java SWT legacy automation mode" is true then everything works fine, but if false then expand method expands tree item but does not show its children. Child elements requested dynamically from server after parent expanded.

Re: TreeItem.Expand does not work correctly

Posted: Thu Apr 21, 2016 1:15 pm
by Support Team
Hello besagon,

Unfortunately, there is a known issue which could cause such behavior. I would like to double-check if you have the same issue:

1) Please try closing Ranorex Studio and all Ranorex Tools
2) After that, please open Eclipse and navigate to the tree items
3) Open Ranorex Spy and try tracking the elements

Please let me know the result after doing the above-mentioned steps.

Thank you in advance.

Sincerely,
Johannes

Re: TreeItem.Expand does not work correctly

Posted: Thu Apr 21, 2016 1:38 pm
by besagon
I repeated your steps and still TreeItem.Expand() method does not expand node correctly (calling Expand() does not start to fetch child elements from the server).
Also I found that TreeItem.Select() works in different way in comparison to "Use Java SWT legacy automaion mode=true" and "Use Java SWT legacy automaion mode=false". In first case it selects some node but other selected nodes are still selected, in second case Select() method firstly unselects all nodes and then selects target node.
Different behavior of methods in different modes cause many problems. F.e. I have large method that does thee navigation and when I switch to "Use Java SWT legacy automaion mode=false" it stops working and I should change my code...

If this is known issues, please tell me when they will be fixed and how I can track this.

Re: TreeItem.Expand does not work correctly

Posted: Fri Apr 22, 2016 12:57 pm
by Support Team
Hello besagon,

The above-mentioned bug is slightly different from the issue you are having.

I added the issue concerning the Expand() method to our internal bug-tracking system. Currently, we do not know if and when this bug will be fixed. This depends on various factors. Nevertheless, all reported bugs and feature requests are documented in the release notes, with every new version release of Ranorex.

As a workaround you could try using a DoubleClick action to expand the tree item.

The Select() method in the Java plugin was implemented this way by design. Please note that the Java SWT plugin is basically different from the legacy mode and can't be compared in every aspect.

Thank you for your understanding.

Sincerely,
Johannes