I have an issue with drag and drop from a tree view into a canvas.
The following code illustrates what I do:
- Code: Select all
ui.click(new TreeItemLocator("root/node/node", ..);
ui.dragTo(new FigureCanvasXYLocator(x, y));
If the tree is collapsed, the click command will expand the tree and the drag and drop is successful.
The second time I run the code, then the tree is already expanded, and the click command will scroll the tree view horizontal to center the tree node. Note: the tree view is not wide enough to show the whole tree node.
Now the dragTo command fails, because it will move the cursor to the start position of the tree node - which is not visible because the view has been scrolled horizontal, so the cursor is moved outside
the tree view.
I could of cause solve it by scrolling the tree view, but I guess the dragTo command should be clever enough to handle this.
I'm running the test on Linux.