Use âExcel Application Scopeâ activity and Add âRead Rangeâ activity inside the scope.
Create a DataTable variable and assign it to the output property of Read Range activity. Not all your username and password date is in that DataTable variable. Lets say it is dtCredentials.
Now use a âFor Each Rowâ activity after the âExcel Application Scopeâ activity.
Add âAssignâ activity inside the for each loop and create string variables named âstrUserNameâ. Assign should be like this âstrUserName = row.item(0).ToStringâ
Add another âAssignâ activity next to the first assign activity. Create another string variable named âstrPasswordâ. Assign should be like this âstrPassword = row.item(1).ToStringâ.
Add an âOpen Browserâ activity with the login page url.
Add a âType Intoâ activity inside the Open Browser activity and indicate your username textbox.
Pass the value of the text as âstrUserNameâ.
Add another âType Intoâ activity after the 1st one and indicate your password textbox.
Pass the value of the text as âstePasswordâ.
Add a âClickâ activity and Indicate your submit button.
Note: Step 4 to Step 11 should be inside your for each row loop.
if I have excel data that I want to paste later in the process, how will I do it?
example:
open the website
enter log in credentials
click âinvoicesâ from ribbon
select âaccount idâ
select âequalâ
then I open my excel copy row2 from column1 (account)
then âtype intoâ website
then I enter few more fields and click search
how to make this process in loop so that robot takes one row at a time rather than pasting all the rows at once.
Use âType Intoâ & âClickâ activities to Login to the application.
Again use associated activities to Click Invoices, Select AccountId & Select Equal.
Use âExcel Application Scopeâ activity and Add âRead Rangeâ activity inside the scope.
Create a DataTable variable and assign it to the output property of Read Range activity.
Now use a âFor Each Rowâ activity after the âExcel Application Scopeâ activity with the DataTable just created.
Inside For Each Row activity add all your âType Intoâ activities that you need to enter in the website. row.item(0).ToString should give you that value of the first column for that particular row. row.Item(1).ToString fro the 2nd Column and so on.
Inside For Each Row activity add another click activity to search.
Your For Each Loop should iterate for each of the row within the excel file and perform your search. With every search if there is any need to go back to any previous page, make sure that you are adding that operation as the last activity within the for each row loop.
once i clicked search i get a PDF (Open, Save) i just open it instead of save, so i cant use Read PDF Text activity as its not downloaded into my system nor do i want it downloaded.
i tried using Screen Scraping also but its not validating the live attachment as i get more invoices from other accounts.
Process:
once i click search i get a pop up with (OPEN, SAVE PDF) I CLICK open and PDF is opened from there i want to extract invoice amount and paste it back on to the same excel file in column B. Then again i want to run the whole process above of entering new account id and search for invoice and getting PDF. I used both write range and write cell but the results are null.
used âExcel application scopeâ to open the excel file
âGet OCR textâ to extract the wanted data from each PDF as its opened in the loop
âWrite Cellâ to paste the extracted data
last step is where its i am having trouble, its pasting the value in B2 column just replacing the previous amount that was copied over. how can i create it such that for A2 this is the Invoice amount B2, A3 its corresponding invoice amount B3âŚ
@Rammohan91 Thanks a ton for this beautiful answer with canonical steps. I rate this answer as one of the top most answer in this forum. I was stuck for 2 days on this issue and your detailed steps solved it for me.
In the above scenario, how to capture the excel data(column values) if the column values are like 15-20. How can i iterate through the column values of a particular row instead of storing all the values inside variable one-by-one
Hello @Rammohan91
I have a similar problem where I have to click on 1 row, one after another (60 clicks total, 20 per pages.
the column that I care about looks like this:
I have to do some operation in between the clicks but I am having trouble making the tablerow dynamic or use the for each row with the click text that always gets an error.I have the entire process working for the first row and would like to loop it for the other 19 on the first page, go to next page and do 20 more, go to next page, click the last 20.
please let me know if you have a way to do this.
Thank you.
Boyses
Check each and every selector ensue the selector has unique property except aaname
based on that set a counter as 1 and in while condition click and manipulate the steps
Hello @AshwinS2
all selectors are unique, only the table row is changing when I manually change the row. but it is only 1 row being completed. To be honest, I did not understand much from what you wrote, sorry.
How can I make the tableRow dynamic? so I can link two sequences and add an if statement for the count to be 20 and change page and start again?
Thank you.
Thanks for sharing the steps in a simpler way.
I referred your answers and trying to solve my issue.
Can you let me know what is wrong in my below steps:
The problem is, it takes only the latest value from the excel sheet.
Example if the excel sheet has 4 usernames, it takes the last user(4) and perform the tests.
Open the application through windows start menu
Login with user name and password
Navigate to a particular file option, perform some actions
Now here I need to pass some user id from an excel file and capture the status of each user
Open excel application scope
Read range created a datatable variable(exceldata)
For each loop and passed that datatable variable (exceldata)
For each row in exceldata
Assign strUsername = row.item(0).ToString
Type Into and text as (strUsername)
10.Press Enter
Hi Rammohan,
I tried the same steps to read the text from excel and type into the windows application.
But, even after i use row.Item(0).Tostring , all the values from the first column are entered continuously in the selected field of the web application. Can you please let me know where am i going wrong