Winium.Desktop icon indicating copy to clipboard operation
Winium.Desktop copied to clipboard

Unable to select option on desktop application

Open javawinium opened this issue 4 years ago • 4 comments

New to automation and Working on desktop application and i have a following query

on screen Same option ( Ex:- Option a) in two places and tried to identify the properties by UISpy tool but no use . there is no unique ID or class name , name available .so how to click that option using automation code ( Selenium/java/winium)

javawinium avatar Jun 20 '20 15:06 javawinium

@javawinium provide pictures of UISpy tool and I might be able to help with a solution. One way is by first finding the parent, and then under that parent it is unique enough. C# ex. var parent = driver.FindElement(By.whatever()); parent.FindElement(By.whatever()).Click(); Also you could use the Actions class and you could just use location on the page.

DavidPurdy1 avatar Jul 17 '20 20:07 DavidPurdy1

Thanks David . that issue had been resolved long back . if you could help me with other issue which i am facing currently in my desktop application , there are AutomationID's available but when i tried to use the AutomationID - Property value to find the element in the winium script , i am getting Element not able to found error . But instead of ID, if i use Name ( Property value ) it works fine but the problem with the name Property value , the winium script is getting very slow to identify the element and the Automation script taking more time to execute . Is there any solution for this ?

javawinium avatar Jul 17 '20 20:07 javawinium

@DavidPurdy1 if you could help me with other issue which i am facing currently in my desktop application , there are AutomationID's available but when i tried to use the AutomationID - Property value to find the element in the winium script , i am getting Element not able to found error . But instead of ID, if i use Name ( Property value ) it works fine but the problem with the name Property value , the winium script is getting very slow to identify the element and the Automation script taking more time to execute . Is there any solution for this ?

javawinium avatar Jul 18 '20 08:07 javawinium

@javawinium For not being able to find the automation ID I would suggest maybe making your search area smaller, by using the method I explained above or by using the Actions class. For why Name is taking a long time it is difficult without knowing how you are finding elements. One thing I could suggest is maybe looking up the difference between explicit and implicit waits which can be found in selenium docs or looking at more examples of finding elements. Compared to selenium in my experience, it seems to take longer to find things.

DavidPurdy1 avatar Jul 20 '20 17:07 DavidPurdy1