Null control ids in SWTBot [message #991087] |
Mon, 17 December 2012 05:36  |
Eclipse User |
|
|
|
One page in my RCP application contains custom composite
public class LocationComposite extends Group {
...
}
And I have some controls in it.
When I test my application with SWTBot
I could find all controls in by their IDs
except situation when control belongs to this custom LocationComposite
Within LocationComposite I have for example:
сheckBox = new Button(this, SWT.CHECK);
сheckBox.setData("ID", "сheckBox");
//сheckBox.setData("id", "сheckBox"); also the same result
сheckBox.setToolTipText("tooltip");
And in Tests:
SWTWorkbenchBot bot = new SWTWorkbenchBot();
...
//then find view, contains LocationComposite and in this wiew:
bot.checkBox().click(); //this works!
bot.checkBoxWithTooltip("tooltip"); //this also works!
bot.checkBox().getId(); //returns null
bot.checkBoxWithId("checkBox");// throws org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundException
|
|
|
|
Powered by
FUDForum. Page generated in 0.14884 seconds