is there a way to clear cache and cookies using javascript? I am using selenium to run tests in microsoft edge and the tests run in the same session as the previous run (not a new session). Need to figure out how to run on a clean session each time. Right now, there does not seem to be any support in selenium for this.
            Asked
            
        
        
            Active
            
        
            Viewed 1,341 times
        
    2
            
            
        - 
                    You can't clear httpOnly cookies from inside browser....they are protected Question depends on how you set cookies – charlietfl Oct 04 '16 at 01:17
2 Answers
0
            
            
        For Chrome and Firefox, I always used Watir's browser.cookies.clear
http://www.rubydoc.info/gems/watir-webdriver/Watir/Cookies
However, I noticed that this did not work on Edge for some reason. So I'm waiting for an answer on this topic (might help you as well) https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/14838528/
 
    
    
        adiga
        
- 34,372
- 9
- 61
- 83
 
    
    
        Mark Duivesteijn
        
- 183
- 1
- 12
 
     
    