I have come across certain elements in applications which don’t have a selector/attributes whatsoever returned by UiExplorer, irrespective of automation framework.
However, Click Text activity works just fine on a parent element with the provided text of the element…
I’m certain it doesn’t use OCR so how does this work? just for knowledge
Click activity : Clicks a specified UI Element
Click Text Activity : Searches for a given String in an Indicated UI Element and clicks It
Hope this may help you
As name suggest the click activity clicked specified ui element where click text uses string in an element
I know what the activity does… i was interested to know how it does it on the back end. How does it find the text string given that no selector shows up on uiexplorer
if you have coded in .net below will help you to understand .Let us know if you want to discuss something specific about system.windows.form namespace
The Click Text activity takes a screenshot of the target application window,it uses image recognition algorithms to identify a region of the screenshot that matches the position and size of the parent element that was clicked.It then uses text recognition algorithms to read the text within the parent element and it then searches for the target text within the region identified and clicks on the center of the first match it finds.
The “Click Text” activity is designed to click on a specific text string that appears in the UI. It uses Optical Character Recognition (OCR) technology to identify the text and then clicks on it. This activity is useful when the element does not have a specific selector or when the selector is unreliable due to frequent UI changes.
On the other hand, the “Click on Element” activity is designed to click on a specific UI element that has a selector. It uses the selector to locate the element and then clicks on it. This activity is more reliable than the “Click Text” activity when the element has a specific and consistent selector.
thank you for the responses, all!
@Nitya1 @shantanu_chande is it really true that it uses OCR? i can’t seem to find any document references mentioning that. If so, is “Click OCR Text” activity just redundant since they both essentially do the same thing?
@nameless Yes, there are no references of OCR mentions and there was an active thread before where it was specified.
And about Click Text and Click OCR Text - the “Click Text” activity uses OCR (Optical Character Recognition) and computer vision techniques to search for a specified text string within a target UI element. On the other hand, the “Click OCR Text” activity uses OCR to recognize text directly on the screen. It does not require a specific target UI element, and it can click on any recognized text on the screen.