How to take decesion on the basis of BG color and value combined?

On a website, after performing some operations, I want to check the following two conditions using UiPath RPA:

  • Proceed to the next step only if the “Coding balance (total)” value is 0.00, which is highlighted in green.
  • If the “Coding balance (total)” is not zero and highlighted in yellow, then stop the process.
    ** “Coding balance (total)” - place might be change …
    How can I implement this condition check in UiPath?

image

@RPA_Learner0

I believe based on the value the color changes

so you need not look at color specifically

to get the value

you can use regex in selector with coding balance total as constant and remaining as dynamic

once you retrieve the value we can extract the value after it to check

cheers

Hi @RPA_Learner0 ,
You can try Get Attribute activity to get the class attribute. There could be a small difference the data in class attribute for red highlight and yellow highlight.

If you could share the HTML elements for both the color highlights it would easier for me to analyze

use get text and get attribute activity, with get text activity you will get those text and using a simple regex you can extract the value ,then you can add you condition like greater than 0 or something like that, but if both are necessary (value and color) then you have to use get attribute activity , then you can get both value and color .

@RPA_Learner0
Use an activity to extract text from the UI, and for the color, use the Get Attribute activity with the imageColorData option.

I also included a screenshot to capture the color.

This way, you can validate the background color together with the extracted text.

Mark this as the solution if it helped resolve your query.