Making SWTBotMenu.click look more like real life [message #648579] |
Thu, 13 January 2011 10:08  |
Eclipse User |
|
|
|
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 14:14  |
Eclipse User |
|
|
|
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
>
|
|
|
Powered by
FUDForum. Page generated in 0.02994 seconds