Help with getting value of Uielement and storing it without using Get text

Hello,
I have a business need to extract the display value of UI elements into variables. However, per the business, this must be done outside of “use Application Browser” activity, therefore “Get Text” is not an option.

The application (UI) in question looks like this:
uiPath

From above, I want to store 1123 into a variable.

I have tried:

  • Find Element and Get Attribute with no luck. Any other suggestions will be appreciated

this is a solution that worked when I used get text

@Yomi_Oluwadara

Even find element and get attribute work inside use application/browser only…then what difference it makes to not use get text?

Cheers

@Yomi_Oluwadara
Maybe try to use the classic activity of ‘Get Text’?

Thanks to you both,
@healsko_ho and @Anil_G

I noticed that the classic Get Text does the job outside of the “use Application Browser” activity ONLY if the web page is still open.

Below is the use of classic Get text without user application browser.

image

One more Challenge, if the value I want to capture is dynamic (its changing depending on some other factor), does Get Text still work? Is there a way to ensure that Get Text always grab the value that is displayed when the automation runs?

For example, let say the automation run next time and the value has changed from 10 to 5. does Get Text know to fetch 5 ? if not, how can I handle this use case?

Thanks for your input

@Yomi_Oluwadara
I believe your’re talking about 2 points.

  1. No matter modern or classic ‘Get Text’, it only works when the web page is still open, right?
  2. For capturing the proper value in application, you have to study the app structure (thanks to the UI Explorer), then select the stable elements and attributes to indicate your target.

@healsko_ho
Thanks for the insight.
#1 - You are right, ‘Get Text’, it only works when the web page is still open.
#2- Would you be able to shed more light into how to get this done? I’m still fairly new to UI automation.

I know I can edit my target like so:
image

and the UI explorer, I see the value ‘10’, how do I then make Get Text capture the dynamic value?

thanks

@Yomi_Oluwadara
Refer to your screenshot, you may uncheck the aaname and select tableRow & tableCol instead.
For more stable option, to replace the tableRow, you may use ‘Indicate Anchor’ at the left column (xxxVERIFICATION??) or use below unchecked attributes.
image

@healsko_ho .
Thanks for the suggestion,
This is how I have it configured, please help do a sanity check on it.

My assumption is that tableRow='3' will always make automation go to the 3rd row and colName='Past Due' will make automation go to that column and fetch whatever value that is present in that cell when automation runs. Is this a correct assumption?

image

You’re right. When the index of ‘Past Due’ is changed someday, you’re still getting that value of past due.
More specific attributes will make your automation more accurate.

1 Like

@healsko_ho
Thanks for that explanation. When I ran my automation this morning, it correctly fetched the data that was present ( not the one when I was building the automation), so it seems to have worked.

I will try it again after the data has been refreshed and if it keeps fetching the accurate data, I will mark the solution.
Thank you.

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.