Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » SWTBot : How get a screenshot that includes a menu ?
SWTBot : How get a screenshot that includes a menu ? [message #514039] Fri, 12 February 2010 09:38 Go to next message
maherzia Mising name is currently offline maherzia Mising nameFriend
Messages: 6
Registered: February 2010
Junior Member
I'm using SWTBot to get some screenshots in order to automatically update documentation images.
In some cases, I need to get screenshot that includes menu.

#########
bot.menu("Run").click();
SWTUtils.captureScreenshot(capturePath, bot.activeShell().widget);
########
I get screenshot without menu.

Please could you help me ?

Thanks in advance.
Re: SWTBot : How get a screenshot that includes a menu ? [message #514796 is a reply to message #514039] Tue, 16 February 2010 11:38 Go to previous messageGo to next message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Short answer:
You can't.

Long answer:
You can't, really. The menus are never really opened when you navigate
and click through them. All SWTBot does is navigate through all the
menus, find the one you really need and click on it, without ever
opening it.

-- Ketan

On 2/12/10 1:38 AM, maherzia wrote:
> I'm using SWTBot to get some screenshots in order to automatically
> update documentation images.
> In some cases, I need to get screenshot that includes menu.
>
> #########
> bot.menu("Run").click();
> SWTUtils.captureScreenshot(capturePath, bot.activeShell().widget);
> ########
> I get screenshot without menu.
>
> Please could you help me ?
>
> Thanks in advance.
Re: SWTBot : How get a screenshot that includes a menu ? [message #515091 is a reply to message #514796] Wed, 17 February 2010 16:57 Go to previous messageGo to next message
maherzia Mising name is currently offline maherzia Mising nameFriend
Messages: 6
Registered: February 2010
Junior Member
Thanks for the reply.

Is it the same case for a screenshot that includes a tooltip ?
In fact, while running a scenarios I see tooltip but I don't found it in my screenshot.

For screenshot captures do you plan these enhancements (images including menu, contextual menu or tooltip) in your future release ?

It will be so helpfull and interesting.
Re: SWTBot : How get a screenshot that includes a menu ? [message #717754 is a reply to message #514039] Mon, 22 August 2011 08:51 Go to previous messageGo to next message
Phillip Hoffmann is currently offline Phillip HoffmannFriend
Messages: 2
Registered: August 2011
Junior Member
Hey,

I have the same problem as maherzia. I have tried to make the contextmenu visible via bot.widget.getMenu.setVisible(true) and in fact, the menu becomes visible on the screen. Unfortunately, when using captureScreenshot, it does not appear on the screenshot.

Does anyone have an idea how to get around this?

Thanks

Phillip
Re: SWTBot : How get a screenshot that includes a menu ? [message #717766 is a reply to message #717754] Mon, 22 August 2011 09:33 Go to previous message
Phillip Hoffmann is currently offline Phillip HoffmannFriend
Messages: 2
Registered: August 2011
Junior Member
Ok, it looks like this is a threading problem. If you call captureScreenshot from outside the UI thread, the contextmenu magically appears on the screenshot.
Previous Topic:Sikuli for commercial purpose
Next Topic:Problem with auto-complete in eclipse
Goto Forum:
  


Current Time: Sat Apr 20 10:22:10 GMT 2024

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

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

Back to the top