Krishna
Krishna

Reputation: 153

Deleting Cookies and Cache in chrome browser

Could you please confirm can I use the:

driver.manage().deleteAllCookies() 

for delete the cookies in Chrome. And also please provide the statements for deleting the cache in chrome and IE. And also how confirm the cookies and cache is deleted in the browsers.

Upvotes: 0

Views: 1411

Answers (1)

Saifur
Saifur

Reputation: 16201

Using deleteAllCookies() will clear all cookies not CACHE. Currently there is not a way to clear the cache with Selenium, at last not that I know. However, I think you do not need to do that either since Selenium by default creates a new profile every time.

See this issue which has been opened since 2010. And more detail discussion here

Upvotes: 1

Related Questions