Menu

#4 MenuItemFinder.Match()

open
nobody
None
5
2004-10-25
2004-10-25
No

I've been trying to use the MenuItemTester to test menu
items that raise dialogs. For example "Page Setup..."

Unfortunately the MenuItemFinder.Match() uses
Split(".") - to split names like File.New in various
parts. This drops the trailing "..." from Page Setup
and so it won't be found.

Possible solutions
1) Drop support for the File.New syntax
2) Replace the call to Split with something more
sophisticated that recognises that "..." is properly
part of the menu item
3) change the use of equals in Match to String.StartsWith

etc.

I will hack my local copy to 3.

Mark

Discussion

  • Mark Levison

    Mark Levison - 2004-10-25

    Logged In: YES
    user_id=472051

    Update - my problem was with the '&' and not the '...'.

    So a new suggestion - name should be subject to the same
    transformation as in Finder.Name();

     
  • Adam Vandenberg

    Adam Vandenberg - 2007-02-20

    Logged In: YES
    user_id=1636255
    Originator: NO

    Todo: Add a unit test to catch this condition.

     

Log in to post a comment.