-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathclear-browsing-data-edge.yaml
More file actions
63 lines (55 loc) · 2.17 KB
/
clear-browsing-data-edge.yaml
File metadata and controls
63 lines (55 loc) · 2.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# Clear browsing data in Microsoft Edge
# Edge is the default browser on Windows 11 WAA VMs
name: "Clear browsing data in Microsoft Edge"
id: custom-clear-edge-data
setup:
# Populate Edge with browsing history
- execute: "powershell -c \"Start-Process msedge 'https://example.com' -WindowStyle Normal\""
- sleep: 3
- execute: "powershell -c \"Start-Process msedge 'https://wikipedia.org'\""
- sleep: 2
# Close Edge so the agent starts fresh
- execute: "powershell -c 'Stop-Process -Name msedge -Force -ErrorAction SilentlyContinue'"
- sleep: 2
evaluate:
# Check 1: Edge history is empty after clearing
- check: command
run: |
powershell -c "
$histPath = \"$env:LOCALAPPDATA\\Microsoft\\Edge\\User Data\\Default\\History\"
if (Test-Path $histPath) {
$size = (Get-Item $histPath).Length
if ($size -lt 50000) { Write-Output 'cleared' } else { Write-Output 'not_cleared' }
} else { Write-Output 'no_history_file' }
"
expect: "cleared"
match: contains
# Check 2: VLM confirms clearing
- check: screenshot
description: "Microsoft Edge shows a confirmation that browsing data has been cleared, or the Settings page shows completed clearing state"
combine: or
max_steps: 20
milestones:
- name: "Edge is open"
check: command
run: "powershell -c \"Get-Process msedge -ErrorAction SilentlyContinue | Measure | Select -ExpandProperty Count\""
expect: "1"
match: contains
- name: "Settings page is open"
check: screenshot
description: "Edge Settings page is visible, or edge://settings is in the address bar"
- name: "Clear browsing data dialog is open"
check: screenshot
description: "The 'Clear browsing data' dialog or panel is visible in Edge"
- name: "Data is cleared"
check: command
run: |
powershell -c "
$histPath = \"$env:LOCALAPPDATA\\Microsoft\\Edge\\User Data\\Default\\History\"
if (Test-Path $histPath) {
$size = (Get-Item $histPath).Length
if ($size -lt 50000) { Write-Output 'cleared' } else { Write-Output 'not_cleared' }
} else { Write-Output 'no_history_file' }
"
expect: "cleared"
match: contains