Webpage - Find Text (from Excel) and click the button next to it

Looking at using anchor base

I want to click the green arrow for test 6, then test 7… etc… The ones I want to click into are are listed on my excel sheet.

I have my Anchor Base set to this:

In Find Element > UI Explorer > I have added aaname and added variable RoleName

image

The click is linked to the green arrow.

Is there an error somewhere? Selector Editor does not validate.

Hi @Jenny_Ye1

→ First extract the text in the webpage by using extract datatable activity and store the datatable in variable called dt.
→ Use for each row in datatable activity to iterate the each row in the datatable variable dt.
→ Inside for each insert the If condition to check the condition.
→ Inside if condition insert an assign activity to store the data of test 6 in a variable called RoleName.
→ After assign activity insert the click activity and indicate the first green arrow in the webpage when indicating it check the strict selector and uncheck the fuzzy and image.
→ Open the UI explorer and pass the RoleName variable to the aaname attribute as you done in the picture, then validate.

Hope it helps!!

you should try and use modern click activity as it is a lot better than click+anchor base

  1. enable modern design experience

  2. search click
    image

  3. this new click activity allows you to search for element (using 4 different methods
    a.strict selector
    b. fuzzy selector
    c. computer vision
    d. image

and also lets you specify the anchor as well (highlighted in blue), again you can define the anchor using the above 4 methods

Thank you. This looks interesting.

So I enabled the modern click activity and added the click activity in Use Application/Browser.

I have selected my anchor as “test 7” and my target as the green arrow

Then for my anchor I currently have this. I currently have a variable called “RoleName” which references to a column in my spreadsheet with the name I want to click the green arrow for (I already have Excel application scope, For Each Row & get row item set up and working for my previous steps).

I set aaname to “RoleName” however would not validate.

Have you tried the above process by extracting it as datatable,

If you have any doubts let me know… @Jenny_Ye1

yes trying that now and this is the step where I am stuck?

You haven’t properly extracted the data as datatable, could you extract the whole data in that datatable. @Jenny_Ye1

Or do one thing write the Extract datatable to an excel and share the excel to me.

image

This is the table being extracted

Okay @Jenny_Ye1

In the If condition give like this, If the bot has to click on arrow which is test 6 in your case.

- Condition -> row(0).toString.equals("test 6")

Inside then block insert an assign activity to store the value of test 6.

- Assign -> Name_Value = row(0).toString 

After assign activity insert click activity and indicate the first arrow, when indicating check the strict selector and uncheck the fuzzy selector and image.

After that open the Ui Explorer of Click activity and find the attribute which contains the test 1 value and replace that value with Name_Value variable and validate.

Then execute the bot and test it was clicking on correct arrow or not.

Hope you understand!!

This is what I have so far


I don’t have the test 1 value attribute in Ui Explorer

No @Jenny_Ye1

After assign activity you have to insert the click activity means inside then block only.
When you are indicating the arrow don’t indicate the anchor just indicate the target to that arrow.

If you are not aware with it, setup a zoom meet and share me the link in personal.

Hope you understand!! @Jenny_Ye1

I have done click in the then block

In rowName i see test 1 - so I put my RoleName variable

image

but can not validate

setup a zoom meet and share me the link in personal @Jenny_Ye1

I sent you a message. When are you available?

I am putting my variable in rowName


but get the following after saving
image