0

我正在尝试左键单击 Java 应用程序内的超链接,左键单击会打开一个小的上下文弹出菜单。(右键单击不做任何事情)。在尝试了一些 Robotframework 关键字等之后,我来到了: Select From Popup Menu

这被描述为:Selects an item from the components context popup menu. Does a right click on the component and selects the specified menu item from the popup menu. 这似乎是这样实现的:

@RobotKeyword("Selects an item from the components context popup menu.\n"
            + "Does a right click on the component and selects the specified menu item from the popup menu.\n\n"
            + "Example:\n"
            + "| Select From Popup Menu | _myComponent_ | _Actions|Do something_ |\n")
    @ArgumentNames({ "identifier", "menuPath" })
    public void selectFromPopupMenu(String identifier, String menuPath) {
        JPopupMenuOperator popup = operator(identifier).invokePopup();
        popup.pushMenuNoBlock(menuPath, new EqualsStringComparator());
    }

有什么方法可以像包装器一样使用或修改实现以执行左键单击?

4

0 回答 0