Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 14:54 Go to next message
Zac Hamid is currently offline Zac HamidFriend
Messages: 7
Registered: August 2022
Junior Member
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 09:43 Go to previous messageGo to next message
Zac Hamid is currently offline Zac HamidFriend
Messages: 7
Registered: August 2022
Junior Member
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 18:47 Go to previous messageGo to next message
Frederic Bard is currently offline Frederic BardFriend
Messages: 6
Registered: August 2020
Junior Member
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 12:20 Go to previous messageGo to next message
Zac Hamid is currently offline Zac HamidFriend
Messages: 7
Registered: August 2022
Junior Member
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 14:24 Go to previous message
Zac Hamid is currently offline Zac HamidFriend
Messages: 7
Registered: August 2022
Junior Member
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 Mar 05 14:22:30 GMT 2024

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

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

Back to the top