Hello,
I am currently trying to automate a process which uses a desktop application. During testing I noticed one of the button selector is inconsistently failing. On investigation, noticed this behavior where sometimes UI explorer able to capture individual elements (like publish button in below image) on screen and other times the element it can capture is that complete bar and not individual buttons. Really appreciate any help on this.
Note- I already tried putting some delays, changing waitforready to complete, increasing timeout but nothing worked. Cannot use image click because button text is publish or unpublish and based on that next action is decided.
Thanks Vishal for quick response. Actually the problem is not capturing the element, I already captured it but the inconsistent behavior where sometimes selector does not work during end to end process run.
you can try using the “Find Children” activity to locate the individual button within the parent container. This activity allows you to search for child elements based on their properties, and can help you locate the button even if the selector is not specific enough.
If it doesn’t work ,you may need to consider using image recognition to locate the button. This involves taking a screenshot of the button and using the “Click Image” activity to interact with it.
Fix:
Used image as targeting method with 2 anchors - 1st anchor again uses only image and other one use strict, fuzzy and image. Not a fan of using image based way of finding elements but looks like this was the only option. Had to maintain same screen resolution of PROD machines as DEV machine.
Thank you everyone who respond on this issue with possible solutions.