Data Scrape only works until the page is reloaded

I hope this is in the right place.
I am creating a project that checks how many licences are being used on our 365 portal. When I set it up in the first place if I do a data scrape on the following table:

Everything works fine, it takes the data and I have it passed into an Excel Spreadsheet. However if I refresh or close the page and then come back to the exact same page again, then I run the automation it just comes up blank. There are no errors it just doesn’t find anything at all. If I ask it to indicate on screen for the data it shows me a box round the correct part so I don’t know why it’s not finding it after a page refresh / reload.

I’m quite new to UI Path so I don’t know what other info you might want from me? Are there any obvious reasons why things like this can happen?

I’m happy to supply more info if needed and thanks in advance for any help.

I would double check the selectors of the element that you are reading the data from, both before and after you refresh the page. It is common that the selector may change when the page is refreshed. In some instances the element still exists (hence why it does not throw an error) but the data is no longer stored in the same way. Also check the selectors of the page, if using relative selectors. Are you able to share the selectors with us?

Hey @JamesITP,

Is the page coming up blank? If so, this may be an issue with Microsoft. I have noticed a similar issue when attempting to log into SharePoint. If the page comes up blank, you could try refreshing the page again and seeing what that does. Normally works for me.

Hello, thanks for the reply. I have taken a screen shot of the selector both before and after the page refresh. It looks the same to me although I’m not sure I’m in the right section you’re refering to?
Before:

After:

Hello, thanks for the reply.

The Microsoft page isn’t coming up blank, that loads fine. It’s just the selector fails to grab the data the second time even though nothings changed.

Hey @JamesITP,

Have you tried building a stronger selector uing UiExplorer? I personally would try to avoid attributes like css-selector unless it’s completely necessary to use it.

What activity are you using to scrape the data?

Hi @JamesITP. I agree with @william.coulson - a stronger selector would be better. Additionally, is there a reason for using firefox? It may be worth also trying with other browsers to see if they perform any better.

1 Like

Hi William,

I haven’t done anything with the UiExplorer yet. I’m a novis at using UI Path so I think it might be a bit beyond me as it stands.
To scrape the data in the first place I just used the Data Scrape button on the toolbar in UI Path. I then selected the elements I needed and let it do it’s thing from there.

Is there a better way to go about it?

Thanks

Hi Katharine,

I did try using Chrome as well but it did exactly the same thing.

Thanks

Hi @JamesITP,

Using the UiExplorer is quite simple once you get the hang of it. Open UiExplorer, indicate the element you’re trying to scrape, and look at the right hand side of the menu. This features a list of different attributes you can put into the selector. Try adding and removing these different attributes in your selector and see what works for you. Unfortunately it is a bit of trial and error to get a working selector.

Hi William,

Thanks for that. I’ll have a play around with it and see what I come up with.

Hi @JamesITP,

Any luck with your selector creation?