如何点击手柄Chrome';s";另存为;在LeanFT工具中使用Java的对话框?

如何点击手柄Chrome';s";另存为;在LeanFT工具中使用Java的对话框?,java,automation,leanft,Java,Automation,Leanft,使用LeanFT的Java SDK,是否可以从中对“保存”按钮执行单击操作?您是否尝试使用来识别保存按钮 无论如何,我知道您现在正在使用Web技术,然后单击保存按钮,该按钮会提示您将文件保存到某个位置 您有两个选择: 将Chrome设置为不再询问保存文件的位置 描述要使用STD技术单击的保存按钮 此类描述的示例: Desktop.describe(Window.class, new WindowDescription.Builder() .ownedWindow(false)

使用LeanFT的Java SDK,是否可以从中对“保存”按钮执行单击操作?

您是否尝试使用来识别保存按钮

无论如何,我知道您现在正在使用Web技术,然后单击保存按钮,该按钮会提示您将文件保存到某个位置

您有两个选择:

  • 将Chrome设置为不再询问保存文件的位置

  • 描述要使用STD技术单击的保存按钮

  • 此类描述的示例:

    Desktop.describe(Window.class, new WindowDescription.Builder()
            .ownedWindow(false)
            .childWindow(false)
            .windowClassRegExp("Chrome_WidgetWin_1")
            .windowTitleRegExp(" Google Chrome").build())
        .describe(Dialog.class, new DialogDescription.Builder()
            .ownedWindow(true)
            .childWindow(false)
            .text("Save As")
            .nativeClass("#32770").build())
        .describe(Button.class, new ButtonDescription.Builder()
            .text("&Save")
            .nativeClass("Button").build());
    
    然后,您可以调用
    。单击此对象上的
    方法(或取消,等等)。

    您是否尝试使用来标识保存按钮

    无论如何,我知道您现在正在使用Web技术,然后单击保存按钮,该按钮会提示您将文件保存到某个位置

    您有两个选择:

  • 将Chrome设置为不再询问保存文件的位置

  • 描述要使用STD技术单击的保存按钮

  • 此类描述的示例:

    Desktop.describe(Window.class, new WindowDescription.Builder()
            .ownedWindow(false)
            .childWindow(false)
            .windowClassRegExp("Chrome_WidgetWin_1")
            .windowTitleRegExp(" Google Chrome").build())
        .describe(Dialog.class, new DialogDescription.Builder()
            .ownedWindow(true)
            .childWindow(false)
            .text("Save As")
            .nativeClass("#32770").build())
        .describe(Button.class, new ButtonDescription.Builder()
            .text("&Save")
            .nativeClass("Button").build());
    
    然后可以调用
    。单击此对象上的
    方法(或取消,等等)