Problem with activity "Type into" in Google chrome browser

I have created a process to input data into a web form in the format below:

My problem is the activity keeps stalling with the error “could not find the UI element” at two of my data inputs, last name or MRN. These are configured with the same criteria as for First name, Date of birth & Gender. I am confused why this may be the case. I have included my activities inside an “attach chrome browser activity”

The behavior is reproducible in two projects.

My process is summarised in the following steps:

  • attach Chrome browser
  • Import CSV
  • create data table
  • For each row in CSV
  • type into “highlighted field” Row(“Data field”).ToString
    Where necessary I have used hotkeys to select from a menu. The described behavior seems independent of the use of hotkeys

I attach a copy of my project
NTB add patient.7z (239.4 KB)

My sample CSV data is:
fname,surname,date,sex,mrn
test,testing,03/11/1986,female,24011978

Try validating the selectors before running and if they are validated, try using dynamic selectors.

2 Likes

copy of project please send once again for checking

The control IDs are probably dynamic. Edit your selectors and make it more dynamic with wildcards.

For example change:

<webctrl id='1225526626033-mrn' tag='INPUT' type='text' />

to:

<webctrl id='*-mrn' tag='INPUT' type='text' />

to target the MRN field.

Here you go:

NTB add patient.7z (243.6 KB)

This is working thanks… What should I use as the webcontrol for “Last name”?

A

Use the same approach. Just replace the number with a wildcard:

<webctrl id='*-lastName' tag='INPUT' type='text' />

Hi,

Many thanks for all your help so far. I have one final question, for a click activity, I am also seeing a similar issue:

Looking at the webcontrol it is currently configured with:

image

How can I add some tolerance (like wildcards) into the configuration?

Andrew

That id seems to be static. Run UiPath in debug mode and when you encounter the error “Could not find the UI element”, stop. Repair the selector and compare the new id with the old id to see a how it differ. That’s how you can detect which part of the id is dynamic and which is static.

E.g. if the old id='headbar_nav_patients' and the new id='headbar2_nav_patients' then you need to replace the part that changes with a wild card, e.g. id='headbar*_nav_patients'

1 Like

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