javaautomationdesktop-applicationwinappdriver

How to select dropdown item(combobox) using winappdriver


I am automating desktop application using win app driver. I need to select a value from list of dropdown options. I am able to click on the dropdown but not able to select the drop down item based on the name. I tried implementing using windows element but I am getting error.

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

Can anyone help me this. Appreciate your help.


Solution

  • Try below

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