This time I think I found a solid workaround for the problem I have been facing with Data Scraping.
I feel pulling all the HTML and then parsing thru the data to get the required information is the most consistent way of doing so with this web application (if anyone has an alternative please let me know).
Well, let me walk you through what I am trying to do.
I am pulling HTML that is located inside a DIV tag, then parsing thru those lower tags to get my required information (Name, Address etcâŚ).
However, the data will span multiple pages in some instances. I have attached a snapshot to this which shows the HTML code for this particular button.
Whenever I reach the last page the âbuttonâ tag will have a âdisabledâ attribute equal to âdisabledâ when it has reached last page. This can be indicator that I no longer need to move forward and can finish automation.
However, instead of parsing thru each tag which will suck up memory I am wondering if there is a quicker way to parse thru HTML to get both the required info I need (NAme, Address etcâŚ) AND the button tag status (disabled or not). Has anyone done something similar to this and can provide some helpful hints?
You can also use Get Attribute Activity to get an âaastateâ attribute if it is disabled then itâs value will be unavailable, focusable and if it is enabled then itâs value will be focusable.
according to this activity output you can proceed further.
Yeah have to deal with it⌠what here can help you is use âUI Explorerâ and observe the properties of Html data elements
To get and understand the properties of an html element so you can get the values using âGet Attributeâ Activity you should aware of the UiPath studio attributes. so follow this link and check it out.
I know how to use UiExplorer to identify elements.
However, what I am unsure how to do is look at certain elements when the number of said elements (in this case patient line items) can varyâŚthe last page may have 6 line items where the preceding pages have 10.
You could probably use the activity Find Children targeted to the element that has âresultsâ class.
It will return an IEnumberable that holds all its child elements. It would be a dynamic approach since it does not care if it has 1 or 10 elements or search results in this case.
Thank you so much for the help. The Find Children definitely works, however I am wondering if you can iterate thru this output to get each individual tag that houses the info I need?
In other words, when I use Find Children it will give me back all info for first line item (all of which I assume are held in separate tags) is there a way where I can iterate thru each of these and then allocate to variables?
There are probably nicer ways of doing this but I came up with a couple of solutions.
If the âseparate tagsâ you refer to are always identical you can just use them as selectors at a Get Text -activity(assuming you want the innertext/value rather than the TAG name) that is inside a For Each -Child element loop.
If the âseparate tagsâ vary or are not always there you can do another Find Children and then do another For Each loop with these child elements and use Get Text to get the values of those.