After so much effort, I found the solution to getting the color from the buttons, which are images.
- I have downloaded the complete report in .htm format from SAP.
- I read it as a text using UiPath activity.
- I used the Regex expression to get the image src value between two unique order IDs.
- Then identify whether it is a green image or a red image.
This is a Regex expression.
System.Text.RegularExpressions.Regex.Matches(Text, “(?<=3585975.*?src=')(s_s_ledg.gif)|(s_s_ledgr.gif)(?=.*3559722)”).Cast(Of System.Text.RegularExpressions.Match)().Select(Function(m) m.Value).ToArray()
for full info please check this one