From two given menu options, the action will select the first available option. This is useful for menu items that change their title depending on the UI state. For example, consider "Show Status Bar" and "Hide Status Bar" in the View menu, where either the former or the latter is available.
If the found element is a menu or submenu, it will be opened. If the element is a menu item, its related function will be called.
On success, it returns a reference to the selected menu item.
Parameters
Browser
The browser to work with.
Selecting "frontmost browser" will only work if the application currently in the foreground is a supported browser.
Type: Browser
Targeting options
You can look up a menu item or sub menu by either …
- its "title", e.g.
Contacts…
- its "path", e.g.
Edit > AutoFill > Contacts…
- its "segmented path", e.g.
Edit
,AutoFill
,Contacts…
A menu path is a single string containing the path segments separated by ">".
Leading and trailing whitespace in segments is trimmed. The lookup deals gracefully with segments ending in either an ellipses or triple dots, if either variant exists in the menu structure, it'll be found.
Options:
- title
- path
- segmented path
Menu item title
The menu item label as it occurs in the actual menu. Depending on the selected filter criteria, a partial title might be enough.
Type: Text
Title filter criteria
Only available when searching by title.
Options:
- is
- contains
- begins with
- ends with
- matches regular expression
Case-insensitive filtering
Enable if lowercase and uppercase shouldn't make a difference. Only available when searching by title or path.
Type: Boolean (YES
/NO
)
Menu item path #1
The menu item's hierarchical path, starting at the main menu, separated by ">" characters, e.g. View > Translation > Translate to German
.
During the lookup, the path will be split up by ">", and any leading or trailing whitespace in the single segments will be trimmed.
Type: Text
Main menu title #1
The first segment of a menu item's path, e.g. View
or Edit
etc.
Type: Text
Sub-menu or item #1.1
The next segment of the menu item's path.
Type: Text
Sub-menu or item #1.2
The next segment of the menu item's path.
Type: Text
Sub-menu or item #1.3
The next segment of the menu item's path.
Type: Text
Sub-menu or item #1.4
The next segment of the menu item's path.
Type: Text
Menu item title #2
The menu item label as it occurs in the actual menu. Depending on the selected filter criteria, a partial title might be enough.
Type: Text
Menu item path #2
The menu item's hierarchical path, starting at the main menu, separated by ">" characters, e.g. View > Translation > Translate to German
.
During the lookup, the path will be split up by ">", and any leading or trailing whitespace in the single segments will be trimmed.
Type: Text
Main menu title #2
The first segment of a menu item's path, e.g. View
or Edit
etc.
Type: Text
Sub-menu or item #2.1
The next segment of the menu item's path.
Type: Text
Sub-menu or item #2.2
The next segment of the menu item's path.
Type: Text
Sub-menu or item #2.3
The next segment of the menu item's path.
Type: Text
Sub-menu or item #2.4
The next segment of the menu item's path.
Type: Text
If neither can be found
If neither menu item could be found, the action can either cancel the workflow and raise an error, or it could silently and gracefully just return nothing. This might be preferable if you don't want the workflow to stop while being able to check for its return value in an "If" block down the line.
Options:
- stop and raise error
- return no value
Pause after selecting
This adds a short pause after selecting the menu item.
Options:
- no pause
- 0.2 secs
- 0.5 secs
- 1.0 secs
- 1.5 secs
- 2.0 secs
- 3.0 secs
- 4.0 secs
Return Value
Related Links
- Search the Browser Actions community forum for "Select Menu Item Either/Or (β)"
Short Video Explainer
"Select Menu Item Either/Or (β)" video explainer: