renatoathaydes / Automaton

Simple framework which allows the testing of Swing and JavaFX2 applications.
Apache License 2.0
99 stars 20 forks source link

With automaton 1.3.2 can not click on an item of a table but with version 1.2.3 it works fine. #49

Open jjdsg opened 8 years ago

jjdsg commented 8 years ago

We have a table with different columns. We create an item and refreshed the table to show the information of the item. We then try to do a right click in the item to show a contextual menu. In version 1.0 of Automaton (also tested with 1.2.3) we locate the item by searching for the text of the column in the screen. However, with the version 1.3.2 the item is not found and our test crashes. The error message is GuiItem not found.

This table is inside a Frame and not inside a Dialog, but we don't think that this could be the problem.

renatoathaydes commented 8 years ago

Hi @jjdsg , Sorry but I cannot reproduce this problem. Look at the test I wrote (commit link ). Can you provide a failing test (maybe modify my test and submit a PR)?

renatoathaydes commented 8 years ago

If you are using Swing-Selectors to select components, perhaps you just need to refresh the cache after you change the table. See the docs.

jjdsg commented 8 years ago

With version 1.2.3, I can do a FakeComponent.getLocationOnScreen(). It returns a valid Point but with version 1.3.2 with the same code it throws an IllegalComponentStateException. Any idea?, I think that something has change between both versions finding the components inside a table...