There is some structure on that page, but I haven’t found yet a way to scrap just the links for each separate product sub-category.
On the screenshot below I marked with red the blocks of links that I need to collect.
Basically, it’s all the blocks of links from all product sub-categories (written with small black font) but without those links to the product categories (written with bigger blue font).
Unfortunately, it gives an error of selector not valid.
Please see my workflow attached.
How to make this work for my case?
Thank you for help!
Source: Find Children 'DIV departments-page'
Message: The selector is not valid
Exception Type: UiPath.Core.InvalidSelectorException
An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.InvalidSelectorException: The selector is not valid ----> System.InvalidCastException: Unable to cast object of type 'System.Xml.XmlText' to type 'System.Xml.XmlElement'.
at UiPath.Core.Selector.FromXmlString(String xml)
at UiPath.Core.Selector..ctor(String theSelector)
--- End of inner ExceptionDetail stack trace ---
at UiPath.Core.Activities.TaskAsyncCodeActivity`1.EndExecute(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.System.Activities.IAsyncCodeActivity.FinishExecution(AsyncCodeActivityContext context, IAsyncResult result)
at System.Activities.AsyncCodeActivity.CompleteAsyncCodeActivityData.CompleteAsyncCodeActivityWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)
Giving me the selector will not help because I will have to look at the page source. If your information is not confidential then I can help out picking which DIV you can iterate through or else it will be an uphill task solving it without context of the page source.
In case you can’t share the info then - Play around and find the main Division that houses the sub divisions you want to extract and loop through it until you get the values.
You can see that I have attached the workflow that would help you get those values. You will have to do some basic string operations to assign those values in an array and eventually to an excel or data table.
Follow through with this similarly in all other sections and it will work.
Hope this solves it buddy, mark the solution which you feel is best and close the question
PS : I haven’t given you end to end code so you will have to build the part where you launch the website etc., from the landing page you run the bot from tray and as I have given writeline activity it will output all results on the window.