Property - is just a string
Value - can be any widget (drop down or multi select or any custom editor)
While testing the drop down widget (a combo item list, basically), it seems that WindowTester is unable to locate it and hence unable to choose the desired item in it.
Recording generates following snippet:
- Code: Select all
// click desired prop in prop sheet
ui.click(new TreeItemLocator("PropertyName",
new ViewLocator("org.eclipse.ui.views.PropertySheet")));
// bring drop down list
// XXX WindowTester does this by clicking the combo box by the name of then present item value
ui.click(new CComboItemLocator("PropertyDefaultValueDisplayed", new ViewLocator(
"org.eclipse.ui.views.PropertySheet")));
// choose desired value
ui.click(new CComboItemLocator("PropertyCustomValueThatWeWantToChooseInList", new ViewLocator(
"org.eclipse.ui.views.PropertySheet")));
Still, while playing i.e. running test, it fails saying:
- Code: Select all
com.windowtester.runtime.WidgetNotFoundException: Widget NOT Found:
CComboItemLocator("PropertyDefaultValueDisplayed")
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:603)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.internal.UIContextSWT.find(UIContextSWT.java:578)
at com.windowtester.runtime.swt.locator.CComboItemLocator.click(CComboItemLocator.java:62)
at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:172)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:59)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:140)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:325)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:133)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:333)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:126)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:295)
We suspect that this might be because of 2 reasons:
1. The drop down widget itself is not initialized for some reasons, when tool tries to locate that (but however, am able to manually click and see drop down list when test is in progress)
2. We see that the actual drop down editor i.e. combo editor, in our case, is implemented in this way:
- Code: Select all
public class DropdownCellEditor extends ComboBoxCellEditor {
..
..
But this is what we see in javadoc of ComboBoxCellEditor
This class may be instantiated; it is not intended to be subclassed.
Restriction:
This class is not intended to be subclassed by clients.
Attached is the the drop down combo look n feel in prop sheet
Any pointers? Thanks in advance.