Dynamic Selector in Get Text Activity - data scraping a website

Hello Team,

I am using Get Text activity to scrap date [numeric value] from a website and then paste in excel for further calculations. Now, this value keeps changing. The bot stops working when the value changes [from the one which was there while the bot was being made]

Could you please advise how to make this one dynamic? I have attached the image of the text that I wanted to scrap.

Thank you in advance.

Hi @nikhilbkrishnan

Please use the attribute aaname or innertext and make it as wildcard

aaname=‘*’

Regards

Hi @nikhilbkrishnan

Use anchor base activity and select anchor (find element activity)
as interviews.

Thanks

Hi

If possible pls share the selector of your get text activity so that we can tell you which attribute value needs to be replaced with Wildcard *

I hope it’s simple and you can either do it
Open this page and using get text activity indicate the element and get the selector, copy it and paste it in a notepad

Again close and open this page and if you are able to see different value then again indicate with get text activity and get the selector, copy and paste it below to the above pasted selector

Observe the difference in them and replace that differing value with * symbol

That’s it
You are done

Or

Use GET ATTRIBUTE activity and get the value of the attribute which shows that value in selector mostly would be aaname or innerText

Cheers @nikhilbkrishnan

Thanks Pravin, here is the selector

@Palaniyappan thank you, i will try this one now.

1 Like

Fine

Can you include few more attributes to the selector and see which attribute shows your 599 value
@nikhilbkrishnan

Hi @nikhilbkrishnan

Could u show the html structure of the that element by right-clicking the page and selecting Inspect Element?

hi @nikhilbkrishnan

Try adding inner text attribute and check whether it contains the value and make it as wildcard as aaname.

Regards

@Palaniyappan could you please explain a bit more the steps, I tried the * option and this is not working.

Apologies, I am a beginner in RPA.

The general strategy is following:

retrieving the text we do with get text activity
for this we define a reliable selector
if selector is hard to find, then maybe we will use an anchor for the element (in your case the label interviews could be an option)

also have a look here: