ldtp / ldtp2

Linux Desktop Testing Project
GNU Lesser General Public License v2.1
108 stars 49 forks source link

Any idea how to get a list of menu items in GEdit ? #50

Open stuaxo opened 5 years ago

stuaxo commented 5 years ago

I've been playing with Gedit. What I want to check is that my menu items under the tools menu are available (it's a submenu: Shoebot, with another submenu: Examples).

The aim would be to verify the structure of the menu is there.

I can look for individual items, and verify the Tools menu exists, but any idea how to get the list of items in a menu ?

import ldtp

ldtp.launchapp('gedit')
ldtp.click('*-gedit', 'tbtnMenu')

>>> ldtp.listsubmenus('*-gedit', 'Tools')
[]

ldtp.selectmenuitem('*-gedit', 'Quit')