Skip to main content



      Home
Home » Eclipse Projects » SWTBot » SWTBot doesn't seem to see the "Show View" Shell(Running 4.22 with SWTBot 4.1.0, the Standard Eclipse 'Show View' Shell cannot be found)
SWTBot doesn't seem to see the "Show View" Shell [message #1854150] Wed, 03 August 2022 10:54 Go to next message
Eclipse UserFriend
Trying to run the following test to show views in Eclipse

@Test
public void showView() {
  bot.menu("Windows").menu("Show View").menu("Other...");
  bot.shell("Show View").activate();
  assertNotNull(bot.shell("Show View"));
  bot.button("Cancel").click();
}


Very basic test on Eclipse 4.22 using SWTBot 4.1.0

It seems to open the "Show View" shell but doesn't seem to go any further.

Would anyone be able to shed some light on where I may be going wrong?
Re: SWTBot doesn't seem to see the "Show View" Shell [message #1854170 is a reply to message #1854150] Thu, 04 August 2022 05:43 Go to previous messageGo to next message
Eclipse UserFriend
A bit more investigating reveals that this seems to be the case with all shells that eclipse throws up, like the 'Select a wizard' shell as well
Re: SWTBot doesn't seem to see the "Show View" Shell [message #1854179 is a reply to message #1854170] Thu, 04 August 2022 14:47 Go to previous messageGo to next message
Eclipse UserFriend
Did you try to retrieve the SWTBotView from your menu and then using it to invoke the "Cancel" ?
Re: SWTBot doesn't seem to see the "Show View" Shell [message #1854260 is a reply to message #1854179] Tue, 09 August 2022 08:20 Go to previous messageGo to next message
Eclipse UserFriend
I have attempted to do that - although the test just seems to hang, we get the following in the output:

13:17:11.124 [main] DEBUG org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher - matched MenuItem with text "&Window", using matcher: with mnemonic 'Window'
13:17:11.129 [main] DEBUG org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher - matched MenuItem with text "Show &View", using matcher: with mnemonic 'Show View'
13:17:11.200 [main] DEBUG org.eclipse.swtbot.swt.finder.matchers.AbstractMatcher - matched MenuItem with text "&Other...	Alt+Shift+...", using matcher: with mnemonic 'Other...'
13:17:11.200 [main] DEBUG org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu - Clicking on with mnemonic 'Other...'


Only after I manually interact with the "Show View" box (I click the cancel button, I get the following acknowledgement in the log:

13:19:20.829 [main] DEBUG org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu - Sent event 13 to [Selection [13]: SelectionEvent{MenuItem {&Other...	Alt+Shift+Q, Q} time=-2104912350 data=null item=null detail=0 x=0 y=0 width=0 height=0 stateMask=0x0 text=null doit=true}, with mnemonic 'Other...']
13:19:20.830 [main] DEBUG org.eclipse.swtbot.swt.finder.widgets.SWTBotMenu - Clicked on with mnemonic 'Other...'
Re: SWTBot doesn't seem to see the "Show View" Shell [message #1856704 is a reply to message #1854260] Fri, 23 December 2022 09:24 Go to previous message
Eclipse UserFriend
PEBCAK: I was running them as JUnit tests not SWTBot Tests
Previous Topic:Can't access right-click menu items of project that have sub-menus
Next Topic:SWTBot via the Command Line
Goto Forum:
  


Current Time: Tue May 20 09:17:29 EDT 2025

Powered by FUDForum. Page generated in 0.07556 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top