Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » SWTBot » Making SWTBotMenu.click look more like real life
Making SWTBotMenu.click look more like real life [message #648579] Thu, 13 January 2011 15:08 Go to next message
Geoff Bache is currently offline Geoff BacheFriend
Messages: 33
Registered: October 2010
Member
Hi all,

It's useful to be able to walk through SWTBot tests and see the UI move around. The problem I have is that when menu items are selected, this is invisible, so it is hard to see what is happening. The MenuItem is clicked without ever bringing up the menu.

I wonder if it's possible to change SWTBotMenu to actually bring the menu up and down?
I had a bit of a look at this myself but couldn't see how to do it. Is it possible to do it by generating SWT events? Neither the Arm event on MenuItem or Show on Menu seemed to cause it to come up.

Regards,
Geoff
Re: Making SWTBotMenu.click look more like real life [message #649123 is a reply to message #648579] Mon, 17 January 2011 19:14 Go to previous message
Ketan Padegaonkar is currently offline Ketan PadegaonkarFriend
Messages: 873
Registered: July 2009
Senior Member
Sending SWT events does not help :(

The only way I know of doing this would be to generate a mousedown
event(using either SWT or AWT) at a particular co-ordinate to simulate a
user action. The caveats being that there's no co-ordinates for menu
entries that go off the screen because the menu list is too big to fit
in the available space.

--
Ketan
ketan.padegaonkar.name | eclipse.org/swtbot | @ketanpkr

On 1/13/11 7:08 AM, Geoff Bache wrote:
> Hi all,
>
> It's useful to be able to walk through SWTBot tests and see the UI move
> around. The problem I have is that when menu items are selected, this is
> invisible, so it is hard to see what is happening. The MenuItem is
> clicked without ever bringing up the menu.
>
> I wonder if it's possible to change SWTBotMenu to actually bring the
> menu up and down?
> I had a bit of a look at this myself but couldn't see how to do it. Is
> it possible to do it by generating SWT events? Neither the Arm event on
> MenuItem or Show on Menu seemed to cause it to come up.
>
> Regards,
> Geoff
>
Previous Topic:Accessing Connection lines on Graphiti objects
Next Topic:[ANN] SWTBot version 2.0.2 available
Goto Forum:
  


Current Time: Thu Apr 25 20:25:37 GMT 2024

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

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

Back to the top