refactoring of how we work with context menus and of the corresponding UIA unit tests