Sorry for this simple question, but I didn't find any answer or example in the documentation...
I'm using NamedWidgetLocator to locate widgets on dialogs and I want to know what is the best way to get the corresponding ButtonLocator, ComboLocator, ... locators to use the implemented interfaces provided by each sub classes of SWTWidgetLocator.
Suppose for example, that I know that my NamedWidgetLocator should locate a button :
1- How could I call the isSelected method provided by the IsSelected interface implemented by the ButtonLocator class? or I could I get a buttonLcator instance using the NamedWidgetLocator?
- Code: Select all
NamedWidgetLocator widgetLocator = new NamedWidgetLocator("widgetName");
ButtonLocator buttonLocator = widgetLocator.??????
ui.assertThat(buttonLocator.isSelected());
2- Should I use the getAdapters methods to retrieve the IsSelected interface ? How?
- Code: Select all
// Example that doesn't work
IsSelected selectableItem = (IsSelected) widgetLocator .getAdapter(IsSelected.class);
3- Could I use the IsSelectedCondition with NamedWidgetLocator ? How?
Vincent