How to find ui elements in below use case

Hi Team,

I want to automate below use case -

  1. On below web page, user will send update field request which will contain any 3 attributes for update in queue item.

  2. Depending on the update attributes sent in queue item , automation should find those items on web page and update the information

  3. Question here is , which activities should be used to find the Ui elements in this case if we only know their name?

  4. then we need to update their value using typeinto , as it will be any random fields , how to use typeinto in that case ?

Hi @shraddha_joshi
if the selector has any attribute which has value equal to any of field in queue item, you can try that approach.

like for eg, First Name field has selector attribute innertext=firstname [assume]

if in the queue item if you had items like this

firstname=Data
lastname=N

now u can fill the input field by taking the firstname attribute from queue to selector innertext attribute value so that u can fill the details there.

Thanks & Regards,
Nived N

@shraddha_joshi All fields have text boxes with different names so its better to try with Anchor Base

from the ui looks like, its a salesforce application, if so try to use salesforce activities(if its allowed in your uipath environment)

Ok , I will try that .

Another thing to discuss here, which field to update is not same every time,
e.g.
in first queue item we may get request to update firstname and lastname, in next queue item, we need to update email only.

For this first I need to find which field to update on Web page and then use typeinto to update it

As this is changing every time, what should be the approach to automate it?

Issues I am facing is -

  1. Which activity should be used to find ui element if we know only one attribute like innertext?

  2. After we found ui element, we need to use typeinto which should be dynamic.
    And it requires actual ui element to be indicated on screen , how to use it dynamically ?

-Thanks,
Shradha

Hi @shraddha_joshi

See here the main aim is to type into required field as per specified in queue item.

Consider First name has attribute innertext which has the value firstname

Simmilary Last name has attribute innertext which has the value lastname

Now in queue item values are like this

firstname: Hello
lastname: world

Now to type the data into reqd field, u need loop through field in queue item and use the type into activity to type the value by changing the attribute value with the field value of queue item

Thanks and Regards
Nived N

Ok, I will try this approach.

-Thanks,
Shradha

1 Like

Hi Nived,

I have tried this , it seems working .

Only the question is on below part

If I want to update 10 random attributes then inside for each loop - currently I need to add 10 typeinto and check like
if aaname=“First Name” then typeinto value
If aaname=“Last Name” then typeinto value

Is it possible to have only one typeinto ?

I have tried it but it fails . is it the limitation of typeinto that it only works for element for which it is indicated on screen?

Any suggession ?

Hi @shraddha_joshi

You can try with one typeinto itself

As i told earlier, once u retrive the queue item, next loop through each specific field of queue item and then you can add the specific field name as attribute in selector of it so that selector would change accordingly based on field .

If you can share screenshot of selector, i can help u to find this out :slight_smile:

If we use only one typeinto inside for loop , all the values get placed into the same field as automation would not know where to place next item.

I could use hot keys to take the control to next field but as it would be any random field on page , we can not use this approach.

Hi @shraddha_joshi

The type into uses the selector to identify the webelements, changing attribute value of selector will change the uielement as well.

ok. I have created below dynamic selector

did u check it indicates required fields properly by passing the values of field name?

just checked , even if I am passing correct values of aaname in fieldName , in Ui Explorere it indicates the First Name only.

Its not indicating other elements like Last Name , Email etc

could u share screenshot of firstname, lastname selector in uiexplorer?

Firstname -

Lastname

First Name=Data
Last Name=N

could you name the queue fields like above?

Also in the selector try like this

<html app='chrome.exe' title='Users | Salesforce'/>
<webctrl tag='IFRAME' />
<webctrl rowName='*{{fieldName}}' aaname='*{{fieldName}}'/>

Try this approach

also validate selector as well

Thanks & Regards,
Nived N

Thanks, I will try and let you know

-Regards,
Shradha

1 Like

Yes , it worked for me. Thanks for the help

1 Like

You are welcome

Happy Automation

Thanks & Regards,
Nived N