renatoathaydes / Automaton

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

TextFxSelector bug #38

Closed akabachkov closed 8 years ago

akabachkov commented 8 years ago

There is a Bug in implementation of of TextFxSelector.matches. It checks just method name, but not argument existance(SwingUtil.callMethodIfExists( node, 'getText' ) instead of SwingUtil.callMethodIfExists( node, 'getText' ,[])). It easy to reproduce if there is a table on the form and You want to find a component with text: selector. When it comes to TableHeaderRow the next exception arises, because of TableHeaderRow has method getText, but with arguments:

groovy.lang.MissingMethodException: No signature of method: com.sun.javafx.scene.control.skin.TableHeaderRow.getText() is applicable for argument types: () values: [] Possible solutions: getAt(java.lang.String), getClip(), getEffect(), getId(), getParent(), getScene()

renatoathaydes commented 8 years ago

thank you for reporting. If you want, feel free to submit a PR... if not, I can do it.

renatoathaydes commented 8 years ago

Hi.

I had a look and it seems this should not happen in the latest version: 1.3.1-beta.

Could you please confirm whether this problem happens even on this version??

akabachkov commented 8 years ago

Yes, in 1.3.1-beta it works. Thanks.