Emptying Recycle Bin

We are going to automate emptying the Recycle Bin. There are various steps that are involved. Let's map the process of how to empty the Recycle Bin:

Steps to empty Recycle Bin

This diagram is simpler and more detailed than in the Emptying trash in Gmail example; we need to do exactly the same steps in order to perform this task.

Open UiPath Studio and choose a blank project. Since we are working in the recorder, and since we are working on the desktop and not a web application, we are required to choose the desktop recorder:

Start the recorder and simply perform the following steps:

  1. Go to the desktop by pressing the Windows + D keys. 
  2. Open Recycle Bin by clicking on Recycle Bin and then pressing Enter key.
  3. Click on the Manage tab of the Recycle Bin folder.
  4. Click on the Empty Recycle Bin button.
  5. Confirm by clicking on the Yes button in the dialog box.
  6. Close the Recycle Bin folder by pressing the cross button.
  7. Press the Esc key and Save & Exit the recorder.

Now your recording is ready to view, let's examine each step recorded:

  1. Go to the desktop by pressing Windows + D keys: This step is not recorded! Never mind, it is not needed. Please note that the recorded steps attach themselves to an application, and execute commands for that application, so the next step (Open Recycle Bin) will be executed on the desktop whether you are there or not.
  2. Open Recycle Bin by clicking on Recycle Bin and then pressing the Enter key—We can see the recorded step in the following screenshot:

Please note that only selecting the Recycle Bin is recorded, not the Enter key. We should manually add that step. Search for Send hotkey in the Activities window and insert it into the workflow just below the Select item 'list Desktop' step, as shown in the following screenshot:

  1. Click on the Manage tab of the Recycle Bin folder: This is recorded as it is and so is the fourth step, click on the Empty Recycle Bin button:
  1. Confirming by clicking on the Yes button on the dialog box is also recorded smoothly:

In the last step, closing the Recycle Bin folder by pressing the cross button, you may have to indicate an anchor.

Save it and press F5 to run it. Voila! It runs like a charm. You see how easy it is to record steps taken on a computer and automate them.

In some scenarios, the second step of opening Recycle Bin may get recorded as a single-click instead of Selection; in that scenario, you may not manually insert Send hotkey for Enter but instead, change the single click Recycle Bin activity from single to double. For that, open your recording sequence and find the click Recycle Bin activity.
Now click this activity, and you will see that its properties contain the click activity, and we have to change the ClickType; from single to double. 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.188.11