How to handle dynamic URL and selectors for a same site for data scrapping

I have a site, need to input data from excel file to search and capture the output to excel.

Challenge is - After 1st search, Selectors are changing. Also the URL is getting changed.

How to handle the URL which is changing in next search?
How to handle the selector also on next search load?

I have tried *, this shows validation correct, but next time it fails.

I would avoid that (R) symbol in a selector. Just do CPT*

Is this for an Attach Browser? You’re going to have to give us more to go on for us to help. Show us the page you’re working on, the selector and how it changes, etc.

1 Like


Here is the screenshot,

Its same site i need to do search activity, but the URL keeping changing for different type of entries.

Page title,URL and Search field also changes based on that.

1st i get error on Attach browser, if i validate that, following commands like search and get text also gives error.

What you should do is use the Open Browser activity to open the browser. Output the browser to a variable. Then later in Attach Browser you reference the variable. This way, you never need a selector.

1 Like

Hello @ranjitnayak007, maybe you can click the url, and then if always there are the same amount of characters, you can replace them by “*”. For example:

www.facebook.com\aaaaa → www.facebook.com*****

I used GET URL activity and stored the url in a variable

That is not the correct way to do it. The way I described is the correct way to do it.