Hello to everyone,
I’m trying to automate a process that consist in read the values in a column in excel file and write them in a web portal in order to make recharge to employees of the company where i actually work.
In particular:
the robot should read the column “giorni” in the excel file
Then go to a website and in this page, It should write this value in column “N° buoni”
(For example; Ivano in excel file has value 18, so the robot should write 18 in the first row Ivano of the website portal)
Please follow below steps to achieve this requirement.
Use application/browser activity to launch and use click activity to navigate to the page you mentioned din the post.
Use work book read range to get the excel data into data table.
Use for each row loop and assign the data table output from the above step.
Use the following expression to get the dipendente and giorni values row by row.
dipendente = CurrentRow(“dipendente”).tostring
giorni = CurrentRow(“giorni”).tostring
if you are having the same values between excel and website. use type into activity and indicate the text box related to N° buoni and get the selectors make the selctors dynamic and enter the value with the following expression CurrentRow(“giorni”).tostring
OR if the same row pattern is not folowing i mean dependant information in the excel and website jumbled go for Anchor base activity for find element indicate the label name of the dependant (use dynamic selectors) and right side use type into enter the girni value under the field N° buoni .
Please use the above steps and explore on the dynamic selector area to achieve this requirement. i hope it might helpful to your requirement. thanks.
hi @kirankumar.mahanthi1, tks for your answer but i’m a beginner and despite i have read the article that you advise me, I don’t figure out how can i set the dynamic selector in this case.
I attached the printscreen of the selector
I set the expression CurrentRow(“giorni”).tostring in ‘buonoDaCopiare’, but maybe it’s wrong
Could you explain me how can i set correctly this selector?
I also attached the sequence ForEachRowinDataTable.xaml (7.0 KB)
PS:the value in excel and the web are the same, but the row order is different. I tried to use anchor base but when i use find element activity the type into activity disappear. You can try in the sequence that i attached.
i have an idea. Can we make row column attribute dynamic for the selector like below and try instead of anchor base and see if it is entering correct values in those text boxes. attaching code snippet for your reference. i hope it might helpful to your requirement. thanks.
the problem is that it does not write the value in the box below but they are olny in the first box. In fact, in the attached printscreen you will see that if I delete manually it writes the other values it reads in the table :
ok. i want to know the difference between the selectors for first and second text box i mean what is the tableRow and tableCol attributes for the first two text fields.
And also check the feasibility with the hot keys if we click multiple time tabs in the UI is going to the next text filed. please try and let us know. thanks.
Based on the screenshot for the first and second text field both have same selectors. First time I am seeing like this. Both should have some difference atleast under tablRow since both have different rows under that Ui table.
Currently I have idea like use for each row loop and use just type into enter the value below use send hot key and enter two tabs to go to the next field and continue the loop enter for next field. Thanks.
Now with the screenshots tableRow is changing. The previous solution with the dynamic selectors should work with incrementing counter not sure why not entering in the first text field only. Could you check css selector how it is changing for both text fields. Thanks
To find the correct box where type values, it is possible to use a dynamic selector on the anchor (the employee) by using a variable string with the expression CurrentRow(“dipendente”).ToString ?
Could i make dynamic the aaname o innertex where is showed the name of employee like in this screen?
Hi @ppr could you read the discussion with @kirankumar.mahanthi1 who is trying to help me in order to figure out what I’m doing wrong ?
I don’t manage to find a solution
hi @daniele.giunta94
I was following the discussion but will have soon a closer look on it. Details asked by @kirankumar.mahanthi1 are very helpfully and needed.
@kirankumar.mahanthi1@ppr, I’m happy to tell you that I solved the problem by replacing the anchor aaname with the variable “dependent” that contains the expression CurrentRow (“dependent”). ToString (it work also if the selector is not validated)
screen of selector attached:
in the file excel i have also a column “company” and i want consider only values of company1 ant not values of company2
As you can see, when the value “giorni” is written in the web page there is the 0 and this create a problem because the value is 18 but in the web page is written 180 (column n°buoni)