1
votes

I am trying to capture Text from UI. However in inspect element tool the text is missing. Text is coming from some other div. When I indicate elements from UIPath it says validated but inside the element the text is not there. It's somewhere in other div. I tried editing CSS shown below, which is the exact location of the text. However the data is blank.

Midified CSS:

<webctrl css-selector='div[class*=is-cherry]h1v' idx='2' isleaf='1' parentid='root' tag='DIV' /

ipath

1
Can you say which page this is, otherwhise an OCR is you only solution I would say. - kwoxer
covid19india.org/state/MH - here is the page - Unicorn
Pretty good example to learn how the Get Text selectors work. Hope it helps you to get some more ideas about UiPath. And make sure you go to the UiPath Academy where you learn such things with good example as well. - kwoxer

1 Answers

1
votes

The page is using React. So there is no proper way to simply read the text. Instead do it with OCR.

  1. Use a Selector

The best way for you would be using a selector. Here it's a little bit tricky to find the proper selector as the React Framework tries to hide several elements by itself. But when you found the pattern you are good to go.

Find your value under the level root as you can see in the image:

enter image description here

So now you simply use the Get Text activity:

enter image description here

Make sure that you edit the selector in the following schema:

<webctrl tag='H1' parentclass='level-item is-blue fadeInUp' />

This is the selector for your blue value. Now if you want the red one take this one:

<webctrl tag='H1' parentclass='level-item is-cherry fadeInUp' />

I believe you got the point now how that page is working and how to selection of the different colours works.

  1. OCR technology (make sure you are using the Profile Scan)

I would not recommend you to use OCR as you never know if the elements is switching its visual area. If so your process would fail.

enter image description here