WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Unable to select dropdown in winappdriver

Open punampatil792 opened this issue 6 years ago • 7 comments

In winappdriver for selection of dropdown combox class is not present which is present in winium desktop automation tool.

punampatil792 avatar Feb 18 '20 08:02 punampatil792

Does the combo box has a name or automation id.

anunay1 avatar Feb 19 '20 02:02 anunay1

@punampatil792 You can have following common method for selecting dropdown values.

public static void SetDropDownValue(WindowsElement windowsElement, string dropDownValue) { try {

            windowsElement.SendKeys(Keys.F4);
            Thread.Sleep(500);
            windowsElement.FindElementByName(dropDownValue).FindElementByClassName("ListBoxItem").Click();
            //Assert.AreEqual(dropDownValue, windowsElement.Text);
        }
        catch (Exception err)
        {
            Assert.Fail($"Unable to select text value {dropDownValue} in the dropdown {windowsElement}" + err.Message);
        }

    }

VijayHugar avatar Feb 20 '20 05:02 VijayHugar

Thank you Vijay

punampatil792 avatar Feb 22 '20 11:02 punampatil792

@punampatil792 Is this worked for you ?

VijayHugar avatar Feb 24 '20 08:02 VijayHugar

No it is not working do you have any another solution ?

punampatil792 avatar Feb 24 '20 09:02 punampatil792

Try below code. It is working for me.

image

dillibabu123 avatar May 11 '20 11:05 dillibabu123

Ok, Thank you.

On Mon, 11 May, 2020, 4:54 PM dillibabu123, [email protected] wrote:

Try below code. It is working for me.

[image: image] https://user-images.githubusercontent.com/55104669/81556302-b8f35e00-93a7-11ea-847a-bdf0ddb06d20.png

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/microsoft/WinAppDriver/issues/1067#issuecomment-626643089, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOCFU5WJJHKUBAR37K6WWJ3RQ7N6PANCNFSM4KW7UZJA .

punampatil792 avatar May 11 '20 14:05 punampatil792