In WindowTester version 4.0, we are trying to select a swing button on an SWT dialog. We have named the button with setName("removeButton"). Using the WindowTester recorder gave us no code when clicking on this swing button. Our first attempt at using a Swing widget locator looks something like this (the arrowed line). The previous four lines were an additional attempt to use mouse hover to possibly get the button click to succeed.
ui.mouseMove(new XYLocator(new NamedWidgetLocator("SAComposite"), 200, 200));
ui.mouseMove(new XYLocator(new NamedWidgetLocator("SAComposite"), 100, 100));
IUIContext uiSwing = (IUIContext) ui.getAdapter(UIContextSwing.class);
----> uiSwing.click(new com.windowtester.runtime.swing.locator.NamedWidgetLocator("removeButton"));
This results in the following error:
com.windowtester.runtime.WidgetNotFoundException: Component not found NamedWidgetLocator("removeButton"):
The button does not have a label, only an image.
Any experience selecting Swing buttons with WindowTester 4.0 would be greatly appreciated.