Web Scraping not returning any data

Guys, There is more to data scraping then simply running the Wizard. I guarantee you that having the wizard run the first time does not mean it will run each time!

Let me show you what I mean with a small experiment with the Service Now Web application . Kindly take some time to read this:

Open a new sequence, and set up the first data scraping activity. Don’t run it yet!

Now, refresh your browser page, and build another data scraping activity.

Open the Selector of the first activity and note down the selector id. In my case it turned out to be:

image

Next, open the second web scraping activity and check it’s selector.

image

Notice what’s happening! If the second selector has a different parent_id your data scraper will not work . Each time the page refreshes, the parent_id changes!

Solution:

This is different based on how your page is structured, but the idea here is to give UiPath, the positively - identifiable information on the table from where you’re scraping data. As you can see, the parent id does not work. Instead, re-configure your selector to do the following:

Give it the address of the first-column of the table! 
Replace the parent_id with a generic wildcard *

Here is how it looks on my end - Notice that I included the name of the first-column of the table from where data is to be scraped.

Now refresh your web page and validate the selector. Most likely, this will work if your table column name does not change. Here is how it looks when I tested it on my side. I closed my browser completely, brought up the report again, and validated the selector.

If the repeat validation works, your data scraper will work each time!!!!

After a few tests, I was able to dumb down my selector to just this:

 <webctrl parentid='*_table' tag='TBODY' rowName='NumberSort*' />

Cheers! :slight_smile: :slight_smile: :slight_smile:

1 Like