Forum Discussion

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    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.

    • Ḽari's avatar
      Ḽari
      Frequent Contributor

      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

  • eykxas's avatar
    eykxas
    Regular Contributor

    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);
    	}
    }

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    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

    • TanIlak's avatar
      TanIlak
      Contributor

      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.

       

    • Ḽari's avatar
      Ḽari
      Frequent Contributor
      rraghvani How to delete cookies over here???
      Could you please help me out from this