fix #1000 TemplateTestCase.getWidgetInstance does not work