Click Text Activity

Hello everyone!

I’m trying to use Click Text activity. Here is the scenario:

I have an excel file that’s located on a webpage, Internet Explorer. For our purposes, the file name is “Please_Open_Me.xlsx” How can I still click on this file even though there are spaces above the underscore, in other words its not a solid string with no visible white spaces? Currently the activity can’t find the string.

Any help would be appreciated. Thanks!

1 Like

Hi,
Just wondering but have you also considered “Click Element” instead? Then, just make sure your selector for the activity works for what you need.

Thanks.

1 Like

Thank for the suggestion, ClaytonM. The file name actually comes from a variable that constantly changes, so that means parts of the file name change as well, so I’l looking for a different string each time. I need something that will be able to click on that specified string within a selected window.

1 Like

No problem, you can use dynamic selectors by editing the selector expression. I’ll show you images of what I mean below.

If you edit that string you can use variables. Once it is edited in some way, any way, clicking the editor on the right will bring up the expression editor.

As you can see, I added a string variable within the selector.

thanks.

2 Likes

Hey Clayton - I’ve done as you described, but the Click Text doesn’t seem to want to click on that link. It say it can’t find the string, even though I’m passing the same file string in earlier steps. I’m lost.

2 Likes

Did you try doing what I described with the “Click Element” activity? And, edit the selector with the variable of your filestring.

I’m not sure about the Click Text; it doesn’t always work I think. But, Click Element will look at the link you are clicking directly, so that may work better.

1 Like

I’m not seeing “Click Element” activity. I did a search.

1 Like

That’s my bad. It’s called “Click” under Element section.

1 Like

Yes, but received an error.

Am I doing something wrong?

The IE window is opened in earlier task

Yes, if you go directly to the Selector Property. Click inside the text box and you should notice it’s all in quotes.

like “< webctrl aaname= … >”

Inside the text, edit it out so the variable is in it.

For example,
“< webctrl aaname='”+Filename+“’ tag=‘A’ />”

1 Like

Sorry for the late reply. That is what I have, but the selector still can’t be found.

Hi.
Do you have an example of your workflow or screenshot showing the selector you are using so we can look at it? Also, an example of the selector before you edit it showing what is generated as the selector when you first click on the link within UiPath Studio.

Maybe we can help further.

Thanks.

Hi,

I also want to do a click text to click on a text in a drop down menu. Somehow, the click text can’t seem to find the text. Does anyone here maybe know how to solve this?

(I’m using a click text cause the text I need to click is a variable)

Kind regards

Hi @AnniekJ

I would recommend you use the Select Item activity for dropdowns, when possible. You can use a variable in that one and most activities. If you only have part of the item word, then you’ll need to get the items from the dropdown and filter it based on if it contains that word; there are various solutions for doing that on this forum I’m sure.

If Click Text is a must and it’s a dropdown, then you will need to use the Hover Text or Element activity first (sometimes you need to use 2 of them with different Cursor positions depending on how the website interacts). After you hover on it, then the list of items will show up so you can click the text.

Regards.

1 Like

Hi @ClaytonM,

Thanks! I will try this. Did a temporary fix with a Click OCR, but was afraid it might mix up texts, since they will be quite similar, so your tip might be just what I needed. Thanks again!

Hi @ClaytonM,

I need to click a link based on text next to the hyperlink.

It is like grid structure - Each row, there is one hyperlink and one label text.

See attached image.

Input is Company 001 or Company 002 or Company 003.

I need to click corresponding hyperlink based on “Searching Company 001 or 002 or 003”.

Please give some suggestion.

Thank You.

Best,
K.Kannan.Clickimage

Hi @KannanK

This is just a quick suggestion and a method I have used before…
Open up UiExplorer and click on the text and see if there is some attribute for “tableRow” number. Then, do the same for the hyperlink. If they both have that attribute, then what you can do is this:

Get Attribute activity of "Company 001" // using the Text in the selector (like for aaname as example) 
// the attribute used will be the tableRow and store it into a variable

Click Element activity // using that variable inplace of the tableRow in the selector of the hyperlink

So I hope that helps.
In order to edit the selector with the text or tableRow variable, edit the string inside the Selector propery text box or expression editor (not in the selector editor); there is details on how to do that if you use the Search.

Essentially, you are just finding and getting the row attribute of the text, then using it to click the correct hyperlink.

Sometimes this confuses people, but hopefully this was clear enough to get you started.

Regards.

Hi @ClaytonM,

Thank You - I will try your suggestion and feedback.

Best,
K.Kannan.

hey @ClaytonM
I Tried what you said of editing the selector to be the dynamic one.
But An error popped up !!!

Please Help