Click Text activity working selectively

Click text activity is unable to click the text if it is already clicked. Screenshot below.

But if the text is not clicked by default, the click text activity is working fine. Any suggestions?

Hi @tilarapiyush !
Use UiExplorer on the element and share with us the screenshot of the whole window. On the right of the window, if you have an attribute (that we call also state) that is like “clicked” or “visible” or something like that, we will be able to use “Get attribute” activity.
To use get attribute activity, just indicate the element and get its output. If the output contains the state you want then do nothing, if it does not get the state you want then you could click elsewhere to have your wanted state.

If I am unclear let me know :wink:

If it’s already clicked, do you really need to click it again?

If not, just set “continue on error” to True for the click text activity and then set the timeout to a reasonable but short number of seconds.

I’m curious though, why are you using click text here? Is this a web page or Windows app? If so you should be using a regular click with the proper selector for the table row and cell.

Hi,

I am using “click text” because I have to search for the text on webpage. Problem I am having is, if the value is already selected, the “Text Exist” activity is unable to find it. See below screenshot.

If I search for “BSIBQWBLCVLCG18” in above table using “Text Exist” it won’t be able to find text (as it is already selected) but if some other text is selected, then “BSIBQWBLCVLCG18” will be found easily by “Text Exist” activity.

Also this is a dynamic table and I need to select new text for every new table.

Hi @tilarapiyush ,

There is FormattedText option in Click Text activity.
Could you check FormattedText checkbox & try again?

Docs Link :
https://docs.uipath.com/activities/docs/click-text

didn’t work.

Hi @tilarapiyush

Can you please share us the selector for a particular item (one for clicked and one not clicked)

This is the selector when element is clicked.


This is the selector for same element when not clicked.

The element is missing aaname when it is clicked.

Can you check if innertext is present in both cases?

Could you show the selectors in uiexplorer…

When clicked.
image

When not clicked.

Innertext is not present when the element is clicked. You can see the screenshots in my earlier reply.

You can see when clicked there is an attribute called class.

Try element exists activity and keep class also and check its value (true or false)

@tilarapiyush ,

If you look closely, when text is not clicked, Selector’s tag is DIV. It means Selector points to the parent container of text column rather than text. When text is clicked, Selector’s tag is INPUT.

Try indicating parent element (DIV) while using Click Text activity instead of indicating text. Parent container (DIV) has aaname.

Let me know what you get.

Do a get children (set to descendants) for the table column, then loop through the children until you find the value you’re looking for.

Actually i made my way around by using “If” activity. Which means, if aaname was available, the text was clicked else the text was in 1st line of the table in already clicked form. :slight_smile:
This is very case specific solution wherein 1st line item is clicked by default when we land on the webpage.