How to Record time taken for all text to turn Green or Red using ui path?

Hi, I am trying to automate the sap application , and in one screen i have to wait on the screen till all the tiles ( test in the section) color turn into red or green and i want to find out how much time it took to turn all the text color from turning to green or red from grey

Regardless of the application, here’s how you can measure a time difference expressed as a TimeSpan object.

Hi, thanks for your revert, but code didn’t work for me, actually in SAP , i have to record the time till all the tiles text turn into red or green. attached is the image. like 250 in the image will turn into green in some time similarly there are around 15 grey text which will turn into colored text. and i have to record how much time it will take to turn all the grey text to colored text.Can you please help
image

This code will work if you need to record a TimeSpan. Of course it wouldn’t cover your other requirement - i.e. checking whether all required items are shown in green. You could create a robot that checks all items every few seconds (assuming that period is shorter than the refresh interval). Identifying a “green” element could be challenging, but there are some packages that might help (https://gallery.uipath.com/packages/ColorDetectorActivities/).

I would recommend checking for a numeric value (or fixed string) if possible, your example shows that a 0 is “green”, or essentially a positive trigger. Note that this isn’t a code writing service, but feel free to ask another question if you’re stuck.

Hi, Hope you are doing great, i tried the above code to get the response time of the website, not sure what i am missing, attached is the code, can you have a look and guide me furtherMain.xaml (8.0 KB)