【问题标题】:How to select dropdown item(combobox) using winappdriver如何使用 winappdriver 选择下拉项(组合框)
【发布时间】:2021-08-20 18:36:34
【问题描述】:

我正在使用 win 应用程序驱动程序自动化桌面应用程序。我需要从下拉选项列表中选择一个值。我可以单击下拉菜单,但无法根据名称选择下拉项目。我尝试使用 windows 元素实现,但出现错误。

WindowsElement comboBox= (WindowsElement) winDriver.findElement(fundSponsorCombo);
comboBox.click();

谁能帮帮我。感谢您的帮助。

【问题讨论】:

    标签: java automation desktop-application winappdriver


    【解决方案1】:

    试试下面

    WindowsElement comboBox= (WindowsElement) winDriver.findElement(fundSponsorCombo);
    comboBox.SendKeys("element to select");
    

    【讨论】:

      猜你喜欢
      • 2020-05-15
      • 1970-01-01
      • 2021-05-04
      • 2012-08-23
      • 1970-01-01
      • 2014-01-19
      • 2011-06-19
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多