Package schrodinger :: Package test :: Package squish :: Package maestro :: Module menubar
[hide private]
[frames] | no frames]

Module menubar

Functions for dynamically interacting with menus and menu items.

To use, add the following to the top of your test.py:

source( findFile( "scripts", "maestro/menubar.py" ))

Will append necessary objects to your objects.map. If one of the required names is already defined in your objects.map, it will not overwrite it unless you set OVERWRITE_OBJECTS=True before importing this module.

Copyright (c) Schrodinger, LLC. All rights reserved

Functions [hide private]
 
activateMenuItem(*arg)
Access the menu and menu items of Maestro main window menubar.
 
waitForObjectItemStartingWith(symbolicname, startswith)
Access AppFramework input selector where menu item text depends on selection / inclusion state of WS (see PANEL-5864 for details).
 
open_tasks_browse_menu()
This function adds necessary object names to the object.map and Open 'Tasks -> Browse' menu
 
open_from_task_tool(*args)
This function helps to open a panel using Task Tool menu-item.
Function Details [hide private]

activateMenuItem(*arg)

 

Access the menu and menu items of Maestro main window menubar. Any level of menu depth can be accessed by calling this function with arbitrary number of arguments.

Example uses:

   activateMenuItem( 'Applications', 'Strike', 'Predict...' )

   will click 'Application' --> 'Strike' --> 'Predict...'

waitForObjectItemStartingWith(symbolicname, startswith)

 

Access AppFramework input selector where menu item text depends on selection / inclusion state of WS (see PANEL-5864 for details).

For example:

   symbolicname = ":Amphiphilic Moment.use_from_combo_QComboBox"
   startswith = 'Workspace'
   mouseClick(waitForObject(symbolicname), 1, 1, 0, Qt.LeftButton)
   mouseClick(waitForObjectItemStartingWith(symbolicname, startswith), 1, 1, 0, Qt.LeftButton)

will set input selector to 'Workspace (# included entries)' regardless of how many are included.

open_from_task_tool(*args)

 

This function helps to open a panel using Task Tool menu-item. Opens Tasks-> Browse menu using 'OpenTasksBrowseMenu' function. Open the given sub-menu and click on the menu-item.

Usage: open_from_task_tool("Induced Fit Docking...") open_from_ask_tool("Glide", "Ligand Docking...") open_from_task_tool("Ligand Preparation and Library Design", "Reagent Preparation...") open_from_task_tool("Materials", "Stress Strain", "Analyze Results...")