How to automate drop-down list item selection in Python-Appium for Desktop?

Kelly Punzalan's picture

I'm starting to learn writing Automation Scripts in python-appium for desktop application.

Could anyone, please, share their knowledge how to handle Drop-down list item selection in Python-Appium for Desktop?

Thanks in advance.

1 Answer

Steve Skok's picture

Hi there!

I hope this will help

//trying to click the dropdown list
try{
WebElement parentElement1 = driver.findElement(By.id("retProdOp0"));
WebElement childElement1 = parentElement1.findElement(By
.xpath("//android.view.View[@index='1']"));
childElement1.click();
driver.label("dropdown list 2nd element clicked");
}catch(Exception e){
driver.label("Failed to click dropdown list on prodexchg screen");
System.out.println(e.getMessage());
}

StickyMinds is a TechWell community.

Through conferences, training, consulting, and online resources, TechWell helps you develop and deliver great software every day.