I guess you were trying to get the value from red but it’s giving you the green value. I would recommend provide a proper Anchor for the value you would like to extract, follow the below steps using Modern UiPath Activities:
Anchor selector → target the “Contract Premium” label cell by text, not row
For example, the selector should look something similar to this: <webctrl parentid='CntContentsDiv*' tag='TD' innertext='Contract Premium' />
Target → indicate the value cell next to it.
For example, the selector should look something similar to this: <webctrl parentid='CntContentsDiv*' tableCol='2' tag='TD' />
This way, wherever “Contract Premium” sits in the table, Anchor always grabs the adjacent value, it stops caring about tableRow entirely, so it won’t drift to “Lapsed” or any other row again.
Also add the safety parse check so if it ever does grab the wrong cell, it fails safely instead of crashing: If Double.TryParse(extractedText.Replace("R","").Trim(), premiumValue) Then proceed, Else log and skip/retry
Your tableRow='*' is the culprit — it grabs whatever TD comes first, so sometimes you get Contract Status instead of Premium. And CntContentsDiv10 will break too, that number shifts.
Drop the row/col indexes and anchor off the label instead.
anchoring on the label is the right call, just one thing worth checking when you test it. In tables like this the label and the value are usually sibling TDs, so a plain <webctrl tag='TD' /> as target can end up matching the label cell itself instead of the one next to it
if that happens, the easiest fix is telling the anchor wich direction to look, the Anchor Base has a position property for that, or in the modern activities theres an anchor direction on the target. Setting it to the right side usually solves it in one click
and if the value cell has any attribute of its own, like an id or a class, adding that to the target selector makes it unambiguous without relying on position at all. Worth opening UI Explorer on that cell just to see what it has
As per error its clear that the selector used is not unique..
So first show the ui explorer screen by indicating what you need or select which are unique..may be table id or name..or a reliable td and then nav up and the get the required td