Hi Alex,
I am doing
Collection<Component> found = robot.finder().findAll(new
ComponentMatcher() {
public boolean matches(Component c) {
if (c instanceof JButton) {
if(((JButton) c).getName() != null){
if(((JButton) c).getName().compareTo
("MY_BUTTON") == 0){
return true;
}
}
}
return false;
}
});
But when I run the test on xvfb
I got an exceptioin :
Test class should have public zero-argument constructor
java.lang.Exception: Test class should have public zero-argument
constructor
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
Caused by: java.lang.NoSuchMethodException: unit.tests.InventairesTest
$1.()
at java.lang.Class.getConstructor0(Class.java:2706)
at java.lang.Class.getConstructor(Class.java:1657)
Thanks,
Olivier
On May 2, 9:15 pm, Alex Ruiz <
alex.ruiz...@gmail.com> wrote:
> Hi Olivier,
>
> ComponentFinder has a method 'findAll' that returns a list of components
> that match search criteria specified in a ComponentMatcher (Monday's release
> includes an overloaded version that takes a GenericComponentMatcher). If no
> components were found, the returned list will be empty without throwing
> exceptions.
>
> Use the method 'finder' in a FEST robot to obtain a ComponentFinder.
>
> Regards,
> -Alex
>