Hi
@LearningRPA,
Regarding #1, please refer the below.
For #2,
@suryadss has laid down the steps for you.
1.jpg: This is how the overall process diagram looks like.
2.jpg: The list of elements spied.
i. The main browser window (A blank IE window is fine. No need to open any URL)
ii. The Delete History dialog box (shown in Screenshot 4.jpg)
iii. The Preserve Favorites checkbox which you will see later below
iv. The Delete button
v. And the final confirmation window that says the cache has been deleted
It is a good practice to suffix the spying mode at the end of the element name.
Notice the _Win32 and _AA at the end of the element names.
- Launch the browser window using a Navigate stage.
- Wait for a while to allow the window to open. You can add your own Dynamic Wait here in case the window doesn't open throw an Exception or add retry logic.
3.jpg: Open the 'Delete History' window. The shortcut keys to open this window is Ctrl + Shift + Del.
Its 'Sendkeys' equivalent is "^+{DELETE}" where ^ stands for Control and + for Shift.
This will open up the window as shown in 4.jpg.
- Add a Dynamic Wait stage till the Delete History dialog box opens.
5.jpg: You need to (uncheck) write False to the first checkbox if you want to remove ALL the cookies and temporary internet files. (Go through what is written for that checkbox). So this is totally up to you if you want to delete everything what is mentioned for that checkbox. A Writer stage is used to write a False value.
6.jpg: Note, when this element was spied it was showing me as a Button in the red marked dropdown. So the 'Uncheck Preserve Favorites checkbox' Writer stage in 5.jpg was not allowing me to uncheck that checkbox. After spying, I have manually selected it to a Check box in the dropdown and then was able to Write False to it.
- Similarly check/uncheck other options as per your requirement in that dialog box after spying each of those checkboxes. I have not done that here.
7.jpg: Once done, Hit the Delete button.
- Add a Dynamic Wait stage to wait till the final delete confirmation dialog box appears. This may take time depending on the volume of history stored in the browser, based on when the cache was last deleted.
8.jpg: This is how the Delete confirmation dialog comes up at the bottom of the window.
Note, this confirmation box was spied using the AA mode. Refer 9.jpg.
You can add your own logic to check if the value shown in the dialog is the same as marked in red in the screenshot.
10.jpg: Once done close the browser window.