I had the following issue:
- I'm able to get what looks to be a valid "regular expression" to capture a tree element but upon execution of the test, I get a failure (WidgetNotFound exception). The regular expression looks to be correct to me and as you can see in the stack trace it is identifying the item I'm trying to get access to in the tree (Item in bold and given item list contains the item in Bold) - I'm not sure what the issue is as the node name contains a "/" so I have to use the //// to escape to give the exact string name of the tree item - any suggestions? :
Thanks!
- Code: Select all
ui.click(new TreeItemLocator("myMdaService/src\\\\/main\\\\/resources",
new ViewLocator("org.eclipse.jdt.ui.PackageExplorer")));
com.windowtester.runtime.WidgetNotFoundException: com.windowtester.swt.WidgetNotFoundException: Item: [src/main/resources] not found in item list:
[JRE System Library [jre1.5.0_06]]
[Plug-in Dependencies]
[src/main/resources]
[src/main/java]
[src/generated/java]
[src/generated/resources]
[META-INF]
[src]
[build.properties]
[pom.xml]
at com.windowtester.swt.WidgetNotFoundException.getAdapter(WidgetNotFoundException.java:40)
at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:181)
at com.windowtester.internal.runtime.selector.ClickHelper.click(ClickHelper.java:65)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:82)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:293)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:75)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:301)
at com.windowtester.internal.runtime.UIContextCommon.click(UIContextCommon.java:68)
at com.windowtester.runtime.swt.internal.UIContextSWT.click(UIContextSWT.java:284)
at com.intuit.dpt.modeleditor.uitests.NavigateToModeldiFile.testNavigateToModeldiFile(NavigateToModeldiFile.java:29)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at junit.framework.TestCase.runTest(TestCase.java:164)
at junit.framework.TestCase.runBare(TestCase.java:130)
at com.windowtester.runtime.common.UITestCaseCommon.access$001(UITestCaseCommon.java:25)
at com.windowtester.runtime.common.UITestCaseCommon$2.run(UITestCaseCommon.java:136)
at com.windowtester.runtime.common.UITestCaseCommon$3.run(UITestCaseCommon.java:157)
at com.windowtester.internal.runtime.junit.core.SequenceRunner$1.run(SequenceRunner.java:46)
Caused by: com.windowtester.swt.WidgetNotFoundException: Item: [src/main/resources] not found in item list:
[JRE System Library [jre1.5.0_06]]
[Plug-in Dependencies]
[src/main/resources]
[src/main/java]
[src/generated/java]
[src/generated/resources]
[META-INF]
[src]
[build.properties]
[pom.xml]
at com.windowtester.event.selector.swt.TreeItemSelector2.click(TreeItemSelector2.java:125)
at com.windowtester.runtime.swt.locator.TreeItemLocator.click(TreeItemLocator.java:210)
at com.windowtester.internal.runtime.selector.ClickHelper.doClick(ClickHelper.java:178)
... 18 more