The multiple logging of "bot.menu("Save")":
MenuItem {&Save    Ctrl+S} is not enabled, skipping" does not appear anymore.

Don't think the whole thread is resolved because of that, because this was just 
a minor issue in it. ;-)

I am willing to help you on implementing missing features and fixing bugs, but 
I need your approval before I do so (and an agreement, how exactly to modify 
it, since there are often a lot of solutions possible).


--- On Fri, 7/4/08, Hans Schwaebli <[EMAIL PROTECTED]> wrote:
From: Hans Schwaebli <[EMAIL PROTECTED]>
Subject: [SWTBot-users] Disabled menu items aren't found
To: [email protected]
Date: Friday, July 4, 2008, 5:59 AM

Menu items which are disabled (grey) aren't found by SWT Bot. It raises a 
WidgetNotFoundException.

This test would not work:
    SWTBotMenu disabledMenu = bot.menu("Save");
    assertTrue(disabledMenu.isDisabled());

You cannot distinguish currently whether the menu item is not there or whether 
it is just disabled.

The reason for this is in the implementation MenuFinder.findMenusInternal(...), 
line 163 - 167:
                if (!menuItem.isEnabled()) {
                    if (log.isDebugEnabled())
                        log.debug(menuItem + " is not enabled,
 skipping.");
                    continue;
                }

I would propose to simply remove these lines above, but then it would include a 
lot of pseudo menu items, see log:
MenuItem {|} is not enabled, skipping.

What is that? Probably these menu items really can be skipped, but not the 
other one which is visible, but just disabled (grey).

If they are menu item separators, there could be testing support for them, 
because one might want to test that there is an separator between two specific 
menu items. But this is just a minor issue of low importance. So in my opinion 
they could be ignored in the beginning.

I discovered that this line is logged 10 times per 1 statement 
"bot.menu("Save")":
MenuItem {&Save    Ctrl+S} is not enabled, skipping.

This is
 9times too often I would say. But that is of course "just" an performance 
issue.

What do you think about that?




      -------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at 
http://www.sourceforge.net/community/cca08_______________________________________________
SWTBot-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse


      
-------------------------------------------------------------------------
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
_______________________________________________
SWTBot-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/swtbot-users
http://swtbot.org/ - a functional testing tool for SWT/Eclipse

Reply via email to