"Get Text" from different text on the same webpage

Dear UiPathers

I have a for each loop where I am looping through an excel spreedsheet and pasting every cell into a websites search bar to get the adress of companies. Right now, for testing purposes the spreedsheet is 3x3.

I essentially want to loop through this spreedsheet
image
and type every cell into this search bar

I sucessfully implemented a process to do this. The part I am stuck at is to get the text that I have highlighted with a blue arrow

If you look at my workflow, I can make this work the first run in the loop, however, after the 2nd itteration the program is not getting the text. It’s very important to note, that the adress changes and is not the same everytime, since some companies have different adresses.


My desired dream is to be able to produce this following spreedsheet, which has the same cells as the previous spreedsheet, however, the cells have adresses instead of the personal numbers, hence why I am writing my variable “adress” into a new spreedsheet, this is the part I am stuck with since I get error.
image

The errors are the following
image

Hi @nmjvk ,
Can you please check your selector. Your selector may contain the text that you had used while creating the selector and because of that your process fails in the next iteration (when it cannot find that particular text in the selector)

Thanks,
Nishant

Dear @Nishant_Banka1

Is there something specific I have to look for in my selector?

This is my selector…

@nmjvk

The selector looks incorrect…try opening ui explorer and identify the elemwnt and select some attributes which are static

To know that after identyfing chnage the page to another address and try highlighting …if it does not work them some attribute that you have is changing please check the same

Cheers

Dear @Anil_G

thank you for fast reply. Which Ui explorer do you want me to open? The one for “Window selector”, “Strict selector” or “Fuzzy selector”?

In your Fuzzy selector there is an attribute aaname, which contains the current text. From the next time onwards your process searches for this attribute and that fails since it’s no able to find it

Try removing the aaname attribute and that should work fine for you

Thanks,
Nishant

@nmjvk

Use either of them and remove the attributes which change

Cheers

So I just tried to delete the whole attribute from the target
image

image
image

However, when I click save a new target it being registered
image

This is not desired, since I don’t want this text to be selected.

Dear sir @Anil_G

I just tried, however, the target keeps changing when I delete the attribute. Any idea how to fix this?

@nmjvk

That is the reason you need to try in ui explorer and then use that here… the selector identified initially might not be the best one…

And when you remove aaname there are so many elements which are matching the selector hence its failing

From ui tree in ui explorer check a level up if aomething is unique…it might as well contain address name in it(the field name) …that would not change…can try using it

Cheers

I just tried to disable “aaname” in the tree, now the program loops through all of the cells and enters them in the search bar, however, the Get Text only copies correctly the first time the text I selected as target, after 2nd itteration it copies random parts of the webpage, as an example the printing logo.

Do you mind helping me where or what to look for for similarities?

@nmjvk

In selector editor scroll to bottom…and check eacch row towards top on which contains the address keyword in it…if you find one select that check box and select appropriate attributes

Cheers

Dear @Anil_G

There are none. Might it be you are referring to something else I have to look out for?


@nmjvk

Check the innertext property…all selectors will not be easily available…you have to check properties of multiple lines and use few wild characters

cheers

1 Like

Dear @Anil_G

Thank you for that video. I will look at it now

1 Like

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