Skip to main content



      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 04:38 Go to next message
Eclipse UserFriend
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 06:38 Go to previous messageGo to next message
Eclipse UserFriend
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 11:57 Go to previous messageGo to next message
Eclipse UserFriend
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 04:51 Go to previous messageGo to next message
Eclipse UserFriend
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 05:33 Go to previous message
Eclipse UserFriend
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: Fri Jul 25 20:49:22 EDT 2025

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

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

Back to the top