1

I have a shell in which there is a tree inside a Composite. I want to click on a particular cell of the tree. When I try to record the Actions, it is not giving the proper recordings, so I want to do it manually.

Please see the snapshot attached and the location where I want to click for example.

This is the Error coming after recording

WARNING: unsupported widget selection ignored - Widget Selection event: null

Please help me as I am not good with Eclipse and it's kind of important for our project. Thanks a lot.

enter image description here

dda
  • 6,030
  • 2
  • 25
  • 34
user1344022
  • 193
  • 2
  • 3
  • 10

1 Answers1

0

You can do this manually in your test code by writing:

// first click on the item to ensure it is visible in the scrolled view
TreeItemLocator itemLocator = new TreeItemLocator("/tree/path/to/File");
getUI().click(itemLocator);

// then you can access the tree cell (columns are zero-based
TreeItemLocator cellLocator = SWTLocators.treeCell(itemLocator.getPath())).at(SWTLocators.column(4);
getUI().click(cellLocator);

Of course, you could import static com.windowtester.runtime.swt.locator.SWTLocators.* to make the code more readable.

Stefan Winkler
  • 3,871
  • 1
  • 18
  • 35