Want to know Correct Activity and Cannot find the UI Element error

Hello all,

I’m a beginner and searched if there is similar FAQ, but I cannot find one… so let me ask.

  1. Is it correct activity “Type Into” to input a variable value in Web

Put in a field "生年月日 birthdate " on a SAP CRM WebUI

The variable date value should be today but 25 years ago.
Here is the screenshot of the bot

  1. If #1 is correct activity and setting, how should I fix the “Cannot find the UI Element error”?


Thank you for your support in advance!

Can you repair the element using the repair button or redo the indicate on screen? If so, then run the activity manually (using test this activity) to see which part of the selector is changing if any on multiple iterations. One issue is you cannot use the validate button with a variable in the selector.

Hi @Oskarin ,

Yes, Type Into is the correct activity for writing text in the specified UI element.

Please check if your selector variable dtToday value matches the specified UI element’s tag property i.e. tag=‘1995/09/30’ is actually matching with the UI element tag property.

Follow the steps mentioned by @Matt_S for troubleshooting :slight_smile:

Thank you, I will follow the steps as Yogesh_Sanap says.

Hi @Yogesh_Sanap,

Thank you for your advice.
Please correct me if I understand wrongly…

I put variable, dtToday, in UiElement since it was empty.
Ui element tag property is not matched because “dtToday” is String.

Ui Element shows "Compiler error encountered processing expression “dtToday”.Value type String cannot convert to “UiPath.Core.UiElement”.

Can you please advise how to fix this unmatch?
Will changing Variable type in Variable from String to something Date?
If so, what type should be put to get “yyyy/mm/dd” style?

Thanks again.:slight_smile:

Hi @Oskarin,

You are getting this error because Type Into Activity → Element only support UiElement type variable.

  1. If you want to enter today’s date - 30 years into SAP CRM WebUI element you can simply pass dtToday variable in Type Into → Text property (Please note this only support String Variable type, You can enter YourVariable.ToString() if variable you are passing is not of String type)

  2. If SAP CRM WebUI element is dynamic and changing selector value after each refresh, you can parameterize the selector with Selector Variable. for example, tag={{SelectorVariable}} just make sure its value is matching to the existing UI element property.

You can also use UIAutomationNext activities for defining anchors and building more robust selectors.

Thank you, @Yogesh_Sanap,

  1. When YourVariable.ToString(), the system puts mm/dd/yyyy, so I put MyVariable.ToString(“yyyy/MM/dd”), and it works!

  2. It looks the field in WebUI isn’t dynamic… Thanks for your further advice!

It is good to learn “UIAutomationNext acitivies”

Thanks again,

1 Like