How to click on a last string in a sentence

Hi,

A web page contains several text sentences in which a hyperlink will be available at the end of the sentences, if i can able to send a regex code to identify “Download” hyperlink string and send it into Click activity selector, can it click on it? If so, can someone give me the regex code to identify the “Download” String

EX: 123 Download
123srfs Download
lasjflkskj naskjfdsaksfak lasjdflajlsfaj Download

Note: There are no valid selectors available for this Hyperlink, thats why i thought, it can be done with Regex code.

Is this is in a form of table?

1 Like

Can you send me the link on which you are trying solve?

1 Like

Hi
Did we try with CLICK TEXT ACTIVITY where we can pass the string we want to click in a UI Element
And in your case the string can be mention like this
—if the input string is is stored in a str_input string variable
Then in Click Text Activity mention
Split(str_input.ToString,” “).Last().ToString

For more details on this activity

Cheers @Santhosh_Hyd

1 Like

HI Guys,

thanks for the response, but the suggestions you gave did not work, i did some R & D and i used the following code in the click text, and it worked

Split(InputString," ").where(function(f) NOT String.IsNullOrWhiteSpace(f)).ToArray.last

but the problem is, its clicking only one the first download, its not clicking on the Next download, how to achieve this?

yes, it is

its client web portal, so i cant send the link

@Santhosh_Hyd You can do it by using find children activity. Indicate the parent element which the download is under. Use for each to iterate the uielements.Use click activity. Use the for each item in the element box clear the selectors.

Hope this will solve your prob. Let me know if you need some help.:innocent:

1 Like

Hi @Santhosh_Hyd Did you got the solution.:smiley:

1 Like