How to find and click text with dynamic selector

Hey Guys

I am looking for a way to find and click text without a valid selector. I am basically trying to search for a tweet on twitter and then click on that specific tweet. I am struggling to work out how to do it.

Any Ideas guys?

hey, @bobby
you can do this

  • Use Element Exist activity to identify if the element or text is available on Page or web browser
  • then you can use Click Text activity to click on specific text!
    Cheers
    @bobby
1 Like

Thank you for the quick repsonse.

I do not understand how to use that activity. It returns a Uielement which I have no idea how to use. Can you provide an example please.

1 Like

Also is there anyway of making this dynamic. So it can search for any text passed to it on the page.

Element Exist returns Boolean type!
check it once
@bobby

1 Like

Ah I see. I must be think of something else. Ok so it returns a boolean. So then you would set up an if statement and if it exists then click. It works for the static text. But how do you make it dynamic. For example look at the entire page and if text that is passed in matches the text on page then click.

1 Like

buddy!
you can use screen scrapping then get output pass on to Matches and use click image activity
cheers
@bobby

1 Like

Ok I understad how to use screen scraping. But how do you use matches? I would like to see an example of this. If possible.

1 Like

Screen Scrap.xaml (8.8 KB)
check this!
here i scrapped the home page of uipath Fourm and im searching the “Discover” if that exist it will click on that!
Cheers
@bobby

1 Like

Hi Pradeep, it executes the program successfully but it does not click on the discover text. Does it work for you?

1 Like

you can use Click activity instead!

1 Like

Screen Scrap.xaml (10.6 KB)
cheers
@bobby

1 Like

Hi Pradeep. It still does not work for me. Using the click activity, do you have to specify a selector. If so what, can it just be the entire page.

1 Like

did you tried above code?
@bobby

1 Like

Yes man. It run sucessfully but does not select anything.

1 Like

it did for me!
@bobby

1 Like

Pradeep, it worked when I deciated the discover hyperlink for the element. But that defeats the purpose of doing this process because I need the click to be dynmaic. The click text would work better. But I cannot get that to work. It gives me the error “The method or operation is not implemented”.

Any Ideas how to resolve this @Pradeep_Shiv ?