DIV text HTML selector

image

Hi everyone, is there any way to get the " Pre-owned "
the text sits in between (div)text(span)(not the one needed)(/span)(/div)

I tried many different tags for the selector and none of them can take just the “pre-owned” but the entire table cell

image

Hi. I just got an idea. This works your target line if it always starts with "

Use this logic:

  1. Save this html in to text variable(say 'text)
  2. Then create a string array variable(say ‘textArray’)
  3. Split the variable ‘text’ by newline and save output to ‘textArray’ variable
  4. Create one more string variable(say ‘result’)
  5. Now use for each loop
For each 'line' in 'textArray'
{
     if(line starts with ")
     {
         result = line
         break
    }
}

Now your result variable has your desired output. Try to build this kind of code in your UiPath project

Hope this helps you.

give try on following.

Get attribute Activity to the div and fetching the atrribute outerhtml
then similar as below get the text only for the div and not from attached children

XDocument.Parse(YourOuterHTMLString).Root.Nodes.First().ToString

grafik