different behaviour running in pde and headless (context menus) [message #660334] |
Fri, 18 March 2011 00:07 |
Pete MacLiesh Messages: 14 Registered: July 2009 |
Junior Member |
|
|
Given that i can run a tiny set of tests in the pde, and can build, install and run exactly the same set of tests headless, is it expected that there are any differences in behaviour?
Specifically, i have a view that has dynamically constructed context menus. In the PDE i can run the test and it can select items on the context menu reliably (well as far as i have gotten anyway). When i run headless, the context menu (first level) is located, but then fails on click because it's already disposed. This is same code, same test.
Other bits of the same test that click on things in dialogs and editors work fine (headless and pde), and context menu items of a different tree view (project explorer) seem to be selectable ok headless.
So ... something in this view is tripping swtbots ability to click, but only when run headless.
Any thoughts as to what might cause that? Or what i can tweak to make it happy?
Here are the last few trace events that i see as swtbot processes this java:
t.expandNode("Configurations").getNode("Uninstalled Configs").getNode("nobuild").contextMenu("Delete").click();
SWTBotTree - (SWTBotTree.java:309) - Expanding nodes Configurations in tree (of type 'Tree' and with tooltip 'SysOverviewTree')
SWTBotTreeItem - (SWTBotTreeItem.java:169) - Tree item TreeItem with text {TreeItem {Configurations}} is already expanded. Won't expand it again.
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseEnter [6]: MouseEvent{Tree {} time=-969629777 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseMove [5]: MouseEvent{Tree {} time=-969629761 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event Activate [26]: ShellEvent{Tree {} time=-969629761 data=null doit=true} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event FocusIn [15]: FocusEvent{Tree {} time=-969629761 data=null} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseDown [3]: MouseEvent{Tree {} time=-969629761 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event Selection [13]: SelectionEvent{Tree {} time=-969629761 data=null item=TreeItem {nobuild} detail=0 x=0 y=0 width=0 height=0 stateMask=0 text=null doit=true} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseUp [4]: MouseEvent{Tree {} time=-969629761 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseHover [32]: MouseEvent{Tree {} time=-969629761 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseMove [5]: MouseEvent{Tree {} time=-969629745 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseExit [7]: MouseEvent{Tree {} time=-969629745 data=null button=0 stateMask=0 x=0 y=0 count=0} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event Deactivate [27]: ShellEvent{Tree {} time=-969629745 data=null doit=true} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event FocusOut [16]: FocusEvent{Tree {} time=-969629745 data=null} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseDown [3]: MouseEvent{TreeItem {nobuild} time=-969629745 data=null button=3 stateMask=0 x=0 y=0 count=1} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MouseUp [4]: MouseEvent{TreeItem {nobuild} time=-969629745 data=null button=3 stateMask=0 x=0 y=0 count=1} to Tree node with text: nobuild
SWTBotTreeItem - (AbstractSWTBot$2.java:160) - Sent event MenuDetect [35]: Event {type=35 Tree {} time=-969629730 data=null x=0 y=0 width=0 height=0 detail=0} to Tree node with text: nobuild
and then it barfs with:
org.eclipse.swtbot.swt.finder.exceptions.WidgetNotFoundExcep tion: The widget {(of type 'MenuItem' and with mnemonic 'Delete')} was disposed.
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.<init>(AbstractSWTBot.java:106)
at org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu.<init>(SWTBotMenu.java:42)
at org.eclipse.swtbot.swt.finder.widgets.AbstractSWTBot.context Menu(AbstractSWTBot.java:460)
at org.eclipse.swtbot.swt.finder.widgets.SWTBotTreeItem.context Menu(SWTBotTreeItem.java:528)
This is eclipse 3.7m5 and swtbot 2.0.4 on windows7
THANKS
PMac
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02472 seconds