TanIlak
2 years agoContributor
Clear browser history
Hi,
How to clear browser history cache and all for all the browsers??
Is there any inbuilt methods are there in TC??
Let me know
Thanks and regards
TanIlak
Hi,
How to clear browser history cache and all for all the browsers??
Is there any inbuilt methods are there in TC??
Let me know
Thanks and regards
TanIlak
Searching the internet, suggests to delete the cache from,
%LocalAppData%\Google\Chrome\User Data\Default\Cache
The above will need to be verified though, to ensure it does not delete other important files.
The other solutions is to press Ctrl + Shift + Delete on the browser, and respond to the confirmation dialog to clear browsing data. You will need to add WndClass property value to MSAA in project settings to interact with the browser window e.g.
which exposes the following browser controls.
So, we can't delete cookies with content document like your previous code
Sys.Browser().Page("https://yoursite.com").contentDocument.cookie
Like these, any possible way to do with coding
Or https://catonmat.net/clear-privacy-ie-firefox-opera-chrome-safari - create a batch file and call this within TC, is another option
Hi !
Personnally, I use this function to clear my browser (ms edge in my case) :
function clearBrowserCache(){
var path, pathCookies, pathCookiesJournal;
path = "%LocalAppData%\\MICROS~1\\Edge\\USERDA~1\\Default\\Cache\\CACHE_~1\\";
pathCookies = "%LocalAppData%\\MICROS~1\\Edge\\USERDA~1\\Default\\Network\\Cookies";
pathCookiesJournal = "%LocalAppData%\\MICROS~1\\Edge\\USERDA~1\\Default\\Network\\Cookies-journal";
try {
aqFileSystem.DeleteFile(path+"*.*");
aqFileSystem.DeleteFile(pathCookies);
aqFileSystem.DeleteFile(pathCookiesJournal);
} catch (e) {
Log.Warning(e);
}
}
Here's an example of clearing cache for Internet Explorer 9,
Set objShell = CreateObject("WScript.Shell")
objShell.Run "RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255"
There will be examples on the Internet on how to clear cache for Chrome and Edge
Hi,
Thanks for your response.
This code also I have verified.
I want to clear all the browsers history and cache in one Javascript
>>For Example: Chrome,Edge,Firefox,IE in single method like deleteallcookies
Is anything available like these.
There are no inbuilt methods in TC that allows this.
Ok. Is it possible to read cookies???
To access cookies, it will be something like this,
Sys.Browser().Page("https://yoursite.com").contentDocument.cookie