var menuMain = app.getMainMenu(); var menuTools = menuMain.getMenu( "&Tools" ); if( !menuTools ) { alert( "Test needs to be updated for changed menu names" ); } else { if( !menuTools.doesItemExist( "Cus&tomise..." ) ) { alert( "We ought to have found 'Cus&tomise...' sub menu" ); }
if( !menuMain.doesItemExist( "&Tools" ) ) { alert( "We ought to have found '&Tools'" ); }
if( menuMain.doesItemExist( "Bleh!" ) ) { alert( "We ought not to have found Bleh!" ); }