Hi @Gary Ray
You can achieve what you want using Seleniumbasic. Seleniumbasic is a Selenium based browser automation framework for VB.Net , VBA and VBScript. Before writing the code, there're some steps needing to be followed:
- Download the latest version of SeleniumBasic v2.0.9.0 from this link and install it.
- Download the corresponding version of Edge WebDriver from this link.
- Find the path of SeleniumBasic which is
C:\Users\%username%\AppData\Local\SeleniumBasic
in my situation (it might also be in this pathC:\Program Files\SeleniumBasic
), copy the Edge WebDrivermsedgedriver.exe
to this path. - Rename
msedgedriver.exe
toedgedriver.exe
.
The VBScript code is like below. You can first open Edge, then navigate to edge://settings/clearBrowserData
and automate the browser to clear the cache:
Dim driver
Set driver = CreateObject("Selenium.EdgeDriver")
driver.Get "https://www.google.com"
driver.Wait 5000
driver.Get "edge://settings/clearBrowserData"
driver.FindElementById("clear-now").Click
driver.Wait 5000
driver.Quit
If the response is helpful, please click "Accept Answer" and upvote it.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.
Regards,
Yu Zhou