In the previous video, we learned how to capture data from Citrix or Virtual environment by
using a manual recording technique.
We have learned that it is easy to capture data and automate Citrix environments by indicating
an image reference and setting up a reference point for the click event.
We'll now try to capture data from a Citrix machine in a spreadsheet format.
To give you an idea on what we need to work on, let me play the workflow that I have done.
As you can see it captures the data from the application and gives us an output.
We can use this output later to be passed on to another application.
Ok.
Let's get started.
On the left side of the screen, I have my remote desktop and I am currently running
an Expense Report application.
Now, we will try to capture the data inside the spreadsheet under Expense Type, Description
and Amount.
The last data we will capture is the "Total Expense" which is currently in an image format
and cannot be selected using a cursor.
The purpose of retrieving these data is to show you how to gather these data in different
format.
We can use this later for a different application.
First thing, let me show you the manual method in getting the data from an application inside
the remote desktop.
We will pattern our automation workflow based on these actions.
To get the data in the first row, we'll basically need to click this specific cell and press
Ctrl+A and Ctrl+C in our keyboard.
We'll open a sample application, notepad. and press CTRL+V to paste it here.
Pretty simple isn't it?
For us to get to the next cell in the same row, we just need to press the TAB key on
our keyboard.
Then again Press Ctrl+A and Ctrl+C to select and copy the content inside the cell.
Let's go back to Notepad and press CTRL+V. There's our data.
Ok.
It's time to setup our workflow.
In the Recording tool, let's go to step-by-step TAB.
The first thing we will do is to point our cursor to the first cell so we can get the
data in it.
Just like what we have learned about remote desktop, we need to have an image reference
so UiPath will know where to click.
So we will use the image header, Expense Type as our image reference.
Remember, any element on the screen that cannot be highlighted using a cursor is considered
as an image.
Let's click "Image" and choose "Mouse">"Click".
In our remote desktop, let's highlight Expense Type.
Then the second action is to indicate a point relative to the image, Expense Type.
What will it do?
It would make sure that the cursor is set in the right cell.
Let's click the "indicate" a point to the screen and click the first cell.
Now that we have an activity that will click the first cell, the next thing is to highlight
and copy the text inside the cell.
We have a special activity for it to handle both actions.
Let's click on "Text" and select "Select and Copy".
Then we can click anywhere in the remote desktop.
To move to another cell, we can just press Tab.
To create that activity in our workflow, we can go to "Element" option then choose "Keyboard".
Let's select "Type".
This will give you a list of keyboard keys and commands.
Let's search for the "tab" key.
This will generate this code after clicking it.
Let's leave it that way.
Then press "Enter".
Now that we are on the right cell, let's go to "Text" and select "Select and Copy" to
highlight the content of the cell and copy it.
Let's review what we have done on our workflow so far.
Let's save and close the recording.
In our workflow.
The "Expense Type" image is where we click the first cell in the table.
The second image is where we highlight the text inside the cell.
You noticed that it automatically generates some codes.
Don't worry about it for now.
The important thing is you know what action has been taken in this particular activity.
This followed by a Copy selected text activity which copy the content of the cell.
The next image is when we press "Tab".
The next one is where we highlighted the text in the second cell.
This is followed by Copy selected text.
After we have selected the text, there is no action on where it is pasted.
So we can't see the output.
For now, let's add a "Write Line" activity next to "Copy Selected text" so it will produce
the result in the Output panel.
This activity is useful when doing some testing before replacing it with an actual activity.
The output of the selected text is stored in this variable, "CopySelectedText".
It's automatically set by the Write line activity.
Let's do the same with the second data.
Now we are ready.
Let's open the Output panel so we can check the results.
In the new UiPath, the run button is available here next to the UiPath logo.
You can also go to the Execute menu and select Run or just simply press F5.
Let's run our workflow.
As you can see, it copies the contents of the fields we have setup in our workflow.
Here in our Output panel, it successfully copied the items.
In the next video we will learn how to copy data in an image format like the Total Expense.
Watch out for it.
Thanks for watching.