How to clear browser cache in Selenium test

前端 未结 3 1744
遇见更好的自我
遇见更好的自我 2021-01-02 01:40

I am running my Selenium tests with WebDriver. I am repeating the tests with some loop so now I want to Clear the cache before starting new test in JAVA.

@Te         


        
3条回答
  •  孤独总比滥情好
    2021-01-02 02:32

    I have used this lines of code in python to do that and it seems to clear the cache every time(Internet Explorer)

    capab = DesiredCapabilities.INTERNETEXPLORER

    capab.clear()

提交回复
热议问题