Store Excel column in a variable

Hello ,
I am automating a web app.
The screen contains a list of clients within a table.

In my excek file, I have the list of these clients. I want to store them in a variable and make my click activity click on each name in excel.

How ?

Thanks

Buddy @Youssef

Kindly follow the procedure to get your issue resolved buddy

  1. open the excel application scope
  2. read range activity to get that data from table and assign output variable as out_dt
  3. use for each row loop to iterate through each row by row in the datatable
  4. say a column is named as Client where the data is stored
  5. so inside the for each row loop use a assign activity like with variable out_client_value of type string
    out_client_value = row(“Client”).ToString
  6. then you can use this variable where you want make a click by passing the variable the as selector to aaname attribute like aanmae= ’ " + out_client_value + " ’

Cheers

1 Like

Since 19.4 there is also (better) new approach to use variables in selectors which is not destroying the structure of selectors. Just right mouse button click in Selector Editor and:
image

3 Likes

Thats amazing …yah even i got to know that recently…
Great

2 Likes

I Tried a right click but nothing appeard.
Concerning the attribute aaname, it says that it is not valid.

You need to be sure of scope of your variable and variable need to have value. And remember to click on attribute of UiElement not UiElement itself.

1 Like

“”

Selector not valid it says

Yes, because variable in selector can’t be empty. You need to assign the value in variables created before or set it during creation of variable inside Selector Editor

<html app='chrome.exe' webctrl aaname=' " + PartieDemande.ToString() +" ' />

Internet problem sorry.

@Youssef,
This will not work. Selectors can have only variables. You are trying to parse variable into string. It will not work that way. Just parse it for example in Assign activity and then indicate selector again (cause at the moment you already broke it). Finally go to the selector again and click right mouse button on place where do you want to put variable i choose variable. Like below:
image


image

1 Like