MenuItemFinder.Match()
Brought to you by:
charliepoole,
lukemaxon
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
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();
Logged In: YES
user_id=1636255
Originator: NO
Todo: Add a unit test to catch this condition.