LDTP
3.5.0
|
listsubmenus('window name>', 'menu name>')
Get the list of sub menu item, in a menu as a list
list | of menuitems as string on success, LdtpExecutionError exception on failure |
Refer: Linux: http://cgit.freedesktop.org/ldtp/ldtp2/tree/ldtpd/menu.py
Mac: https://github.com/ldtp/pyatom/blob/master/atomac/ldtpd/menu.py
Windows: https://github.com/ldtp/cobra/blob/master/Ldtpd/Menu.cs
With respect to gedit application, File menu
from ldtp import *
listsubmenus('*-gedit', 'mnuFile') # all the submenus of File menu as a list of string